Back to Devexpress

SchedulerDataStorage.RemindersCheckInterval Property

windowsforms-devexpress-dot-xtrascheduler-dot-schedulerdatastorage-25a6f80e.md

latest5.8 KB
Original Source

SchedulerDataStorage.RemindersCheckInterval Property

Gets or sets the time interval a reminder’s alert time should be checked (in milliseconds).

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
[DefaultValue(15000)]
public int RemindersCheckInterval { get; set; }
vb
<DefaultValue(15000)>
Public Property RemindersCheckInterval As Integer

Property Value

TypeDefaultDescription
Int3215000

An integer value which represents the time interval between checks of the reminder’s alert.

|

Remarks

By default all reminder alerts are checked by the scheduler storage every 15 seconds (15000 milliseconds), but your reminders can be checked more or less frequently. Set the RemindersCheckInterval property to another time interval value.

Example

The following example demonstrates how to manually handle reminders and perform a custom action when the SchedulerStorageBase.ReminderAlert event is fired.

View Example

csharp
// Handle this event to perform a custom action when a reminder alert is fired.
    schedulerStorage1.ReminderAlert += SchedulerStorage1_ReminderAlert;
    // Specify the interval at which the reminder is polled for alert.
    schedulerStorage1.RemindersCheckInterval = checkInterval * 1000;
    // Hide the reminder alert window.
    schedulerControl1.OptionsBehavior.ShowRemindersForm = false;
private void SchedulerStorage1_ReminderAlert(object sender, ReminderEventArgs e) {
    // Create a new appointment.
    Appointment app = schedulerStorage1.CreateAppointment(AppointmentType.Normal);
    app.Subject = "Created on alert from appointment w/Price = " + e.AlertNotifications[0].ActualAppointment.CustomFields["CustomPrice"];
    app.Start = e.AlertNotifications[0].ActualAppointment.Start.AddHours(2);
    app.Duration = TimeSpan.FromHours(4);
    schedulerStorage1.Appointments.Add(app);

    // Modify the appointment for which the alert is triggered.
    e.AlertNotifications[0].ActualAppointment.LabelKey = 3;

    // Prevent the event from being fired one more time.
    e.AlertNotifications[0].ActualAppointment.Reminder.Dismiss();
}
vb
' Handle this event to perform a custom action when a reminder alert is fired.
    AddHandler schedulerStorage1.ReminderAlert, AddressOf SchedulerStorage1_ReminderAlert
    ' Specify the interval at which the reminder is polled for alert.
    schedulerStorage1.RemindersCheckInterval = checkInterval * 1000
    ' Hide the reminder alert window.
    schedulerControl1.OptionsBehavior.ShowRemindersForm = False
Private Sub SchedulerStorage1_ReminderAlert(ByVal sender As Object, ByVal e As ReminderEventArgs)
    ' Create a new appointment.
    Dim app As Appointment = schedulerStorage1.CreateAppointment(AppointmentType.Normal)
    app.Subject = "Created on alert from appointment w/Price = " + e.AlertNotifications(0).ActualAppointment.CustomFields("CustomPrice").ToString()
    app.Start = e.AlertNotifications(0).ActualAppointment.Start.AddHours(2)
    app.Duration = TimeSpan.FromHours(4)
    schedulerStorage1.Appointments.Add(app)

    ' Modify the appointment for which the alert is triggered.
    e.AlertNotifications(0).ActualAppointment.LabelKey = 3

    ' Prevent the event from being fired one more time.
    e.AlertNotifications(0).ActualAppointment.Reminder.Dismiss()
End Sub

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RemindersCheckInterval property.

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.

winforms-scheduler-create-appointments-on-reminder-alert/CS/ReminderCustomActions/Form1.cs#L26

csharp
// Specify the interval at which the reminder is polled for alert.
schedulerDataStorage1.RemindersCheckInterval = checkInterval * 1000;
// Hide the reminder alert window.

winforms-scheduler-create-appointments-on-reminder-alert/VB/ReminderCustomActions/Form1.vb#L28

vb
' Specify the interval at which the reminder is polled for alert.
schedulerDataStorage1.RemindersCheckInterval = checkInterval * 1000
' Hide the reminder alert window.

See Also

SchedulerDataStorage Class

SchedulerDataStorage Members

DevExpress.XtraScheduler Namespace