注:Appointment がすでに削除されているため、その Appointment.IsVariance プロパティはもう有効ではありません。AfterRecurringAppointmentDeletedEventArgs の Variance プロパティを使用して、削除される前に予定がバリアンスであったかどうかを判断します。
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports System.Diagnostics Private Sub ultraCalendarInfo1_AfterRecurringAppointmentDeleted(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.AfterRecurringAppointmentDeletedEventArgs) Handles ultraCalendarInfo1.AfterRecurringAppointmentDeleted ' The 'AfterRecurringAppointmentDeleted' is invoked after a ' recurring appointment series or individual occurrence is deleted. ' The 'Appointment' parameter is the appointment being deleted ' whether it is an individual appointment (i.e. a variance) or ' the root (or series) appointment. The 'IsVariance' and ' 'IsRecurringAppointmentRoot' can be used to determine whether ' the appointment being deleted is an individual instance of the ' recurrence or the entire series. Note, when the series is ' deleted (i.e. e.IsRecurringAppointmentRoot is true), the ' recurrence information will not be available as that is removed ' once the root appointment is removed. ' If (e.IsRecurringAppointmentRoot) Then Debug.WriteLine(String.Format("The recurring appointment series '{0}' was deleted.", e.Appointment.Subject)) ElseIf (e.IsVariance) Then Debug.WriteLine(String.Format("The variance of '{0}' for the occurrence on '{1}' was deleted.", e.Appointment.RecurringAppointmentRoot.Subject, e.Appointment.OriginalStartDateTime)) End If End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.Diagnostics; private void ultraCalendarInfo1_AfterRecurringAppointmentDeleted(object sender, Infragistics.Win.UltraWinSchedule.AfterRecurringAppointmentDeletedEventArgs e) { // The 'AfterRecurringAppointmentDeleted' is invoked after a // recurring appointment series or individual occurrence is deleted. // The 'Appointment' parameter is the appointment being deleted // whether it is an individual appointment (i.e. a variance) or // the root (or series) appointment. The 'IsVariance' and // 'IsRecurringAppointmentRoot' can be used to determine whether // the appointment being deleted is an individual instance of the // recurrence or the entire series. Note, when the series is // deleted (i.e. e.IsRecurringAppointmentRoot is true), the // recurrence information will not be available as that is removed // once the root appointment is removed. // if (e.IsRecurringAppointmentRoot) Debug.WriteLine( string.Format("The recurring appointment series '{0}' was deleted.", e.Appointment.Subject) ); else if (e.IsVariance) Debug.WriteLine( string.Format("The variance of '{0}' for the occurrence on '{1}' was deleted.", e.Appointment.RecurringAppointmentRoot.Subject, e.Appointment.OriginalStartDateTime) ); }