isolatedstorage - Alarm feature in Windows Phone 7 -
i trying controll snooze , dismiss button when alarm sound in windows phone 7.
but couldnt find source code example on it.
can me it?
what want when clicked on snooze or dimiss button something such dismiss button naviagte page.
and 1 more thing when alarm triggered can set play music?? because 1 have tried out not play music.
private static void createalarm(string title, string time) { var alarm = new alarm(title) { content = "you have meeting team now.", begintime = convert.todatetime(time), }; scheduledactionservice.add(alarm); } private static void resetalarm() { scheduledactionservice.remove("myalarm"); } private void setalarm_click(object sender, routedeventargs e) { string time = convert.tostring(timepicker1.valuestring); createalarm(txttitle.text, time); } private void resetalarm_click(object sender, routedeventargs e) { resetalarm(); } }
the alarm
class has .sound
property controls sound file played.
to use it, have alarm.mp3 in project under sounds folder it's build action set content
.
var alarm = new alarm() { sound = new uri('sounds/alarm.mp3', urikind.relative) }
there no way respond snooze or dismiss have seen.
Comments
Post a Comment