public static void InitBotClient() { while (true) { try { NetworkCredential nc = new NetworkCredential(Properties.Settings.Default.SBFLUsername, Properties.Settings.Default.SBFLPassword); BotClient = new SbflClient(nc); BotClient.GetGames(); break; } catch (WebException) { SettingsForm sf = new SettingsForm(); if (sf.ShowDialog() != DialogResult.OK) return; } } }
private void tsmSettings_Click(object sender, EventArgs e) { SettingsForm sf = new SettingsForm(); sf.ShowDialog(this); Program.InitBotClient(); }