private void RefreshContextMenu() { _pluginSubMenu = new DeskBandMenu("Audio Source", _audioSourceContextMenuItems); Options.ContextMenuItems = new List <DeskBandMenuItem> { _settingsMenuItem, _pluginSubMenu }; }
private List <DeskBandMenuItem> BuildContextMenu() { var pluginList = _audioSourceLoader.AudioSources.Select(audioSource => { var item = new DeskBandMenuAction(audioSource.Name); item.Clicked += AudioSourceMenuItemOnClicked; return(item); }); _pluginSubMenu = new DeskBandMenu("Audio Source", pluginList); var settingsMenuItem = new DeskBandMenuAction("Audio Band Settings"); settingsMenuItem.Clicked += SettingsMenuItemOnClicked; return(new List <DeskBandMenuItem> { settingsMenuItem, _pluginSubMenu }); }