in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Non Visual Alerts

Last post 5/24/2007 10:28 AM by Alan (Developer Express). 1 replies.
Page 1 of 1 (2 items)
Sort Posts:
Previous Next
  • 5/23/2007 8:26 PM

    Non Visual Alerts

    Hi,

     I'm trying to use XtraScheduler as a way to get alert events for a recurring daily task without any

    visual elements.  I looked through the documentation and I can't find any events that I can listen for to trap

    the alarms.  Has anyone used XtraScheduler in a non-visual way that can lead me in the right direction?

     

    Thanks

     

     

     

  • 5/24/2007 10:28 AM In reply to

    Re: Non Visual Alerts

    Hi Herbert,

    To accomplish this, you may use the SchedulerStorage.ReminderAlert event. For example, add the SchedulerStorage and a simple button to a form, and try the following code or similar.


    using System;
    using System.Windows.Forms;
    using DevExpress.XtraEditors;
    using DevExpress.XtraScheduler;
    // ...

        private void button1_Click(object sender, EventArgs e) {
            schedulerStorage1.Appointments.Clear();
            schedulerStorage1.Appointments.Add(CreateAppointmentWithReminder());
            schedulerStorage1.RemindersCheckInterval = 3000;
            schedulerStorage1.ReminderAlert += new ReminderEventHandler(OnReminderAlert);
        }

        private Appointment CreateAppointmentWithReminder() {
            Appointment app = new Appointment(DateTime.Today, TimeSpan.FromHours(1));
            app.Subject = "Test appointment";
            app.HasReminder = true;
            return app;
        }

        private void OnReminderAlert(object sender, ReminderEventArgs e) {
            XtraMessageBox.Show(e.AlertNotifications[0].Reminder.Subject);
        }

    @.
    R&D, .NET Team.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/sc.
    Filed under: ,
Page 1 of 1 (2 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED