/// <summary> /// Initializes a new instance of the <see cref="GeofenceItemViewModel" /> class. /// </summary> /// <param name="geofenceHelper">The geofence helper.</param> /// <param name="fenceCenter">The fence center.</param> /// <exception cref="System.ArgumentNullException">geofenceHelper</exception> public GeofenceItemViewModel([NotNull] GeofenceHelper geofenceHelper, BasicGeoposition fenceCenter) { if (geofenceHelper == null) { throw new ArgumentNullException("geofenceHelper"); } _geofenceHelper = geofenceHelper; _fenceCenter = fenceCenter; }
/// <summary> /// Initializes a new instance of the <see cref="GeofenceListingViewModel" /> class. /// </summary> /// <param name="geofenceHelper">The geofence helper.</param> /// <exception cref="System.ArgumentNullException">geofenceHelper</exception> public GeofenceListingViewModel([NotNull] GeofenceHelper geofenceHelper) { if (geofenceHelper == null) { throw new ArgumentNullException("geofenceHelper"); } _geofenceHelper = geofenceHelper; if (!DesignMode.DesignModeEnabled) { _currentGeofences = new ObservableCollection <Geofence>(_geofenceHelper.GetCurrentFences()); } }
/// <summary> /// Initializes a new instance of the <see cref="SensorsExamplePage"/> class. /// </summary> public SensorsExamplePage() { _sensorSettings = ((App)Application.Current).SensorSettings; _sensorHelper = new SensorHelper(_sensorSettings); _geolocationHelper = new GeolocationHelper(_sensorSettings); _geofenceHelper = new GeofenceHelper(); _geofenceHelper.FenceUpdated += HandleGeofenceHelperFenceUpdated; _geofenceHelper.FenceRemoved += HandleGeofenceHelperFenceRemoved; InitializeComponent(); AddGeofencesToMap(); _navigationHelper = new NavigationHelper(this); _navigationHelper.LoadState += HandleNavigationHelperLoadState; _navigationHelper.SaveState += HandleNavigationHelperSaveState; }