示例#1
0
        private void RemoveSelectedItem()
        {
            var fenceToRemove = SelectedGeofence;

            _geofenceHelper.RemoveGeofence(fenceToRemove.Id);
            CurrentGeofencesCollection.Remove(fenceToRemove);
            OnFenceRemoved(fenceToRemove);
        }
示例#2
0
 public SampleGeofenceListingViewModel()
     : base(new GeofenceHelper())
 {
     if (DesignMode.DesignModeEnabled)
     {
         var geoposition = new BasicGeoposition {
             Latitude = 42.733166, Longitude = -71.502839
         };
         var radius = 20000;
         CurrentGeofencesCollection.Add(new Geofence("Sample One", new Geocircle(geoposition, radius)));
         CurrentGeofencesCollection.Add(new Geofence("Sample Two", new Geocircle(geoposition, radius)));
         CurrentGeofencesCollection.Add(new Geofence("Sample Three", new Geocircle(geoposition, radius)));
         CurrentGeofencesCollection.Add(new Geofence("Sample Four", new Geocircle(geoposition, radius)));
         CurrentGeofencesCollection.Add(new Geofence("Sample Five", new Geocircle(geoposition, radius)));
     }
 }