private void btnAdd_Click(object sender, RoutedEventArgs e) { AddEditTodoDialog dialog = new AddEditTodoDialog(null); if (dialog.ShowDialog() == true) { refreshTodoList(); } }
private void lvTodos_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Todo todo = (Todo)lvTodos.SelectedItem; if (todo == null) { return; } AddEditTodoDialog dlg = new AddEditTodoDialog(todo); if (dlg.ShowDialog() == true) { refreshTodoList(); } }