Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 private void ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (showingNotifications == true)
     {
         NotificationManager.UpdateNotificationViewer();
     }
     else
     {
         ToDoList.UpdateListView();
     }
 }
Exemplo n.º 4
0
        private void MarkCompleteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (selectedItem.Complete == true)
            {
                selectedItem.Complete = false;
            }
            else
            {
                selectedItem.Complete = true;
            }

            ToDoList.UpdateListView();
        }