예제 #1
0
        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 ShowRecommendations(string artist)
        {
            lock (this) {
                if (recommendation_pane == null)
                {
                    InstallInterfaceElements();
                }

                // Don't do anything if we already are showing recommendations for the
                // requested artist.
                if (PaneVisible && recommendation_pane.CurrentArtist == artist)
                {
                    return;
                }

                current_artist = artist;

                // 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);

                displayed_on_source = SourceManager.ActiveSource;
                displayed_on_artist = artist;
            }
        }