private void MainWindow_Load(object sender, EventArgs e) { HistoryCache.Load(HistoryFileName); foreach (string arg in Environment.GetCommandLineArgs()) { if (arg.Replace('-', '/').StartsWith("/launchlast", StringComparison.InvariantCultureIgnoreCase)) { Launcher dlg = new Launcher(); dlg.StartPosition = FormStartPosition.CenterScreen; dlg.Server = serverList.SelectedServer; dlg.Account = accountList.SelectedAccount; dlg.ShowDialog(); if (dlg.Success) { Close(); } } } }
private void MainWindow_FormClosing(object sender, FormClosingEventArgs e) { settings.Save(); HistoryCache.Save(HistoryFileName); }