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}"); } }
private void SwipeEnded(object sender, Syncfusion.ListView.XForms.SwipeEndedEventArgs e) { swipedItem = e.ItemData as GeofencePlace; }
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); }