private static Alarm ToScheduledAlarm(AlarmAction alarm) { return(new Alarm(alarm.Name) { BeginTime = alarm.BeginTime.LocalDateTime, ExpirationTime = alarm.ExpirationTime.LocalDateTime, Content = alarm.Content, RecurrenceType = (Microsoft.Phone.Scheduler.RecurrenceInterval)alarm.RecurrencyType, Sound = new Uri("/Assets/Titan Embark.wav", UriKind.Relative) }); }
private static Alarm ToScheduledAlarm(AlarmAction alarm) { return new Alarm(alarm.Name) { BeginTime = alarm.BeginTime.LocalDateTime, ExpirationTime = alarm.ExpirationTime.LocalDateTime, Content = alarm.Content, RecurrenceType = (Microsoft.Phone.Scheduler.RecurrenceInterval)alarm.RecurrencyType, Sound = new Uri("/Assets/Titan Embark.wav", UriKind.Relative) }; }
public void Add(AlarmAction alarm) { var phoneAlarm = ToScheduledAlarm(alarm); _schedulerActionService.Add(phoneAlarm); }