The Ultimate UI for Windows Forms 2004 Volume 2 release of WinSchedule™ includes support for Recurring Appointments. The existing Appointment object has been modified to support the concept of recurrence, where an appointment is made to occur cyclically, based on a pattern that is dictated by the associated AppointmentRecurrence object. The AppointmentRecurrence object is new to the NAS2004 Volume 2 release; when it is associated with an Appointment (by being assigned to the Appointment’s Recurrence property), it causes the Appointment to serve as a "template" that generates the individual occurrences.
To enable the creation of recurring appointments, the AllowRecurringAppointments property of the associated WinCalendarInfo component must be set to True, as the value defaults to false to provide backward compatibility.
To support the Recurring Appointments feature, a new object was added to the UltraWinSchedule assembly - the AppointmentRecurrence object. The AppointmentRecurrence object defines the frequency at which the Appointment recurs, as well as the range of dates that include activity generated by the recurrence. To make an Appointment become a recurring appointment, an instance of the AppointmentRecurrence object is created, and then assigned to the Appointment’s Recurrence property. When the AppointmentRecurrence is assigned to an Appointment, the values of any properties of the AppointmentRecurrence that have not been explicitly set are automatically obtained from the Appointment. For example, if the AppointmentRecurrence object’s RangeStartDate property has not been set, the value is obtained from the Appointment’s StartDateTime property.
When an Appointment’s Recurrence property is set to an instance of the AppointmentRecurrence object, that Appointment is said to become a "recurring appointment root". The Appointment’s IsRecurringAppointmentRoot property will return true for these appointments, and the AppointmentRecurrence object’s RootAppointment property returns a reference to that Appointment. A recurring appointment root belongs to the associated UltraCalendarInfo element’s Appointments collection, but the occurrences that it generates do not . These appointments are referred to a "non-modified occurrences". When one of these occurrences is modified in any way, it becomes what we refer to as a "variance". Unlike the non-modified occurrences, variances are added to the associated UltraCalendarInfo element’s Appointments collection. If a recurring appointment root is removed from the Appointments collection, then all appointments that were associated with its recurrence, modified or not, are removed along with it.
The following table lists the properties of the AppointmentRecurrence object, along with a brief description of how the property behaves.
As mentioned in the previous section, properties were added to the existing Appointment object to support recurrence. The following tables lists these new properties, along with a brief description of how the property behaves.
Users of previous versions of UltraWinSchedule might be familiar with the AppointmentDialog, which looks and behaves much like the appointment dialog included with MS Outlook. To provide a front end for creating and editing recurring appointments, NAS2004 Vol 2 includes the RecurrenceDialog. Also very similar to the one seen in MS Outlook, the dialog can be launched directly from the AppointmentDialog, providing the end user with the same interface that an MS Outlook user would be accustomed to.
To provide flexibility to the end developer, an event is fired before the RecurrenceDialog is displayed - BeforeDisplayAppointmentRecurrenceDialog - which can be canceled to prevent the default dialog from being displayed. A custom dialog can be displayed in its place, or no dialog at all.