Jump to content
LaunchBox Community Forums

SystemEventsPlugin SelectionChanged


Recommended Posts

The ISystemEventsPlugin interface will notify a plugin via the OnEventRaised method whenever certain events occur.  It passes the plugin a SystemEventTypes string to indicate what type of event has occurred.  One of the event types is SelectionChanged.  Does anyone know a way to identify what was actually selected when this event fires?  I was looking around at the PluginHelper's BigBoxMainViewModel, DataManager, and StateManager to see if I can figure out what platform, playlist, or game was selected but I couldn't find a way.  I'm hoping I'm missing something simple, or is it just not possible?  

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Fry said:

The ISystemEventsPlugin interface will notify a plugin via the OnEventRaised method whenever certain events occur.  It passes the plugin a SystemEventTypes string to indicate what type of event has occurred.  One of the event types is SelectionChanged.  Does anyone know a way to identify what was actually selected when this event fires?  I was looking around at the PluginHelper's BigBoxMainViewModel, DataManager, and StateManager to see if I can figure out what platform, playlist, or game was selected but I couldn't find a way.  I'm hoping I'm missing something simple, or is it just not possible?  

There doesn't seem to be an obvious way to get what was selected at the point when the selection was changed, just what is currently selected. The StateManager has methods for getting selected games and the selected platform. Not sure about the playlist though. Might involve tracking some selection state internally to work out what has changed.

PluginHelper.StateManager.GetAllSelectedGames();
PluginHelper.StateManager.GetSelectedPlatform();

 

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...