public List<CapturedVideoFile> Deactivate(bool bRecordUsingPauseResume=false) { if (timer != null) { var t = timer; timer = null; t.Stop(); t.Dispose(); } if (bRecordUsingPauseResume && curVideoStatus != videoStatus.paused) { Pause(); curVideoStatus = videoStatus.paused; } else { SendKeyStroke_StartStopp(); curVideoStatus = videoStatus.stopped; } System.Threading.Thread.Sleep(2000); CaptureNewFileNames(null, null); TraceInfo.WriteLineIf(captureFileNames.Count == 0, "Unable to find video files in folder '{0}' - check your Video Working folder", workingFolder); return captureFileNames; }
public void Stop() { if(curVideoStatus == videoStatus.running || curVideoStatus == videoStatus.paused) { SendKeyStroke_StartStopp(); curVideoStatus = videoStatus.stopped; } }
//methode sending key-stroke command to resume recording software public void Resume() { if (curVideoStatus == videoStatus.paused) { SendKeyStroke_PauseResume(); curVideoStatus = videoStatus.running; } }
public void Activate(string workingFolder, bool bStartRecording = true) { this.workingFolder = workingFolder; this.started = DateTime.Now; timer = new Timer(500); timer.Elapsed += CaptureNewFileNames; timer.AutoReset = false; timer.Enabled = true; if (bStartRecording && (curVideoStatus == videoStatus.stopped)) { SendKeyStroke_StartStopp(); //Send hot-key to start recording curVideoStatus = videoStatus.running; }else if( curVideoStatus == videoStatus.paused){ Resume(); } }