private void Play_Click(object sender, EventArgs e) { CircularButton btn = (CircularButton)sender; if (FilePath == null || FilePath.Count == 0) { return; } if (playing == false) { mediaPlayer.Play(); playing = true; btn.BackgroundImage = UI_Media.Properties.Resources.pause; System.Windows.Forms.Integration.ElementHost spectrum = (System.Windows.Forms.Integration.ElementHost)playingUC2.Controls.Find("elementHost1", true)[0]; spectrum.Visible = true; } else if (playing == true) { mediaPlayer.Pause(); playing = false; btn.BackgroundImage = UI_Media.Properties.Resources.play_button; System.Windows.Forms.Integration.ElementHost spectrum = (System.Windows.Forms.Integration.ElementHost)playingUC2.Controls.Find("elementHost1", true)[0]; spectrum.Visible = false; } }
public bool pause() { bool ret = false; player.Dispatcher.Invoke(new Action(() => { if (player.CanPause) { playPauseImg.Image = Properties.Resources.play; player.Pause(); isPlaying = false; tmrSongPlayed.Pause(); try { revealedStream = new RevealedStream(revealedLink); revealedStream.Show(); } catch { } ret = true; } ret = false; })); return(ret); }
public void Pause() { player.Pause(); currState = AudioState.PAUSED; }
private void Pause(object sender, EventArgs e) { mp.Pause(); }
public void Pause() { me.Pause(); }
public override void Pause() { player.Pause(); IsPaused = true; }