コード例 #1
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            AddEditTodoDialog dlg = new AddEditTodoDialog(null);

            if (dlg.ShowDialog() == true)
            {
                lvTodos.ItemsSource = Global.db.GetAllTodos();
            }
        }
コード例 #2
0
        private void lvTodos_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            Todo todo = (Todo)lvTodos.SelectedItem;

            if (todo == null)
            {
                return;
            }
            AddEditTodoDialog dlg = new AddEditTodoDialog(null);

            if (dlg.ShowDialog() == true)
            {
                lvTodos.ItemsSource = Global.db.GetAllTodos();
            }
        }