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