private void btnAdd_Click(object sender, RoutedEventArgs e) { Globals.option = "Add"; AddEditTodo dlg = new AddEditTodo(this); if (dlg.ShowDialog() == true) { RefreshList(); } }
private void lvTask_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Todo currTodo = lvTask.SelectedItem as Todo; if (currTodo == null) { return; } Globals.option = "Update"; AddEditTodo dlg = new AddEditTodo(this, currTodo); if (dlg.ShowDialog() == true) { RefreshList(); } lblStatus.Text = Globals.statusBar; }