void OnDeleteCommandExecuted(GeofencePlace place)
        {
            try
            {
                CrossGeofencing.Current.StopMonitoring(
                    new GeofenceRegion(place.ID,
                                       new Position(place.Latitude, place.Longitude),
                                       Distance.FromMeters(place.Radius)));

                if (!CrossGeofencing.Current.MonitoredRegions.Any())
                {
                    MessagingCenter.Send("", "StopGeofencingService", "");
                }

                LoadCommand.Execute();
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine($"Error deleting geofence place: {ex.Message}");
            }
        }
示例#2
0
 private void SwipeEnded(object sender, Syncfusion.ListView.XForms.SwipeEndedEventArgs e)
 {
     swipedItem = e.ItemData as GeofencePlace;
 }
示例#3
0
 private void SwipeStarted(object sender, Syncfusion.ListView.XForms.SwipeStartedEventArgs e)
 {
     swipedItem = null;
 }
 async void OnEditCommandExecuted(GeofencePlace place)
 {
     await NavigationService.NavigateAsync($"AddEditGeofencePage", new NavigationParameters {
         { "place", place }
     }, false);
 }