Ejemplo n.º 1
0
 private void FallReports_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
     {
         //add
         CurrentModel.AddFallReport(e.NewItems[0] as Report);
         PredictionAndRealFalls.AddReport((e.NewItems[0] as Report).location);
     }
     if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Remove)
     {
         //remove
         var oldId = (e.OldItems[0] as Report).id;
         CurrentModel.RemoveFallReport(oldId);
     }
 }