OccurrenceCalculator.CalcSequenceInterval(Appointment) Method
Calculates the time interval occupied with the recurrent series.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v24.1.Core.dll
NuGet Package: DevExpress.Scheduler.Core
Declaration
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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-scheduler-recurrence-series-occurrencecalculator
// 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");
Related GitHub Examples
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.