public void stop() { if (ClickTiicker.Enabled == true) { rbtnByCursor.Enabled = true; rbtnByFixed.Enabled = true; timesText.Enabled = true; intervalText.Enabled = true; clicktypeCombo.Enabled = true; selectbuttonCombo.Enabled = true; btnStart.Enabled = true; ClickTiicker.Stop(); WorkingStatusLabel.Text = "Not Clicking"; WorkingStatusLabel.ForeColor = Color.Red; } else { MessageBox.Show("AutoClicker is not running", "Not running"); } }
public void start() { if (ClickTiicker.Enabled == true) { MessageBox.Show("AutoClickerro already running", "Already running"); } else { bool interval_error = false; bool times_error = false; int timerinterv = 1000; currentclick = 0; try { timerinterv = Convert.ToInt32(intervalText.Text); if (intervalDivider) { timerinterv *= 1000; } } catch { interval_error = true; } try { clickamount = Convert.ToInt32(timesText.Text); } catch { times_error = true; } if (interval_error == false) { if (times_error == false) { if (rbtnByCursor.Checked == true) { clickatcursor = true; } else { clickatcursor = false; } WorkingStatusLabel.Text = "Clicking....."; WorkingStatusLabel.ForeColor = Color.Green; //dissable buttons rbtnByCursor.Enabled = false; rbtnByFixed.Enabled = false; timesText.Enabled = false; intervalText.Enabled = false; clicktypeCombo.Enabled = false; selectbuttonCombo.Enabled = false; btnStart.Enabled = false; ClickTiicker.Interval = timerinterv; ClickTiicker.Start(); } else { MessageBox.Show("Invalid times to click entered", "Invalid click amount"); } } else { MessageBox.Show("Invalid interval entered", "Invalid interval"); } } }