private void ButtonAdvancedClick(object sender, EventArgs e) { using (var advancedForm = new SqlConnectionForm()) { this.FillSqlConnectionStringBuilder(); // create copy to be able cancel the edit var currentConnectionCopy = new SqlConnectionStringBuilder(this.connectionStringBuilder.ToString()); advancedForm.DataSource = currentConnectionCopy; if (advancedForm.ShowDialog() == DialogResult.OK) { this.FillSqlControlsFromConnecitonBuilder(currentConnectionCopy); } } }