سؤال

I'm working on an app where the user needs to be able to create alarms on Windows Phone. The issue I'm hitting is that we want to provide the functionality for an alarm to repeat on specific days (e.g. only mon-fri).

The RecurrenceInterval class doesn't seem to offer options to suit this (even though the it is possible in the native alarm app), only daily, weekly, etc...

Do I need to create a seperate alarm for each weekday and set them to repeat weekly?

هل كانت مفيدة؟

المحلول

Enumeration does not allow specifying days in a week for alarms - so I would go with separate alarm for each weekday and repeat weekly. To make alarams easier to find, I would just use namming convention for alarms, something like "AlarmName_[n]", where n=1..6 - depending on how many days you have when alarm needs to go off, and then you can enumerate from 1 until there are no alarms with specified name.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top