private void LocationManagerOnLocationLoadSuccess(object sender, LocationEventArgs locationEventArgs)
 {
     var DSManager = new DealServerFacade();
     deviceLocation = locationEventArgs.Location;
     DSManager.DealsDownloadSuccess += DsManagerOnDealsDownloadSuccess;
     DSManager.DownloadDealsAsync(new DealServerQueryModel()
     {
         Count = 10,
         Latitude = deviceLocation.Latitude,
         Longitude = deviceLocation.Longitude,
         Refinement = new QueryRefineModel()
         {
             Keyword = "",
             Offset = 0,
             Ranking = "",
             Resultsperbiz = 1,
             TimeOut = 10,
             source = ""
         }
     });
 }
Esempio n. 2
0
 private void GeoLocationCompleted(IAsyncOperation<Geoposition> asyncInfo, AsyncStatus asyncStatus)
 {
     if (asyncStatus == AsyncStatus.Completed)
     {
         var deviceLocation = (Geoposition)asyncInfo.GetResults();
         try
         {
             DeviceLocation = GeoLocationAdapter.GetLocationFromDeviceGeoPositionObject(deviceLocation);
         }
         catch (Exception ex)
         {
             DeviceLocation = GeoLocationAdapter.GetDefaultLocaiton();
         }
         OnLocationLoadSuccess(new LocationEventArgs(DeviceLocation));
     }
 }
Esempio n. 3
0
 static GlobalDataStore()
 {
     Location=new GeoLocation();
 }
Esempio n. 4
0
 public LocationEventArgs(GeoLocation _location)
 {
     location = _location;
 }