/// <summary> /// Handles the Click event of the btnPlay control. /// </summary> private void btnPlay_Click(object sender, EventArgs e) { BeginInvoke(BassPlayer.PlayState == PlayState.Playing ? delegate { BassPlayer.Pause(); } : new MethodInvoker(delegate { BassPlayer.Play(); })); btnPause.Visible = BassPlayer.PlayState == PlayState.Playing; btnPlay.Visible = BassPlayer.PlayState != PlayState.Playing; }
private void Pause_Click(object sender, RoutedEventArgs e) { MediaPlayer.Pause(); }