コード例 #1
0
        public LocationModelManager(string localDatabaseName, string baseApiUrl, ApiHelper apiHelperParam)
        {
            this.localDatabaseName = localDatabaseName;
            this.baseApiUrl        = baseApiUrl;

            databaseHelper = new LocationModelDatabaseHelper(this.localDatabaseName, true);
            apiHelper      = new LocationModelAPIHelper(baseApiUrl, apiHelperParam);

            this.LocationModels = new ObservableCollection <LocationModel>();

            this.geolocationController.NewPositionEvent += NewPositionEventHandler;
            this.geolocationController.GetCurrentLocation();
        }
コード例 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="localDatabaseName"></param>
        /// <param name="baseApiUrl"></param>
        /// <param name="apiHelperParam"></param>
        public LocationController(string localDatabaseName, string baseApiUrl, ApiHelper apiHelperParam)
        {
            this.localDatabaseName = localDatabaseName;

            // Create the required helpers
            databaseHelper = new LocationModelDatabaseHelper(this.localDatabaseName, true);
            apiHelper      = new LocationModelApiHelper(baseApiUrl, apiHelperParam);

            // Create the collection
            LocationModels = new ObservableCollection <LocationModel>();

            // Subscribe to new location events
            geolocationController.NewPositionEvent += NewPositionEventHandler;
            geolocationController.GetCurrentLocation();
        }