Example #1
0
        private void TodoControl_EditEntryClicked(Todo todo)
        {
            var editWindow = new AddEditTaskWindow(todo);

            editWindow.TodoEdited += (Todo editedTodo) =>
            {
                Conf.DatabaseHelper.EditTodo(editedTodo);
                GetTasksForDay(GetSelectedDay());
                RefreshDatesCombobox();
            };
            editWindow.Show();
        }
Example #2
0
        private void AddTodoBtn_MouseDown(object sender, MouseButtonEventArgs e)
        {
            var addWindow = new AddEditTaskWindow(null);

            addWindow.TodoCreated += (DateTime date, string desc) =>
            {
                Conf.DatabaseHelper.CreateTodo(desc, date);
                GetTasksForDay(GetSelectedDay());
                RefreshDatesCombobox();
            };
            addWindow.Show();
        }