473,395 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Calendar Alarm

Has anyone implemented an alarm like the one used with WindowsMobile
Calendar? I'm writing a program (C#) that allows a user to set
a date and time for meetings, appointments, etc. and have a MessageBox
pop-up when the set dateTime occurs. I don't even know where
to begin and am looking for a point in the right direction. The app is C#
compact framework and the dateTime object is stored in a
SQLCE database.

Any help would be greatly appreciated.

Thank you

Jeff
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 17 '05 #1
2 2181
Hi,

All the alarms on your apps have a timer involved, so you should have the
main timer running on your app that every x seconds/minutes or whatever you
like scans the objects on the calendar (you can reduce the search for example
grabing objects that are set for today only).

Simple example:

Timer YourTimer = new Timer(60000); //Every one minute
YourTimer.Elapsed += new Elapsed(YourAnalizeFunc(...));
YourTimer.Start(); //This will run on its own thread so is async

void YourAnalizeFunc()
{
foreach (YourObj Current in YourCollection)
{
if (Current .DateTime.Now <= DateTime.Now)
{
RaiseTheAlarm(Current);
}
}
}

Other way to implement is having the timer on each object and raise an event
when the time has been reached, this is a good implementation if you have a
small number of objects.

Best regards
Salva


"Jeff" wrote:
Has anyone implemented an alarm like the one used with WindowsMobile
Calendar? I'm writing a program (C#) that allows a user to set
a date and time for meetings, appointments, etc. and have a MessageBox
pop-up when the set dateTime occurs. I don't even know where
to begin and am looking for a point in the right direction. The app is C#
compact framework and the dateTime object is stored in a
SQLCE database.

Any help would be greatly appreciated.

Thank you

Jeff
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

Nov 17 '05 #2
Salva,
I tried your suggestion but it appears that the compact framework does
not support .elapsed, only .enabled and .interval. One of the ebooks I
have states using System.Threading.Timers or System Windows.Forms.Timers
and neither of those appear to be supported either. Back to the coding
board. Thank you for the quick reply though.

Jeff
On Thu, 28 Apr 2005 03:30:02 -0700, Salvador
<Sa******@discussions.microsoft.com> wrote:
Hi,

All the alarms on your apps have a timer involved, so you should have the
main timer running on your app that every x seconds/minutes or whatever
you
like scans the objects on the calendar (you can reduce the search for
example
grabing objects that are set for today only).

Simple example:

Timer YourTimer = new Timer(60000); //Every one minute
YourTimer.Elapsed += new Elapsed(YourAnalizeFunc(...));
YourTimer.Start(); //This will run on its own thread so is async

void YourAnalizeFunc()
{
foreach (YourObj Current in YourCollection)
{
if (Current .DateTime.Now <= DateTime.Now)
{
RaiseTheAlarm(Current);
}
}
}

Other way to implement is having the timer on each object and raise an
event
when the time has been reached, this is a good implementation if you
have a
small number of objects.

Best regards
Salva


"Jeff" wrote:
Has anyone implemented an alarm like the one used with WindowsMobile
Calendar? I'm writing a program (C#) that allows a user to set
a date and time for meetings, appointments, etc. and have a MessageBox
pop-up when the set dateTime occurs. I don't even know where
to begin and am looking for a point in the right direction. The app is
C#
compact framework and the dateTime object is stored in a
SQLCE database.

Any help would be greatly appreciated.

Thank you

Jeff
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/


--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Bill H | last post by:
I have a typical username/password check against mysql type logon that Zone Alarm Pro seem to break... I haven't bought or troubleshooted this yet, I'm hoping this is a know issue with a simple...
1
by: Sergey | last post by:
How to send alarm to a thread? I can set alarm in main thread, but how then send exception to another thread to wake it if it executes too long?
38
by: George Sexton | last post by:
We're in the process of re-launching our web calendar product. We would like to get your opinions on a couple of things about our site and product. This is a relaunch of an existing product with...
7
by: Adrian Casey | last post by:
I have a multi-threaded python application which uses pexpect to connect to multiple systems concurrently. Each thread within my application is a connection to a remote system. The problem is...
3
by: ankitks | last post by:
Hi guys, is there any utility available as a protection against endless_loop() something like this: alarm.set(5); //set timeout for 5 sec endless_loop(); alarm.reset(); //reset it to 0,...
0
by: thelightkeeper | last post by:
Hi, in MSSQL, I have 2 tables naming , --------------------------------------- EquipmentID : nvarchar(50), FK, reference .EquipmentID AlarmID : nvarchar(50), PK AlarmHappenTime :...
2
by: Alan Isaac | last post by:
Goal: turn off an audible alarm without terminating the program. For example, suppose a console program is running:: while True: sys.stdout.write('\a') sys.stdout.flush() time.sleep(0.5) ...
1
by: sandeeprmenon | last post by:
Combining bit & peices from different discussion forums, I created this program (see below) to send meeting invitation from Lotus Notes using VBA. Program successfully sends the invitation to all...
8
by: superleochen | last post by:
Database is simliar to this: ID TIME TAGNAME VALUE 5967383 8/1/2008 1:00:24 AM I16MUDL11 ALARM 5967384 8/1/2008...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.