private void BtnEditTimer_Click(object sender, EventArgs e) { if (TimerCLB.SelectedIndex != -1) { EditEntry editEntry = new EditEntry(); editEntry.Show(); } else { MessageBox.Show("You must select an entry to edit!", "Select Entry", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void BtnEditAlarm_Click(object sender, EventArgs e) { if (AlarmCLB.SelectedIndex != -1) { EditEntry editEntry = new EditEntry(); editEntry.Show(); } else { //nothing selected, error between floor & keyboard MessageBox.Show("You must select an entry to edit!", "Select Entry", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }