//stop function private void StopRecording() { gotu.Stop(); gotu.Dispose(); Rec = false; this.WindowState = System.Windows.Forms.FormWindowState.Normal; }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (gotu.Status == RecordStatus.Running) { gotu.Stop(); } gotu.Dispose(); }
private void Form1_FormClosing(Object sender, FormClosingEventArgs e) { if (job.Status == RecordStatus.Running) { job.Stop(); job.Dispose(); } }
private void StopButton_Click(object sender, System.EventArgs e) { stopButton.Enabled = false; startButton.Enabled = true; ScreenCaptureJob.Stop(); ScreenCaptureJob.Dispose(); ScreenCaptureJob = null; }
private void FormMain_FormClosing(object sender, FormClosingEventArgs e) { if (job != null) { if (job.Status == RecordStatus.Running) { job.Stop(); } job.Dispose(); } }
//Main Form closing event(storing variables for next use) private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Properties.Settings.Default["p1"] = p1Name.Text; Properties.Settings.Default["p2"] = p2Name.Text; Properties.Settings.Default["p3"] = p3Name.Text; Properties.Settings.Default.Save(); if (selfCapture.Status == RecordStatus.Running) { selfCapture.Stop(); } selfCapture.Dispose(); }
public void TearDown() { bool deleteRecording = true; try { if (TestContext.CurrentContext.Result.Status == TestStatus.Failed || TestContext.CurrentContext.Result.Status == TestStatus.Inconclusive) { deleteRecording = false; // Want to pause to view problem on video recording before shutting down browser Thread.Sleep(3000); } } catch (Exception ex) { CCWebUIAuto.HandleException(ex); } finally { Trace.WriteLine("Closing browser."); CCWebUIAuto.webDriver.Quit(); if (ClickPortalUI.AutoConfig.ContainsKey("EnableVideoRecording")) { if (ClickPortalUI.AutoConfig["EnableVideoRecording"].ToLower() == "true") { scj.Stop(); } scj.Dispose(); if (deleteRecording == true) { Trace.WriteLine("Removing unnecessary test recording: " + _testScreenCaptureFileName); File.Delete(_testScreenCaptureFileName); } } // kill any remaining IE or IEDriverServer processes var procCollection = Process.GetProcesses(); foreach (var proc in procCollection) { if (proc.ProcessName.StartsWith("iexplore") || (proc.ProcessName.StartsWith("IEDriverServer"))) { try { //proc.Kill(); } catch (Exception ex) { CCWebUIAuto.HandleException(ex); } } } } }
/// <summary> /// Stops video recording, and delete file if test passed succesifully /// </summary> protected void StopRecording(TestContext context) { if (recorder.Status == RecordStatus.Running) { recorder.Stop(); recorder.Dispose(); } if (context.Result.Outcome.Status != TestStatus.Failed) { File.Delete(filepath); } }
private void exitToolStripMenuItem_Click(object sender, EventArgs e) { if (screenCaptureJob != null) { if (screenCaptureJob.Status == RecordStatus.Running) { screenCaptureJob.Stop(); } screenCaptureJob.Dispose(); } Environment.Exit(1); }
private void Main_FormClosing(object sender, FormClosingEventArgs e) { // checks if the job is running and if so prompts to continue if (job != null) { if (job.Status == RecordStatus.Running) { DialogResult result = MessageBox.Show("Capturing in Progress. Are You Sure You Want To Quit?", "HD-Screen Recorder", MessageBoxButtons.YesNo); if (result == DialogResult.No) { e.Cancel = true; return; } else { job.Stop(); job.Dispose(); } } } Properties.Settings.Default.OutputPath = OutputPath; Properties.Settings.Default.Save(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (kapanis_sayaci >= 1) { if (scr.Status == RecordStatus.Running) { scr.Stop(); } scr.Dispose(); } else { System.Environment.Exit(1); } }
public void StopRecording() { _screenCaptureJob.Stop(); _screenCaptureJob.Dispose(); }