示例#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;
 }