Ejemplo n.º 1
0
        public void PauseRecording()
        {
            RecordingTimer.Stop();
            CaptureFacede.PauseCapturingVideoToFile();

            this.IsRecording = false;
            State            = CaptureMovieProcessFlowStates.PausedRecording;
            Stage            = CaptureMovieProcessFlowStage.Stopped;
        }
Ejemplo n.º 2
0
 public void ToggleStartPause()
 {
     if (Stage == CaptureMovieProcessFlowStage.Stopped || Stage == CaptureMovieProcessFlowStage.CountingDownTillRecording)
     {
         if (PreRecordingTimer == null)
         {
             PreRecordingTimer          = new DispatcherTimer();
             PreRecordingTimer.Tick    += new EventHandler(StartMovieDelay_Timer);
             PreRecordingTimer.Interval = new TimeSpan(0, 0, 1);
             PreRecordingTimer.Start();
             State                = CaptureMovieProcessFlowStates.CountingDownTillRecording;
             Stage                = CaptureMovieProcessFlowStage.CountingDownTillRecording;
             Seconds              = 3;
             TextBlock.Text       = "You have " + Seconds.ToString() + " seconds before recording starts...";
             TextBlock.Visibility = System.Windows.Visibility.Visible;
             IsRecording          = true;
         }
         else
         {
             if (PreRecordingTimer.IsEnabled)
             {
                 PreRecordingTimer.Stop();
                 IsRecording = false;
                 State       = CaptureMovieProcessFlowStates.PausedCountingDownTillRecording;
             }
             else
             {
                 PreRecordingTimer.Start();
                 State       = CaptureMovieProcessFlowStates.CountingDownTillRecording;
                 IsRecording = true;
             }
         }
     }
     else
     {
         if (RecordingTimer != null)
         {
             if (RecordingTimer.IsEnabled)
             {
                 RecordingTimer.Stop();
                 State = CaptureMovieProcessFlowStates.PausedRecording;
                 CaptureFacede.PauseCapturingVideoToFile();
                 IsRecording = false;
             }
             else
             {
                 RecordingTimer.Start();
                 State = CaptureMovieProcessFlowStates.Recording;
                 CaptureFacede.ResumeCapturingVideoToFile();
                 IsRecording = true;
             }
         }
     }
 }