'宣言 Public Function GetClosestSelectableDay( _ ByVal date As Date, _ ByVal direction As ClosestDayToReturn _ ) As Day
public Day GetClosestSelectableDay( DateTime date, ClosestDayToReturn direction )
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports System.IO Imports System.Globalization Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click ' 現在の日付またはそれ以降の日付で ' 選択可能な最初の (表示されていて有効な) 日付を取得します Dim day As Infragistics.Win.UltraWinSchedule.Day day = Me.ultraCalendarInfo1.GetClosestSelectableDay(DateTime.Today, ClosestDayToReturn.OnOrBefore) ' エンド ユーザーに最初の選択可能な日を表示します If (Not day Is Nothing) Then MessageBox.Show("The first selectable day that falls on or before the current date is " + day.Date.ToLongDateString() + "." + vbCrLf, "GetClosestSelectableDay", MessageBoxButtons.OK) End If End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.IO; using System.Globalization; private void button1_Click(object sender, System.EventArgs e) { // 現在の日付またはそれ以降の日付で // 最初の選択可能な (表示されていて有効な) 日を取得します Infragistics.Win.UltraWinSchedule.Day day = null; day = this.ultraCalendarInfo1.GetClosestSelectableDay( DateTime.Today, ClosestDayToReturn.OnOrBefore ); // エンド ユーザーに最初の選択可能な日を表示します if ( day != null ) MessageBox.Show( "The first selectable day that falls on or before the current date is " + day.Date.ToLongDateString() + "." + "\n", "GetClosestSelectableDay", MessageBoxButtons.OK ); }