Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to use the item's reminder (Read 6089 times)
gerardo
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 27
Joined: Jan 26th, 2007
How to use the item's reminder
Jan 5th, 2010 at 10:04pm
Print Post  
Hi,

I'm trying to use the reminder in my calendar but it seems that I'm missing something. This is the code that I'm working with (it should display the message 5 minutes prior to the item's Start Time), but is not working:

                           app.Reminder = New Reminder()
                           app.Reminder.TimeInterval = New System.TimeSpan(0, 5, 0)
                           app.Reminder.Type = ReminderType.Leading
                           app.Reminder.Message = "Test - " + app.HeaderText + " " + app.DescriptionText

  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: How to use the item's reminder
Reply #1 - Jan 6th, 2010 at 9:37am
Print Post  
The reminder messages are not displayed automatically. You need to handle the ItemReminderTriggered event of the Schedule class and perform the necessary actions (such as displaying a message box) there.

Code
Select All
void Schedule_ItemReminderTriggered(object sender, MindFusion.Scheduling.ItemEventArgs e)
{
      MessageBox.Show(e.Item.Reminder.Message);
} 


Let me know if this works.

Regards,
Meppy
  
Back to top
 
IP Logged
 
gerardo
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 27
Joined: Jan 26th, 2007
Re: How to use the item's reminder
Reply #2 - Jan 6th, 2010 at 4:14pm
Print Post  
I'm working with the class Calendar, so I don't have access to the event: ItemReminderTriggered
that I can see is available for the Schedule class.

However I was able to catch the event using an auxiliar object schedule like this:

MySchedule as Schedule

MySchedule = MyCalendar.Schedule


then I assigned a handler like:


AddHandler MySchedule .ItemReminderTriggered, AddressOf Schedule_ItemReminderTriggered

So far, this is working for me, but any suggestions are welcome.

Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to use the item's reminder
Reply #3 - Jan 6th, 2010 at 6:10pm
Print Post  
Hi,

You can use the AddHandler command to attach a handler method to the schedule's event without creating additional variables.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
gerardo
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 27
Joined: Jan 26th, 2007
Re: How to use the item's reminder
Reply #4 - Jan 6th, 2010 at 9:54pm
Print Post  
I changed it and now is working with the original object.  Smiley

Thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint