示例#1
0
 private void setDefault()
 {
     current            = 0;
     this.textBoxX.Text = defaultCaptue.CaptureSetting.StartX.ToString();
     this.textBoxY.Text = defaultCaptue.CaptureSetting.StartY.ToString();
     this.textBoxW.Text = defaultCaptue.CaptureSetting.Width.ToString();
     this.textBoxH.Text = defaultCaptue.CaptureSetting.Height.ToString();
     args.Clear();
     handler = null;
     started = false;
     this.pictureBox1.Image = null;
     this.pictureBox2.Image = null;
 }
示例#2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (!this.args.Any())
     {
         MessageBox.Show("Please set up a capture area first");
     }
     else
     {
         if (!started)
         {
             if (handler == null)
             {
                 handler = new EventDrivenCapture.CaptureEventHandler(args.ToArray());
             }
             handler.CapturedEventHandler  += captured;
             handler.ExceptionEventHandler += exception;
             handler.CanceledEventHandler  += canceled;
             handler.Start();
             started = true;
         }
     }
 }