Ejemplo n.º 1
0
        private void Start_Button_Click(object sender, EventArgs e)
        {
            //Startup
            Selection_TabControl.Enabled = false;
            Random_GroupBox.Enabled      = false;
            Process_GroupBox.Enabled     = false;
            Delay_GroupBox.Enabled       = false;
            Start_Button.Enabled         = false;
            Stop_Button.Enabled          = true;


            //Gather
            RandomPercentage = ((double)Random_TrackBar.Value * 0.01);
            try
            {
                Delay = Int32.Parse(Delay_TextBox.Text);
            }
            catch
            {
                MessageBox.Show("Input a integer in the Delay.");
                Stop_Button.PerformClick();
                return;
            }
            DelayOriginal = Delay;

            //Act
            if (Selection_TabControl.SelectedIndex == 0)
            {
                if (ClickLocation_CheckBox.Checked)
                {
                    try
                    {
                        ClickLocation.X = Int32.Parse(ClickLocationX_TextBox.Text);
                        ClickLocation.Y = Int32.Parse(ClickLocationY_TextBox.Text);
                    }
                    catch
                    {
                        MessageBox.Show("Input integers in the Location boxes.");
                        Stop_Button.PerformClick();
                        return;
                    }
                }
                Click_Timer.Enabled = true;
            }
            if (Selection_TabControl.SelectedIndex == 1)
            {
                Type_Timer.Enabled = true;
            }
            if (Selection_TabControl.SelectedIndex == 2)
            {
                Script_Timer.Enabled = true;
            }
        }
Ejemplo n.º 2
0
 //Action
 protected override void WndProc(ref Message m)
 {
     if (m.Msg == 0x0312)
     {
         if ((int)m.WParam == 1)
         {
             Start_Button.PerformClick();
         }
         if ((int)m.WParam == 2)
         {
             Stop_Button.PerformClick();
         }
     }
     base.WndProc(ref m);
 }