/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAdd_Click(object sender, EventArgs e) { using (FormConnection formConnection = new FormConnection()) { if (formConnection.ShowDialog(this) == System.Windows.Forms.DialogResult.Cancel) { return; } LoadConnections(); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnEdit_Click(object sender, EventArgs e) { if (listConnections.SelectedObjects.Count != 1) { return; } Connection connection = (Connection)listConnections.SelectedObjects[0]; using (FormConnection formConnection = new FormConnection(connection)) { if (formConnection.ShowDialog(this) == System.Windows.Forms.DialogResult.Cancel) { return; } LoadConnections(); } }