Esempio n. 1
0
 //stop function
 private void StopRecording()
 {
     gotu.Stop();
     gotu.Dispose();
     Rec = false;
     this.WindowState = System.Windows.Forms.FormWindowState.Normal;
 }
Esempio n. 2
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (gotu.Status == RecordStatus.Running)
     {
         gotu.Stop();
     }
     gotu.Dispose();
 }
Esempio n. 3
0
 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;
        }
Esempio n. 5
0
 private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (job != null)
     {
         if (job.Status == RecordStatus.Running)
         {
             job.Stop();
         }
         job.Dispose();
     }
 }
Esempio n. 6
0
 //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);
                        }
                    }
                }
            }
        }
Esempio n. 8
0
        /// <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);
            }
        }
Esempio n. 9
0
        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (screenCaptureJob != null)
            {
                if (screenCaptureJob.Status == RecordStatus.Running)
                {
                    screenCaptureJob.Stop();
                }

                screenCaptureJob.Dispose();
            }
            Environment.Exit(1);
        }
Esempio n. 10
0
 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();
 }
Esempio n. 11
0
        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);
            }
        }
Esempio n. 12
0
 public void StopRecording()
 {
     _screenCaptureJob.Stop();
     _screenCaptureJob.Dispose();
 }