Beispiel #1
0
        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();
            }
        }
Beispiel #2
0
        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))));
            }
        }