/********************************************************************************/ /* * Delete only the selected items in the checkList * */ private void removeSelectedTodoTodaybutton_Click(object sender, EventArgs e) { int lastIndex = TodoTodaycheckedListBox.Items.Count - 1; for (int i = lastIndex; i >= 0; i--) { if (TodoTodaycheckedListBox.GetItemCheckState(i) == CheckState.Checked) { TodoTodaycheckedListBox.Items.RemoveAt(i); } } }
/********************************************************************************/ /* * moves the selected items from the 'todo' checklist box to the 'stand by' * tasks check box * */ private void moveToStandByButton_Click(object sender, EventArgs e) { int lastIndex = TodoTodaycheckedListBox.Items.Count - 1; for (int i = lastIndex; i >= 0; i--) { if (TodoTodaycheckedListBox.GetItemCheckState(i) == CheckState.Checked) { standByCheckedListBox.Items.Add(TodoTodaycheckedListBox.Items[i]); TodoTodaycheckedListBox.Items.RemoveAt(i); } } }