'宣言 Public Event BeforePerformAction As BeforeWeekViewPerformActionEventHandler
public event BeforeWeekViewPerformActionEventHandler BeforePerformAction
イベント ハンドラが、このイベントに関連するデータを含む、BeforeWeekViewPerformActionEventArgs 型の引数を受け取りました。次の BeforeWeekViewPerformActionEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 解説 |
---|---|
Action | 実行されるアクション。 |
Cancel System.ComponentModel.CancelEventArgsから継承されます。 |
キーアクションのマッピングに関連付けられたアクションを実行しようとする前に BeforePerformAction イベントが発生しました。このイベントはキャンセル可能です。キャンセルすると、このイベントの発生元のアクションは実行されません。
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub UltraDayView1_BeforePerformAction(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.BeforeDayViewPerformActionEventArgs) Handles UltraDayView1.BeforePerformAction ' Cancel the event if the action is 'DeleteSelectedAppointments', to ' prevent the end user from deleting appointments via the keyboard. If e.Action = UltraDayViewAction.DeleteSelectedAppointments Then e.Cancel = True End If End Sub Private Sub UltraDayView1_AfterPerformAction(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.AfterDayViewPerformActionEventArgs) Handles UltraDayView1.AfterPerformAction ' Make the system 'beep' sound if the end user cancels edit mode If e.Action = UltraDayViewAction.EndCurrentEditDiscardChanges Then Beep() End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.Diagnostics; private void ultraDayView1_BeforePerformAction(object sender, Infragistics.Win.UltraWinSchedule.BeforeDayViewPerformActionEventArgs e) { // Cancel the event if the action is 'DeleteSelectedAppointments', to // prevent the end user from deleting appointments via the keyboard. if ( e.Action == UltraDayViewAction.DeleteSelectedAppointments ) e.Cancel = true; } private void ultraDayView1_AfterPerformAction(object sender, Infragistics.Win.UltraWinSchedule.AfterDayViewPerformActionEventArgs e) { // Make the system 'beep' sound if the end user cancels edit mode if ( e.Action == UltraDayViewAction.EndCurrentEditDiscardChanges ) { // Note: requires a reference to the Microsoft.VisualBasic assembly Microsoft.VisualBasic.Interaction.Beep(); } }