private void Button1_Click(object sender, EventArgs e) { string itemName = textBox1.Text; string description = textBox2.Text; DateTime date = dateTimePicker1.Value; if (editing == false) { bool createNotification; if (this.checkBox1.Checked == true) { createNotification = true; } else { createNotification = false; } ToDoList.CreateNewToDoItem(itemName, description, false, date, createNotification); } else { ToDoList.ReplaceToDoItem(selectedToDoItem, itemName, description, selectedToDoItem.Complete, date); } ToDoList.UpdateListView(); this.Close(); }
private void LoadToDoList() { this.button1.Text = "Create New To-Do List Item"; this.comboBox1.Items.Clear(); this.comboBox1.Items.AddRange(new string[] { "Filter By: All", "Filter By: Today", "Filter By: Date", "Filter By: Incomplete", "Filter By: Complete" }); this.comboBox1.SelectedIndex = 0; ToDoList.UpdateListView(); showingNotifications = false; }
private void ComboBox1_SelectedIndexChanged(object sender, EventArgs e) { if (showingNotifications == true) { NotificationManager.UpdateNotificationViewer(); } else { ToDoList.UpdateListView(); } }
private void MarkCompleteToolStripMenuItem_Click(object sender, EventArgs e) { if (selectedItem.Complete == true) { selectedItem.Complete = false; } else { selectedItem.Complete = true; } ToDoList.UpdateListView(); }