private void schedulerStorage1_FilterAppointment(object sender, PersistentObjectCancelEventArgs e)
        {
            Appointment   apt0 = e.Object as Appointment;
            Appointment   apt  = GetAppointmentPattern(apt0);
            XPAppointment row  = (XPAppointment)schedulerStorage1.GetObjectRow(apt);

            if (!AppointmentHash.ContainsKey(row))
            {
                AppointmentHash.Add(row, apt);
            }
            else
            {
                AppointmentHash.Remove(row);
                AppointmentHash.Add(row, apt);
            }
        }
 // Fill in the appointment's hash table using the FilterAppointment event.
 private void schedulerStorage1_AppointmentCollectionLoaded(object sender, EventArgs e)
 {
     foreach (Appointment apt in schedulerStorage1.Appointments.Items)
     {
         XPAppointment row = (XPAppointment)schedulerStorage1.GetObjectRow(apt);
         if (!AppointmentHash.ContainsKey(row))
         {
             AppointmentHash.Add(row, apt);
         }
         else
         {
             AppointmentHash.Remove(row);
             AppointmentHash.Add(row, apt);
         }
     }
 }