IsAppointmentInEditMode プロパティは、コントロールが Appointment を現在編集している場合には、True を返します。IsNoteInEditMode プロパティを使用して、Note が編集されているかどうかを決定します。
IsInEditMode プロパティを使用すると、コントロールがどちらかのタイプのアクティビティを編集中かどうかを確認できます。
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.KeyPreview = True End Sub Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown If Me.UltraWeekView1.IsInEditMode Then If Me.UltraWeekView1.IsAppointmentInEditMode Then Debug.WriteLine("An Appointment is in edit mode.") ElseIf Me.UltraWeekView1.IsNoteInEditMode Then Debug.WriteLine("A Note is in edit mode.") End If End If If Me.UltraMonthViewSingle1.IsInEditMode Then If Me.UltraMonthViewSingle1.IsAppointmentInEditMode Then Debug.WriteLine("An Appointment is in edit mode.") ElseIf Me.UltraMonthViewSingle1.IsNoteInEditMode Then Debug.WriteLine("A Note is in edit mode.") End If End If If Me.UltraDayView1.IsInEditMode Then Debug.WriteLine("An Appointment is in edit mode.") End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.Diagnostics; private void Form1_Load(object sender, System.EventArgs e) { this.KeyPreview = true; } private void Form1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if ( this.ultraWeekView1.IsInEditMode ) { if ( this.ultraWeekView1.IsAppointmentInEditMode ) Debug.WriteLine( "An Appointment is in edit mode." ); else if ( this.ultraWeekView1.IsNoteInEditMode ) Debug.WriteLine( "A Note is in edit mode." ); } if ( this.ultraMonthViewSingle1.IsInEditMode ) { if ( this.ultraMonthViewSingle1.IsAppointmentInEditMode ) Debug.WriteLine( "An Appointment is in edit mode." ); else if ( this.ultraMonthViewSingle1.IsNoteInEditMode ) Debug.WriteLine( "A Note is in edit mode." ); } if ( this.ultraDayView1.IsInEditMode ) { Debug.WriteLine( "An Appointment is in edit mode." ); } }