Example #1
0
        private void addToNowPlaying_Click(object sender, RoutedEventArgs e)
        {
            MenuFlyoutItem item = sender as MenuFlyoutItem;

            if (item != null)
            {
                Song   song   = item.DataContext as Song;
                Album  album  = item.DataContext as Album;
                Artist artist = item.DataContext as Artist;

                if (song != null)
                {
                    NowPlayingManager.AddToNowPlaying(song);
                }
                else if (album != null)
                {
                    NowPlayingManager.AddToNowPlaying(album);
                }
                else if (artist != null)
                {
                    NowPlayingManager.AddToNowPlaying(artist);
                }
                if (Settings.Instance.AddToNowPlayingSwitchesView)
                {
                    this.Frame.Navigate(typeof(NowPlaying), null);
                }
            }
        }
 private void addToNowPlaying_Click(object sender, RoutedEventArgs e)
 {
     NowPlayingManager.AddToNowPlaying(_currentArtist);
     if (Settings.Instance.AddToNowPlayingSwitchesView)
     {
         SwitchToNowPlayingView(null);
     }
 }
        private void addSongToNowPlaying_Click(object sender, RoutedEventArgs e)
        {
            MenuFlyoutItem item = sender as MenuFlyoutItem;

            if (item != null)
            {
                Song song = item.DataContext as Song;

                if (song != null)
                {
                    NowPlayingManager.AddToNowPlaying(song);
                    if (Settings.Instance.AddToNowPlayingSwitchesView)
                    {
                        SwitchToNowPlayingView(null);
                    }
                }
            }
        }
        private void addPlaylistToNowPlaying_Click(object sender, RoutedEventArgs e)
        {
            MenuFlyoutItem item = sender as MenuFlyoutItem;

            if (item != null)
            {
                Playlist playlist = item.DataContext as Playlist;

                if (playlist != null)
                {
                    NowPlayingManager.AddToNowPlaying(playlist);
                    if (Settings.Instance.AddToNowPlayingSwitchesView)
                    {
                        SwitchToNowPlayingView(new KeyValuePair <Playlist, int>(playlist, 0));
                    }
                }
            }
        }