GrapeCity.Win.Calendar 名前空間 > GcCalendar クラス : GetRokuyou メソッド |
Private Sub GcCalendar1_SelectedDateChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GcCalendar1.SelectedDateChanged Dim selectedDate As GrapeCity.Win.Calendar.DateTimeEx = Me.GcCalendar1.SelectedDate If Not selectedDate Is Nothing Then Dim rokuyou As String = "" Select Case Me.GcCalendar1.GetRokuyou(selectedDate) Case GrapeCity.Win.Calendar.Rokuyous.Butsumetsu rokuyou = "仏滅" Case GrapeCity.Win.Calendar.Rokuyous.None rokuyou = "なし" Case GrapeCity.Win.Calendar.Rokuyous.Senbu rokuyou = "先負" Case GrapeCity.Win.Calendar.Rokuyous.Senshou rokuyou = "先勝" Case GrapeCity.Win.Calendar.Rokuyous.Shakkou rokuyou = "赤口" Case GrapeCity.Win.Calendar.Rokuyous.Taian rokuyou = "大安" Case GrapeCity.Win.Calendar.Rokuyous.Tomobiki rokuyou = "友引" End Select Me.Label1.Text = String.Format("{0}, {1}", selectedDate.ToLongDateString(), rokuyou) End If End Sub
private void gcCalendar1_SelectedDateChanged(object sender, EventArgs e) { GrapeCity.Win.Calendar.DateTimeEx selectedDate = this.gcCalendar1.SelectedDate; if (selectedDate != null) { string rokuyou = ""; switch (this.gcCalendar1.GetRokuyou(selectedDate)) { case GrapeCity.Win.Calendar.Rokuyous.Butsumetsu: rokuyou = "仏滅"; break; case GrapeCity.Win.Calendar.Rokuyous.None: rokuyou = "なし"; break; case GrapeCity.Win.Calendar.Rokuyous.Senbu: rokuyou = "先負"; break; case GrapeCity.Win.Calendar.Rokuyous.Senshou: rokuyou = "先勝"; break; case GrapeCity.Win.Calendar.Rokuyous.Shakkou: rokuyou = "赤口"; break; case GrapeCity.Win.Calendar.Rokuyous.Taian: rokuyou = "大安"; break; case GrapeCity.Win.Calendar.Rokuyous.Tomobiki: rokuyou = "友引"; break; default: break; } this.label1.Text = string.Format("{0}, {1}", selectedDate.ToLongDateString(), rokuyou); } }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2