private void ShowRecommendations(string artist) { lock (this) { if (recommendation_pane == null) { recommendation_pane = new RecommendationPane(); InterfaceElements.MainContainer.PackEnd(recommendation_pane, false, false, 0); } // Don't do anything if we already are showing recommendations for the // requested artist. if (PaneVisible && recommendation_pane.CurrentArtist == artist) { return; } // If we manually switch track we don't get an EndOfStream event and // must clear the recommendation pane here. if (PaneVisible) { HideRecommendations(); } recommendation_pane.ShowRecommendations(artist); } }
protected override void PluginDispose() { Globals.ActionManager.UI.RemoveUi(ui_manager_id); Globals.ActionManager.UI.RemoveActionGroup(actions); PlayerEngineCore.EventChanged -= OnPlayerEngineEventChanged; SourceManager.ActiveSourceChanged -= OnActiveSourceChanged; if (PaneVisible) { HideRecommendations(); } if (recommendation_pane != null) { recommendation_pane.Destroy(); recommendation_pane = null; } }
private void ShowRecommendations(string artist) { lock (this) { if (recommendation_pane == null) { recommendation_pane = new RecommendationPane (); InterfaceElements.MainContainer.PackEnd (recommendation_pane, false, false, 0); } // Don't do anything if we already are showing recommendations for the // requested artist. if (PaneVisible && recommendation_pane.CurrentArtist == artist) return; // If we manually switch track we don't get an EndOfStream event and // must clear the recommendation pane here. if (PaneVisible) HideRecommendations (); recommendation_pane.ShowRecommendations (artist); } }
// --------------------------------------------------------------- // private void InstallInterfaceElements() { recommendation_pane = new RecommendationPane(); InterfaceElements.MainContainer.PackEnd(recommendation_pane, false, false, 0); }
// --------------------------------------------------------------- // private void InstallInterfaceElements() { recommendation_pane = new RecommendationPane(); InterfaceElements.MainContainer.PackEnd(recommendation_pane, false, false, 0); }
protected override void PluginDispose() { Globals.ActionManager.UI.RemoveUi(ui_manager_id); Globals.ActionManager.UI.RemoveActionGroup(actions); PlayerEngineCore.EventChanged -= OnPlayerEngineEventChanged; SourceManager.ActiveSourceChanged -= OnActiveSourceChanged; if(PaneVisible) { HideRecommendations(); } if(recommendation_pane != null) { recommendation_pane.Destroy(); recommendation_pane = null; } }