Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 4
0
 private void Pause(object sender, EventArgs e)
 {
     mp.Pause();
 }
Exemplo n.º 5
0
 public void Pause()
 {
     me.Pause();
 }
Exemplo n.º 6
0
 public override void Pause()
 {
     player.Pause();
     IsPaused = true;
 }