A newer version of this page is available. Switch to the current version.

OccurrenceCalculator.CalcSequenceInterval(Appointment) Method

Calculates the time interval occupied with the recurrent series.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v18.2.Core.dll

Declaration

public TimeInterval CalcSequenceInterval(
    Appointment pattern
)
Public Function CalcSequenceInterval(
    pattern As Appointment
) As TimeInterval

Parameters

Name Type Description
pattern Appointment

An Appointment object that is the pattern of the recurrent series.

Returns

Type Description
TimeInterval

A TimeInterval object that is the time interval occupied by the appointment series.

Examples

The following code sample retrieves the recurrence pattern of the first appointment in the scheduler's collection and calculates the time interval of the recurrent series.

// Calculate a time interval occupied by the first recurrent series.
Appointment pattern = schedulerStorage1.Appointments.Items.FirstOrDefault(item => item.Type == AppointmentType.Pattern);
if (pattern == null) return;
OccurrenceCalculator calc = OccurrenceCalculator.CreateInstance(pattern.RecurrenceInfo);
TimeInterval ti = calc.CalcSequenceInterval(pattern);
MessageBox.Show(ti.ToString(), "Time Interval of the First Recurrent Series");
See Also