Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Creating Alarm Application for Windows Phone

DZone's Guide to

Creating Alarm Application for Windows Phone

· Mobile Zone ·
Free Resource

I don’t have a kitchen timer, but who cares? I have a Windows Phone, right? So I just created a little Alarm application to compensate for missing kitchen equipment.

It is a very simple application that has a TextBlock (for instructions), a TextBox, where I can set the alarm (I chose to set that in seconds), and two buttons. One for setting the alarm, the other one for resetting it:

By clicking the ‘Set Alarm’ Button I set the alarm. A method called ‘CreateAlarm’ will be created. This method will create the instance of the alarm by passing a name to the constructor. I am also going to add a little alarm message:

“ScheduledActionService.Add(alarm)” will let the alarm go off when the application has been closed. It will execute in the background.

Works as expected. I just have to make sure to press the ‘Reset Alarm’ Button after an alarm went off, to prevent it from crashing. I am sure there is room for improvement, but for now, I am happy with that.

 

To be continued…

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}