예제 #1
0
 public void CommandTogglePlayPause()
 {
     if (player.IsPlaying)
     {
         player.Pause();
     }
     else
     {
         player.Play();
     }
 }
예제 #2
0
 private void m_Template_TemplatePaused(object sender, PausedEventArgs e)
 {
     if (vlcControl.IsPlaying)
     {
         vlcControl.Pause();
     }
 }
예제 #3
0
 private void TrackBar_MouseDown(object sender, MouseEventArgs e)
 {
     if (vlcControl != null)
     {
         vlcControl.Pause();
     }
 }
예제 #4
0
파일: FormPlayer.cs 프로젝트: VPKSoft/vamp
        /// <summary>
        /// Toggles the playback state between pause and play and shows the correct button for the playback state.
        /// </summary>
        private void TogglePause()
        {
            if (startPlay)                                // If the media has been set by calling the overloaded method VlcControl.SetMedia()
            {
                if (vlcControl.IsPlaying && !IsDvdMode()) // If the VlcControl class instance is playing, then pause.. (if not DVD (menus, etc.. --> can be annoying!))..
                {
                    vlcControl.Pause();
                    if (statistic != null) // this ensures that a saved playback will not be re-read from previous statistics..
                    {
                        statistic.Position = vlcControl.Time;
                    }

                    btnPlay.Visible  = true; // Set the button visibility
                    btnPause.Visible = false;
                }
                else // .. if the VlcControl class instance's playback state is paused, then play..
                {
                    if (startPlay) // avoid the play command to reload the saved playback position..
                    {
                        Database.UpdateFile(file.FullName, vlcControl.Time, vlcControl.Length, IsWacthed, Volume);
                    }

                    if (statistic != null && file != null)
                    {
                        statistic.Position = vlcControl.Time;
                    } // END: avoid the play command to reload the saved playback position..

                    vlcControl.Play();
                    btnPlay.Visible  = false; // Set the button visibility
                    btnPause.Visible = true;
                }
                wind   = false; // don't wind while paused or play is clicked
                rewind = false; // don't rewind while paused or play is clicked
            }
        }
예제 #5
0
 private void videoPauseButton_Click(object sender, EventArgs e)
 {
     if (vlcControl != null)
     {
         if (vlcControl.IsPlaying)
         {
             vlcControl.Pause();
         }
     }
 }
예제 #6
0
 private void vlcControl1_Click(object sender, EventArgs e)
 {
     if (_vlcControl1.IsPlaying == true)
     {
         _vlcControl1.Pause();
     }
     else if (_vlcControl1.IsPlaying == false)
     {
         _vlcControl1.Play();
     }
 }
예제 #7
0
 public override void Pause()
 {
     if (media != null && playState == PlayState.Playing || playState == PlayState.Paused)
     {
         vlcCtrl.Pause();
         if (media.State == States.Paused)
         {
             playState = PlayState.Paused;
         }
         else
         {
             playState = PlayState.Playing;
         }
     }
 }
예제 #8
0
 /// <summary>
 /// Pause/Resume playback on the selected Vlc control
 /// </summary>
 /// <param name="vlc">Vlc control to toggle</param>
 public static void TogglePause(VlcControl vlc)
 {
     if (vlc != null)
     {
         if (vlc.State == Vlc.DotNet.Core.Interops.Signatures.MediaStates.Paused)
         {
             vlc.Play();
             log.Debug(string.Format("{0} resume playing", vlc.Name));
         }
         else if (vlc.State == Vlc.DotNet.Core.Interops.Signatures.MediaStates.Playing)
         {
             vlc.Pause();
             log.Debug(string.Format("{0} pause", vlc.Name));
         }
     }
 }
예제 #9
0
 /// <summary>
 /// Pauses this instance.
 /// </summary>
 /// <returns>Task.</returns>
 public void Pause()
 {
     _vlcControl.Pause();
 }
예제 #10
0
 private void Pause(object o)
 {
     _player.Pause();
     IsPlaying = false;
 }
예제 #11
0
파일: Form1.cs 프로젝트: VijayRed01/TS1_C
 private void button8_Click(object sender, EventArgs e)
 {
     control.Pause();
 }