'宣言 Public Event BeforeRecurringAppointmentDeleted As BeforeRecurringAppointmentDeletedEventHandler
public event BeforeRecurringAppointmentDeletedEventHandler BeforeRecurringAppointmentDeleted
イベント ハンドラが、このイベントに関連するデータを含む、BeforeRecurringAppointmentDeletedEventArgs 型の引数を受け取りました。次の BeforeRecurringAppointmentDeletedEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 解説 |
---|---|
Appointment Infragistics.Win.UltraWinSchedule.CancelableAppointmentEventArgsから継承されます。 | イベントに関連付けられたAppointmentオブジェクトを返します。このプロパティは読み取り専用です。 |
Cancel System.ComponentModel.CancelEventArgsから継承されます。 | |
Recurrence | 削除される Appointment が関連付けられている AppointmentRecurrence を返します。プロパティは読み取り専用です。 |
RecurrenceEditType | シリーズ全体と個々の回のどちらを削除するか、またはユーザーが選択できるように確認メッセージを表示するかを指定します。 |
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports System.Diagnostics Private Sub ultraCalendarInfo1_BeforeRecurringAppointmentDeleted(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.BeforeRecurringAppointmentDeletedEventArgs) Handles ultraCalendarInfo1.BeforeRecurringAppointmentDeleted ' The 'BeforeRecurringAppointmentDeleted' is invoked before a ' recurring appointment is deleted and provides a chance to ' prevent the deletion or modify what the user is deleting. ' ' The 'RecurrenceEditType' parameter is used to determine ' what will be deleted. When left to the default of 'UserSelect', ' the user will be prompted whether they would like to ' delete the individual occurrence or the entire series. ' This property can also be changed here to prevent that prompt. ' The following code only allows the user to remove ' occurances of a recurring appointment unless the ' appointment has not begun yet. ' If e.Appointment.StartDateTime > DateTime.Now Then e.RecurrenceEditType = RecurrenceEditType.Series Else e.RecurrenceEditType = RecurrenceEditType.Occurrence End If ' To prevent the deletion of the appointment, set the ' 'Cancel' parameter to true If e.Recurrence.PatternFrequency = RecurrencePatternFrequency.Yearly Then e.Cancel = True End If End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.Diagnostics; private void ultraCalendarInfo1_BeforeRecurringAppointmentDeleted(object sender, Infragistics.Win.UltraWinSchedule.BeforeRecurringAppointmentDeletedEventArgs e) { // The 'BeforeRecurringAppointmentDeleted' is invoked before a // recurring appointment is deleted and provides a chance to // prevent the deletion or modify what the user is deleting. // // The 'RecurrenceEditType' parameter is used to determine // what will be deleted. When left to the default of 'UserSelect', // the user will be prompted whether they would like to // delete the individual occurrence or the entire series. // This property can also be changed here to prevent that prompt. // The following code only allows the user to remove // occurances of a recurring appointment unless the // appointment has not begun yet. // if (e.Appointment.StartDateTime > DateTime.Now) e.RecurrenceEditType = RecurrenceEditType.Series; else e.RecurrenceEditType = RecurrenceEditType.Occurrence; // To prevent the deletion of the appointment, set the // 'Cancel' parameter to true if (e.Recurrence.PatternFrequency == RecurrencePatternFrequency.Yearly) e.Cancel = true; }