private void buttonRemoveAlarm_Click(object sender, RoutedEventArgs e) { if (AlarmList.SelectedIndex >= 0) { AlarmCollection.removeAlarm(AlarmList.SelectedIndex); foreach (var cur in BackgroundTaskRegistration.AllTasks) { if (cur.Value.Name == AlarmCollection.AlarmList [AlarmList.SelectedIndex].alarmMemo) { cur.Value.Unregister(true); } } AlarmCollection.saveData(); } }
private void pageRoot_Loaded(object sender, RoutedEventArgs e) { AlarmCollection.loadData(); ActionCollection.LoadData(); }