Skip to main content

OccurrenceCalculator.CalcSequenceInterval(Appointment) Method

Calculates the time interval occupied with the recurrent series.

Namespace: DevExpress.XtraScheduler

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

NuGet Package: DevExpress.Scheduler.Core

Declaration

public TimeInterval CalcSequenceInterval(
    Appointment pattern
)

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.

Example

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");

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CalcSequenceInterval(Appointment) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also