private void MainWindow_Load(object sender, EventArgs e) { Thread startupThread = new Thread(new ThreadStart(() => { BotRunnerOptions.ReadOptions(); ReadBotsFromConfigFile(); botManager.Start(); })); startupThread.Start(); StartingUpForm form = new StartingUpForm(startupThread); form.Show(); form.BringToFront(); form.StartupFinished += new StartingUpForm.StartupFinishedCallback(() => { updateTimer.Start(); botManager.BalanceBots = BotRunnerOptions.GetValueBool("AutoBotRemoveEnabled"); botManager.OnBotChange += new BotManager.BotChangeCallback(botManager_OnBotChange); botManager.OnTextWrite += new BotManager.PrinterCallback(InsertTextIntoConsole); Visible = true; BringToFront(); RefreshBotList(); }); }
private void cancelButton_Click(object sender, EventArgs e) { BotRunnerOptions.ReadOptions(); Close(); }