Exemple #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);            
 }
Exemple #2
0
 private void EditAlarm(AlarmMessage message)
 {
     pageTitle = "Edytuj";
     newAlarm = message.Alarm;
 }
Exemple #3
0
 private void CreateNewAlarm(AlarmMessage message)
 {
     pageTitle = "Nowy";
     newAlarm = new Alarm()
     {
         Name = "",
         IsOn = true,
         Repetition = Enums.StartDays.Monday,
         Nap = false
     };
 }
Exemple #4
0
 private async void DeleteAlarm(AlarmMessage message)
 {
     Alarms.Remove(message.Alarm);
     await StorageManager.WriteToFile(Alarms, "alarms.json", ApplicationData.Current.LocalCacheFolder);
 }