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); } }
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)); } }
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); } }