private void btnAdd_Click(object sender, RoutedEventArgs e) { AddEditTodoDialog dlg = new AddEditTodoDialog(null); if (dlg.ShowDialog() == true) { lvTodos.ItemsSource = Global.db.GetAllTodos(); } }
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(); } }