Example #1
0
 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();
     }
 }
Example #2
0
 private void pageRoot_Loaded(object sender, RoutedEventArgs e)
 {
     AlarmCollection.loadData();
     ActionCollection.LoadData();
 }