private void PlayBtn_Click(object sender, RoutedEventArgs e) { if (isPaused) { MusicPlayerMediaElement.Play(); isPaused = false; } else { Play(); } }
private void PauseBtn_Click(object sender, RoutedEventArgs e) { if (isPaused) { MusicPlayerMediaElement.Play(); isPaused = false; } else { MusicPlayerMediaElement.Pause(); isPaused = true; } worker.CancelAsync(); }
private void Play() { SetSelectedItemAsMusicPlayerSource(); MusicPlayerMediaElement.Play(); isPaused = false; }