private void OnAddClick(object sender, RoutedEventArgs e) { var window = new EditNoteWindow(_repository); if (window.ShowDialog() == true) { UpdateNotes(); } }
private void OnEditClick(object sender, RoutedEventArgs e) { if (notesBox.SelectedItem != null) { var note = notesBox.SelectedItem as Notees; var window = new EditNoteWindow(_repository, note); if (window.ShowDialog() == true) { UpdateNotes(); } } }