示例#1
0
 private async void SaveAlarm(AlarmMessage message)
 {
     if (!Alarms.Contains(message.Alarm))
     {                
         Alarms.Add(message.Alarm);
     }
     
     await StorageManager.WriteToFile(Alarms, "alarms.json", ApplicationData.Current.LocalCacheFolder).ConfigureAwait(false);            
 }
示例#2
0
 private void EditAlarm(AlarmMessage message)
 {
     pageTitle = "Edytuj";
     newAlarm = message.Alarm;
 }
示例#3
0
 private void CreateNewAlarm(AlarmMessage message)
 {
     pageTitle = "Nowy";
     newAlarm = new Alarm()
     {
         Name = "",
         IsOn = true,
         Repetition = Enums.StartDays.Monday,
         Nap = false
     };
 }
示例#4
0
 private async void DeleteAlarm(AlarmMessage message)
 {
     Alarms.Remove(message.Alarm);
     await StorageManager.WriteToFile(Alarms, "alarms.json", ApplicationData.Current.LocalCacheFolder);
 }