バージョン

RangeLimit プロパティ

繰り返し予定の制限要因 (つまり、終了しないか、一定の回数繰り返してから終了するか、または特定の日付以前に終了するか) を取得または設定します。
シンタックス
'宣言
 
Public Property RangeLimit As RecurrenceRangeLimit
public RecurrenceRangeLimit RangeLimit {get; set;}
使用例
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.Diagnostics

    Private Sub CreateLimitedRecurrences()
        ' The 'RangeLimit' is used to indicate what will
        ' determine when the last occurrence will occur.
        ' By default, this is set to NoLimit and is only
        ' limited by the MaxDate of the containing
        ' calendarinfo. When set to 'LimitByNumberOfOccurrences',
        ' the recurrence will be limited by the 
        ' 'RangeMaxOccurrences' value. When set to
        ' 
        '

        ' The following recurrence is not limited
        ' other then by the max date of the associated
        ' calendar info.
        '
        Dim dt As DateTime = DateTime.Now
        Dim dailyAppt As Appointment = Me.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3D), String.Empty)

        ' create the recurrence object - this appointment
        ' will become the rootappointment (or representation
        ' of the series) - it's 'IsRecurringAppointmentRoot'
        ' will return true and it will not displayed in 
        ' the associated controls. instead, instances or 
        ' occurrences of the recurrence will appear in the
        ' the controls associated with the calendar info.
        dailyAppt.Recurrence = New AppointmentRecurrence()

        ' This will be a daily recurrence that will occur
        ' each weekday
        dailyAppt.Recurrence.PatternFrequency = RecurrencePatternFrequency.Daily

        ' In this case, we use the 'PatternDaysOfWeek' to
        ' indicate that the daily occurrences should fall
        ' on every weekday (each day but saturday and sunday).
        dailyAppt.Recurrence.PatternDaysOfWeek = RecurrencePatternDaysOfWeek.AllWeekdays

        dailyAppt.Recurrence.RangeLimit = RecurrenceRangeLimit.NoLimit

        ' assign a subject [not required]
        dailyAppt.Subject = "A daily activity that occurs every weekday with no limits"


        ' Another appointment with the same information
        ' that will end after 10 occurrences...
        '
        Dim dailyAppt2 As Appointment = Me.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3D), String.Empty)

        ' create the recurrence object - this appointment
        ' will become the rootappointment (or representation
        ' of the series) - see above for more
        dailyAppt2.Recurrence = New AppointmentRecurrence()

        ' This will be a daily recurrence that will occur
        ' each weekday
        dailyAppt2.Recurrence.PatternFrequency = RecurrencePatternFrequency.Daily

        ' In this case, we use the 'PatternDaysOfWeek' to
        ' indicate that the daily occurrences should fall
        ' on every weekday (each day but saturday and sunday).
        dailyAppt2.Recurrence.PatternDaysOfWeek = RecurrencePatternDaysOfWeek.AllWeekdays

        ' the RangeLimit here is used to indicate
        ' that it has a limited # of occurances but
        ' is not limited by date (other then the maxdate
        ' of the calendarinfo)
        dailyAppt2.Recurrence.RangeLimit = RecurrenceRangeLimit.LimitByNumberOfOccurrences

        ' the 'RangeMaxOccurrences' is used to indicate
        ' the limiting number of occurrences.
        dailyAppt2.Recurrence.RangeMaxOccurrences = 10

        ' assign a subject [not required]
        dailyAppt2.Subject = "A daily activity that occurs every weekday for 10 occurrences"



        ' Another appointment with the same information
        ' that will end in 30 days
        '

        Dim dailyAppt3 As Appointment = Me.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3D), String.Empty)

        ' create the recurrence object - this appointment
        ' will become the rootappointment (or representation
        ' of the series) - see above for more
        dailyAppt3.Recurrence = New AppointmentRecurrence()

        ' This will be a daily recurrence that will occur
        ' each weekday
        dailyAppt3.Recurrence.PatternFrequency = RecurrencePatternFrequency.Daily

        ' In this case, we use the 'PatternDaysOfWeek' to
        ' indicate that the daily occurrences should fall
        ' on every weekday (each day but saturday and sunday).
        dailyAppt3.Recurrence.PatternDaysOfWeek = RecurrencePatternDaysOfWeek.AllWeekdays

        ' the RangeLimit here is used to indicate
        ' that no occurrences will occur after
        ' the specified end date
        dailyAppt3.Recurrence.RangeLimit = RecurrenceRangeLimit.LimitByDate

        ' the 'RangeEndDate' is used to indicate
        ' the last possible date for an occurrence
        dailyAppt3.Recurrence.RangeEndDate = dt.AddDays(30D)

        ' assign a subject [not required]
        dailyAppt3.Subject = "A daily activity that occurs every weekday for the next 30 days"

    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.Diagnostics;

		private void CreateLimitedRecurrences()
		{
			// The 'RangeLimit' is used to indicate what will
			// determine when the last occurrence will occur.
			// By default, this is set to NoLimit and is only
			// limited by the MaxDate of the containing
			// calendarinfo. When set to 'LimitByNumberOfOccurrences',
			// the recurrence will be limited by the 
			// 'RangeMaxOccurrences' value. When set to
			// 
			//

			// The following recurrence is not limited
			// other then by the max date of the associated
			// calendar info.
			//
			#region NoLimit

			DateTime dt = DateTime.Now;
			Appointment dailyAppt = this.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3d), string.Empty);

			// create the recurrence object - this appointment
			// will become the rootappointment (or representation
			// of the series) - it's 'IsRecurringAppointmentRoot'
			// will return true and it will not displayed in 
			// the associated controls. instead, instances or 
			// occurrences of the recurrence will appear in the
			// the controls associated with the calendar info.
			dailyAppt.Recurrence = new AppointmentRecurrence();

			// This will be a daily recurrence that will occur
			// each weekday
			dailyAppt.Recurrence.PatternFrequency = RecurrencePatternFrequency.Daily;

			// In this case, we use the 'PatternDaysOfWeek' to
			// indicate that the daily occurrences should fall
			// on every weekday (each day but saturday and sunday).
			dailyAppt.Recurrence.PatternDaysOfWeek = RecurrencePatternDaysOfWeek.AllWeekdays;

			dailyAppt.Recurrence.RangeLimit = RecurrenceRangeLimit.NoLimit;

			// assign a subject [not required]
			dailyAppt.Subject = "A daily activity that occurs every weekday with no limits";

			#endregion //NoLimit


			// Another appointment with the same information
			// that will end after 10 occurrences...
			//
			#region LimitByNumberOfOccurrences

			Appointment dailyAppt2 = this.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3d), string.Empty);

			// create the recurrence object - this appointment
			// will become the rootappointment (or representation
			// of the series) - see above for more
			dailyAppt2.Recurrence = new AppointmentRecurrence();

			// This will be a daily recurrence that will occur
			// each weekday
			dailyAppt2.Recurrence.PatternFrequency = RecurrencePatternFrequency.Daily;

			// In this case, we use the 'PatternDaysOfWeek' to
			// indicate that the daily occurrences should fall
			// on every weekday (each day but saturday and sunday).
			dailyAppt2.Recurrence.PatternDaysOfWeek = RecurrencePatternDaysOfWeek.AllWeekdays;

			// the RangeLimit here is used to indicate
			// that it has a limited # of occurances but
			// is not limited by date (other then the maxdate
			// of the calendarinfo)
			dailyAppt2.Recurrence.RangeLimit = RecurrenceRangeLimit.LimitByNumberOfOccurrences;

			// the 'RangeMaxOccurrences' is used to indicate
			// the limiting number of occurrences.
			dailyAppt2.Recurrence.RangeMaxOccurrences = 10;

			// assign a subject [not required]
			dailyAppt2.Subject = "A daily activity that occurs every weekday for 10 occurrences";

			#endregion //LimitByNumberOfOccurrences


			// Another appointment with the same information
			// that will end in 30 days
			//
			#region LimitByNumberOfOccurrences

			Appointment dailyAppt3 = this.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3d), string.Empty);

			// create the recurrence object - this appointment
			// will become the rootappointment (or representation
			// of the series) - see above for more
			dailyAppt3.Recurrence = new AppointmentRecurrence();

			// This will be a daily recurrence that will occur
			// each weekday
			dailyAppt3.Recurrence.PatternFrequency = RecurrencePatternFrequency.Daily;

			// In this case, we use the 'PatternDaysOfWeek' to
			// indicate that the daily occurrences should fall
			// on every weekday (each day but saturday and sunday).
			dailyAppt3.Recurrence.PatternDaysOfWeek = RecurrencePatternDaysOfWeek.AllWeekdays;

			// the RangeLimit here is used to indicate
			// that no occurrences will occur after
			// the specified end date
			dailyAppt3.Recurrence.RangeLimit = RecurrenceRangeLimit.LimitByDate;

			// the 'RangeEndDate' is used to indicate
			// the last possible date for an occurrence
			dailyAppt3.Recurrence.RangeEndDate = dt.AddDays(30d);

			// assign a subject [not required]
			dailyAppt3.Subject = "A daily activity that occurs every weekday for the next 30 days";

			#endregion //LimitByNumberOfOccurrences
		}
参照