private async void EditCalendarNoteCommandExecuted(CalendarNoteModel obj) { RaisePropertyChanged("DisableParentWindow"); var window = new AddCalendarNoteView(obj); window.ShowDialog(); RaisePropertyChanged("EnableParentWindow"); if (window.DialogResult != null && window.DialogResult.Value) { await OnLoadCalendarNotes(); RefreshAppointments(); } }
private void AddCalendarNoteCommandExecuted() { RaisePropertyChanged("DisableParentWindow"); var window = new AddCalendarNoteView(); window.ShowDialog(); RaisePropertyChanged("EnableParentWindow"); if (window.DialogResult != null && window.DialogResult.Value) { var note = window.ViewModel.CalendarNote; _calendarNotes.Add(note); Application.Current.Dispatcher.BeginInvoke(new Action(() => Appointments.Add(ConvertCalendarNoteToAppointment(note)))); } }