private void AutoThread() { if (auto == null) { auto = new AutoLessPush(s => lblState.Text = s); } var paths = auto.Run(game); lblGame.Enabled = true; Application.DoEvents(); if (paths == null) { isAuto = false; } else { //this.Activate(); AutoRun(paths); } isAuto = false; AutoNext(); Thread.CurrentThread.Abort(); }