private void RecoverAppointment(Appointment appointment) { FlowDocument document = appointment.DetailsDocument; appointment.SaveChangesToDisk = true; appointment.DetailsDocument = document; AppointmentDatabase.UpdateAppointment(appointment); new RecoveryDatabase(RecoveryVersion.LastRun).RecoveryAppointment = null; if (calendarDisplayMode == CalendarMode.Day) { if ((appointment.IsRepeating && appointment.OccursOnDate(dayView.Date)) || (!appointment.IsRepeating && appointment.StartDate <= dayView.Date && appointment.EndDate >= dayView.Date)) { dayView.Refresh(); } } else if (calendarDisplayMode == CalendarMode.Month) { // TODO: Only refresh if appointment occurs in specified month. monthView.Refresh(); } else if (calendarDisplayMode == CalendarMode.Week) { // TODO: Only refresh in appointment occurs in specified week. weekView.Refresh(); } CalendarPeekContent.RefreshAll(); }
private void Resize_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (_isResized) { _isResized = false; AppointmentDatabase.UpdateAppointment(_appointment); CalendarPeekContent.RefreshAll(); } Mouse.Capture(null); }