private void UnHookNewAppointment(IAppointment appointment) { if (this.appointmentItemsControl != null) { this.appointmentItemsControl.RecycleAllAppointmentItems(); } this.AppointmentSlots.RemoveElementsByAppointment(appointment); PropertyChangedEventManager.RemoveListener(appointment, this, String.Empty); RecurrenceRuleChangedEventManager.RemoveListener(appointment, this); }
private void HookNewAppointment(IAppointment appointment) { IList <AppointmentSlot> slots = this.CreateAppointmentSlotsFromAppointment(appointment); if (slots != null) { this.AppointmentSlots.AddRange(slots); } PropertyChangedEventManager.AddListener(appointment, this, string.Empty); RecurrenceRuleChangedEventManager.AddListener(appointment, this); }