private void PlaylistView_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var dep = (e.OriginalSource as DependencyObject).VisualUpwardSearch <System.Windows.Controls.ListViewItem>();

            if (dep == null)
            {
                return;
            }
            var item  = (IMusicInfo)PlaylistView.ItemContainerGenerator.ItemFromContainer(dep);
            var index = Playlist.ShuffledIndexOf(item);

            if (index < 0 || index >= Playlist.Count)
            {
                return;
            }
            PlaybackManagerInstance.NowPlayingId = index;
            if (PlaybackManagerInstance.CurrentState != PlaybackState.Playing)
            {
                PlaybackManagerInstance.PlayPauseResume();
            }
        }
 private void PlayPauseResume_Click(object sender, RoutedEventArgs e)
 {
     PlaybackManagerInstance.PlayPauseResume();
 }
Beispiel #3
0
 private void PlayButton_Click(object sender, EventArgs e)
 {
     DoFocusChange();
     PlaybackManagerInstance.PlayPauseResume();
 }