'宣言 Public Enum DayViewEventIds Inherits System.Enum
public enum DayViewEventIds : System.Enum
メンバ | 解説 |
---|---|
AfterActiveOwnerChanged | アクティブオーナーが変更された後に発生するイベントのイベントID。 |
AfterAppointmentEdited | 予定が編集済み。 |
AfterAppointmentResized | 予定がサイズ変更済み。 |
AfterAppointmentsDeleted | 予定が削除済み。 |
AfterAppointmentsMoved | 予定が移動済み。 |
AfterDisplayPopupMenu | ポップアップが表示済み。 |
AfterPerformAction | AfterPerformActionイベントを識別するイベントID。 |
AfterScroll | コントロールがスクロール済み。 |
AfterTimeSlotSelectionChanged | タイムスロットが選択済み。 |
AppointmentsDragComplete | AppointmentsDragCompleteイベントを識別するイベントID。 |
BeforeActiveOwnerChanged | アクティブオーナーが変更される前に発生するイベントのイベントID。 |
BeforeAppointmentEdited | 予定が編集される直前。 |
BeforeAppointmentResized | 予定がサイズ変更される直前。 |
BeforeAppointmentsDeleted | 予定が削除される直前。 |
BeforeAppointmentsMoved | 予定が移動される直前。 |
BeforeAppointmentToolTipDisplayed | 予定ツールチップが表示される直前。 |
BeforeDisplayPopupMenu | ポップアップが表示される直前。 |
BeforeHolidayToolTipDisplayed | BeforeHolidayToolTipDisplayed イベントを識別します。 |
BeforePerformAction | BeforePerformActionイベントを識別するイベントID。 |
BeforeScroll | コントロールがスクロールされる直前。 |
BeforeTimeSlotSelectionChanged | タイムスロットが選択される直前。 |
GestureCompleted | GestureCompleted イベント。 |
GestureQueryStatus | GestureQueryStatus イベント。 |
GestureStarting | GestureStarting イベント。 |
InitializeVisibleDay | VisibleDayが初期化されるときに発生するイベントのイベントID。 |
PanGesture | PanGesture イベント。 |
PressAndHoldGesture | PressAndHoldGesture イベント。 |
PressAndTapGesture | PressAndTapGesture イベント。 |
RotateGesture | RotateGesture イベント。 |
TwoFingerTapGesture | TwoFingerTapGesture イベント。 |
ZoomGesture | ZoomGesture イベント。 |
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click ' Get the UltraDayView's event manager. ' The event manager is used to temporarily disable events ' to prevent them from being raised. This can be very ' convenient in a situation where one or more properties ' are being set in code and the events they would normally ' raise would cause unnecessary or counter-productive ' code to be executed. ' ' Note: All events are enabled by default. Dim eventManager As DayViewEventManager = Me.UltraDayView1.EventManager ' Disable the Before/AfterTimeSlotSelectionChanged events eventManager.SetEnabled(DayViewEventIds.BeforeTimeSlotSelectionChanged, False) eventManager.SetEnabled(DayViewEventIds.AfterTimeSlotSelectionChanged, False) ' Select the same time slot in the next day. ' Note: This would normally cause the Before/AfterSelectChange ' events to be raised. However, since the above code disabled ' the events they won't be. Me.UltraDayView1.PerformAction(UltraDayViewAction.SameTimeSlotNextDay) ' Re-enable the Before/AfterTimeSlotSelectionChanged events eventManager.SetEnabled(DayViewEventIds.BeforeTimeSlotSelectionChanged, True) eventManager.SetEnabled(DayViewEventIds.AfterTimeSlotSelectionChanged, True) ' The 'AllEventsEnabled' property lets you enable/disable ' all events will a single line of code. If any event is ' disabled the 'AllEventsEnabled' property returns false. If (Not eventManager.AllEventsEnabled) Then eventManager.AllEventsEnabled = True End If ' The event manager also exposes an 'IsEnabled' method ' to see if an event is enabled or disbled. If (Not eventManager.IsEnabled(DayViewEventIds.BeforeAppointmentEdited)) Then eventManager.SetEnabled(DayViewEventIds.BeforeAppointmentEdited, True) End If ' The CanFireEvent method indicates whether the specified event can be fired. ' This can return false if the control is not in the correct state for the ' specified event to be fired. If eventManager.CanFireEvent(DayViewEventIds.BeforeAppointmentEdited) Then Debug.WriteLine("The BeforeAppointmentEdited event can be fired at this time.") Else Debug.WriteLine("The BeforeAppointmentEdited event CANNOT be fired at this time.") End If ' The event manager also exposes overloaded ' 'IsEnabled' and 'SetEnabled' methods that take an ' event group so that, for example all 'Before' or all ' 'After' events can be enabled/disabled. If any event ' in the group is disabled the 'IsEnabled' method returns ' false. If (Not eventManager.IsEnabled(DayViewEventGroups.BeforeEvents)) Then eventManager.SetEnabled(DayViewEventGroups.BeforeEvents, True) eventManager.SetEnabled(DayViewEventGroups.AfterEvents, True) ' The 'InProgress' method will return true if the ' specified event is currently being raised. This ' is often helpful in methods that can be called ' from various points in an application to determine ' what is triggering the call. If (eventManager.InProgress(DayViewEventIds.BeforeAppointmentResized)) Then ' ... End If End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void button5_Click(object sender, System.EventArgs e) { // Get the UltraDayView's event manager. // The event manager is used to temporarily disable events // to prevent them from being raised. This can be very // convenient in a situation where one or more properties // are being set in code and the events they would normally // raise would cause unnecessary or counter-productive // code to be executed. // // Note: All events are enabled by default. DayViewEventManager eventManager = this.ultraDayView1.EventManager; // Disable the Before/AfterTimeSlotSelectionChanged events eventManager.SetEnabled(DayViewEventIds.BeforeTimeSlotSelectionChanged, false); eventManager.SetEnabled(DayViewEventIds.AfterTimeSlotSelectionChanged, false); // Select the same time slot in the next day. // Note: This would normally cause the Before/AfterSelectChange // events to be raised. However, since the above code disabled // the events they won't be. this.ultraDayView1.PerformAction(UltraDayViewAction.SameTimeSlotNextDay); // Re-enable the Before/AfterTimeSlotSelectionChanged events eventManager.SetEnabled(DayViewEventIds.BeforeTimeSlotSelectionChanged, true); eventManager.SetEnabled(DayViewEventIds.AfterTimeSlotSelectionChanged, true); // The 'AllEventsEnabled' property lets you enable/disable // all events will a single line of code. If any event is // disabled the 'AllEventsEnabled' property returns false. if ( !eventManager.AllEventsEnabled ) eventManager.AllEventsEnabled = true; // The event manager also exposes an 'IsEnabled' method // to see if an event is enabled or disbled. if (!eventManager.IsEnabled(DayViewEventIds.BeforeAppointmentEdited)) eventManager.SetEnabled(DayViewEventIds.BeforeAppointmentEdited, true ); // The CanFireEvent method indicates whether the specified event can be fired. // This can return false if the control is not in the correct state for the // specified event to be fired. if (eventManager.CanFireEvent(DayViewEventIds.BeforeAppointmentEdited)) Debug.WriteLine("The BeforeAppointmentEdited event can be fired at this time."); else Debug.WriteLine("The BeforeAppointmentEdited event CANNOT be fired at this time."); // The event manager also exposes overloaded // 'IsEnabled' and 'SetEnabled' methods that take an // event group so that, for example all 'Before' or all // 'After' events can be enabled/disabled. If any event // in the group is disabled the 'IsEnabled' method returns // false. if (!eventManager.IsEnabled(DayViewEventGroups.BeforeEvents)) eventManager.SetEnabled(DayViewEventGroups.BeforeEvents, true ); eventManager.SetEnabled(DayViewEventGroups.AfterEvents, true ); // The 'InProgress' method will return true if the // specified event is currently being raised. This // is often helpful in methods that can be called // from various points in an application to determine // what is triggering the call. if (eventManager.InProgress(DayViewEventIds.BeforeAppointmentResized)) { // ... } }