コード例 #1
0
ファイル: TerminalWindow.cs プロジェクト: whble/crterm
 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);
     }
 }
コード例 #2
0
ファイル: TerminalWindow.cs プロジェクト: whble/crterm
        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);
        }