private void buttonDelete_Click(object sender, EventArgs e) { string command = comboBoxCommand.Text; string device = comboBoxDeviceAddress.Text; if (MessageBox.Show("Really delete?", "Confirm delete", MessageBoxButtons.YesNo) == DialogResult.Yes) { dbMgr.RemoveCommand(device, command); dbMgr.SaveConfig(); this.Close(); } }