private void Init() { Settings.Default.Upgrade(); if (!Settings.Default.NeverClickerConfigValid) { this.SetButtonStateAllDisabled(); this.ConfigInvalid(); } else { this.AutomationEngine = new AutomationEngine(this); if (Settings.Default.BeginOnStartup) { int delaySecs = 10; this.SetButtonStateRunning(); this.AutoCycleTask = AutomationEngine.AutoCycle(delaySecs); } else { this.SetButtonStateStopped(); WriteLine("Automation engine ready."); WriteLine("Press 'Begin AutoCycle' above to start."); } } }
private void buttonAutoCycle_Click(object sender, EventArgs e) { this.SetButtonStateRunning(); this.AutoCycleTask = AutomationEngine.AutoCycle(0); }