Inheritance: System.Windows.Forms.Form
Exemple #1
0
        private void editConnString_Click(object sender, EventArgs e)
        {
            ConnectionStringEditorDlg dlg = new ConnectionStringEditorDlg();

            try
            {
                dlg.ConnectionString = connectionString.Text;
                if (DialogResult.Cancel == dlg.ShowDialog(this))
                {
                    return;
                }
                connectionString.Text = dlg.ConnectionString;
            }
            catch (ArgumentException)
            {
                MessageBox.Show(this, Resources.ConnectionStringInvalid, Resources.ErrorTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #2
0
        private void btnEditSM_Click(object sender, EventArgs e)
        {
            ConnectionStringEditorDlg dlg = new ConnectionStringEditorDlg();

            try
            {
                dlg.ConnectionString = txtConnStringSM.Text;
                if (DialogResult.Cancel == dlg.ShowDialog(this))
                {
                    return;
                }
                txtConnStringSM.Text = dlg.ConnectionString;
            }
            catch (ArgumentException)
            {
                InfoDialog.ShowDialog(InfoDialogProperties.GetErrorDialogProperties(Resources.ErrorTitle, Resources.ConnectionStringInvalid));
            }
        }
Exemple #3
0
 private void editConnString_Click(object sender, EventArgs e)
 {
   ConnectionStringEditorDlg dlg = new ConnectionStringEditorDlg();
   try
   {
     dlg.ConnectionString = connectionString.Text;
     if (DialogResult.Cancel == dlg.ShowDialog(this)) return;
     connectionString.Text = dlg.ConnectionString;
   }
   catch (ArgumentException)
   {
     MessageBox.Show(this, Resources.ConnectionStringInvalid, Resources.ErrorTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
   }
 }