void SaveSettings() { TermDisplay.EnableTimers(false); try { INIFile config = new INIFile(); if (CurrentConnection != null) { CurrentConnection.Save(config); Properties.Settings.Default.LastConnection = config.Text; Properties.Settings.Default.Save(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void EditConnection(Connection SelectedConnection) { if (System.Diagnostics.Debugger.IsAttached) { TermDisplay.DisableTimers(); } Application.DoEvents(); ConnectionSettingsDialog dialog = new ConnectionSettingsDialog(); dialog.SelectedConnection = SelectedConnection; DialogResult result = dialog.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { CurrentConnection = dialog.SelectedConnection; } if (CurrentConnection != null && !CurrentConnection.Connected) { CurrentConnection.Connect(); } TermDisplay.EnableTimers(true); }