private void Form1_FormClosed(object sender, FormClosedEventArgs e) { int tries = 0; Start: try { GameHandle.StopTheGame(); bot.Stop(); } catch (Exception exc) { tries++; if (tries < 10) { goto Start; } } }
private void CancelGame() { GameHandle.StopTheGame(); }