'宣言 Public Event AfterHolidayAdded As HolidayEventHandler
public event HolidayEventHandler AfterHolidayAdded
イベント ハンドラが、このイベントに関連するデータを含む、HolidayEventArgs 型の引数を受け取りました。次の HolidayEventArgs プロパティには、このイベントの固有の情報が記載されます。
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports System.Diagnostics Private Sub ultraCalendarInfo1_AfterHolidayAdded(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.HolidayEventArgs) Handles ultraCalendarInfo1.AfterHolidayAdded '---------------------------------------------------------------------------------------------------- ' 説明 ' AfterHolidayAdded ' ' 新しいメンバーがコンポーネントの Holidays コレクションに追加された後に発生します ' '---------------------------------------------------------------------------------------------------- Dim info As String = String.Empty info += "A new Holiday was just added to the UltraCalendarInfo object:" + vbCrLf + vbCrLf info += "The new Holiday starts on: " + e.Holiday.StartDate.ToLongDateString() + vbCrLf info += "The new Holiday ends on: " + e.Holiday.StartDate.AddDays(e.Holiday.NumberOfDays).ToLongDateString() + vbCrLf info += "The new Holiday's Name is: " + e.Holiday.Name + vbCrLf info += "The new Holiday's will last for " + e.Holiday.NumberOfDays + " days." + vbCrLf MessageBox.Show(info, "AfterHolidayAdded", MessageBoxButtons.OK) End Sub
using System.Diagnostics; using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void ultraCalendarInfo1_AfterHolidayAdded(object sender, Infragistics.Win.UltraWinSchedule.HolidayEventArgs e) { //---------------------------------------------------------------------------------------------------- // 説明 // AfterHolidayAdded // // 新しいメンバーがコンポーネントの Holidays コレクションに追加された後に発生します // //---------------------------------------------------------------------------------------------------- string info = string.Empty; info += "A new Holiday was just added to the UltraCalendarInfo object:" + "\n\n"; info += "The new Holiday starts on: " + e.Holiday.StartDate.ToLongDateString() + "\n"; info += "The new Holiday ends on: " + e.Holiday.StartDate.AddDays( e.Holiday.NumberOfDays ).ToLongDateString() + "\n"; info += "The new Holiday's Name is: " + e.Holiday.Name + "\n"; info += "The new Holiday's will last for " + e.Holiday.NumberOfDays + " days." + "\n"; MessageBox.Show( info, "AfterHolidayAdded", MessageBoxButtons.OK ); }