예제 #1
0
 private void btnLoadTest_Click(object sender, EventArgs e)
 {
     // Note: we bring the target application into the foreground because
     //       windowed Direct3D applications have a lower framerate
     //       if not the currently focused window
     _captureProcess.BringProcessWindowToFront();
     start = DateTime.Now;
     progressBar1.Maximum = Convert.ToInt32(txtNumber.Text);
     progressBar1.Minimum = 0;
     progressBar1.Step    = 1;
     progressBar1.Value   = 0;
     DoRequest();
 }
예제 #2
0
 private void btnCapture_Click(object sender, EventArgs e)
 {
     /*start = DateTime.Now;
      * progressBar1.Maximum = 1;
      * progressBar1.Step = 1;
      * progressBar1.Value = 0;
      *
      * DoRequest();*/
     isbench = !isbench;
     benchmarking.IsBenchmarking = isbench;
     txtDebugLog.Text            = (isbench.ToString() + " <-- Current state of 'isbench' bool." + " Here is the other bool: " + benchmarking.IsBenchmarking);
     _captureProcess.BringProcessWindowToFront();
     benchmarking.IfTrue();
 }
예제 #3
0
 public Bitmap getScreenshot()
 {
     _captureProcess.BringProcessWindowToFront();
     return(_captureProcess.CaptureInterface.GetScreenshot(Rectangle.Empty, new TimeSpan(0, 0, 3), null, ImageFormat.Png).ToBitmap());
 }
예제 #4
0
 public Screenshot Capture()
 {
     CaptureProcess.BringProcessWindowToFront();
     var scrn = CaptureProcess.CaptureInterface.GetScreenshot(new Rectangle(0, 0, 0, 0), new TimeSpan(0, 0, 1), null, ImageFormat.PixelData);
     return scrn;
 }
예제 #5
0
 public void SetForeground()
 {
     captureProcess.BringProcessWindowToFront();
 }