Example #1
0
 private void MouseClicked(Point pt)
 {
     ClickPattern.AddPoint(pt.x, pt.y, Int32.Parse(Internal_interval.Text));
     MessageWindow.Items.Add("Added point (" + pt.x + ", " + pt.y + ")");
     MouseInterceptor.OnClick -= MouseClicked;
     this.WindowState          = FormWindowState.Normal;
     this.Activate();
 }
Example #2
0
 private void AddPoint_Click(object sender, EventArgs e)
 {
     if (Xpos.Text == "" && Ypos.Text == "")
     {
         this.WindowState          = FormWindowState.Minimized;
         MouseInterceptor.OnClick += MouseClicked;
     }
     else if (Xpos.Text == "" || Ypos.Text == "")
     {
         ToolTip tip = new ToolTip();
         tip.IsBalloon    = true;
         tip.InitialDelay = 0;
         tip.ShowAlways   = true;
         tip.Show("Need two numbers!", this.Xpos, 2000);
     }
     else
     {
         ClickPattern.AddPoint(Int32.Parse(Xpos.Text), Int32.Parse(Ypos.Text),
                               Int32.Parse(Internal_interval.Text));
         MessageWindow.Items.Add("Point added (" + Xpos.Text + ", " + Ypos.Text + ")");
     }
 }