예제 #1
0
파일: Form1.cs 프로젝트: Colb98/UI_Media
        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;
            }
        }
예제 #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;
        }
예제 #4
0
 private void Pause(object sender, EventArgs e)
 {
     mp.Pause();
 }
예제 #5
0
 public void Pause()
 {
     me.Pause();
 }
예제 #6
0
 public override void Pause()
 {
     player.Pause();
     IsPaused = true;
 }