示例#1
0
 /// <summary>
 /// Updates the locatin, if the watcher is ready.
 /// </summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="e">The event arguments.</param>
 private static void Watcher_StatusChanged(object sender, GeoPositionStatusChangedEventArgs e)
 {
     if (e.Status == GeoPositionStatus.Ready && !LocationQueryService.Watcher.Position.Location.IsUnknown)
     {
         LocationQueryService.SetLocation();
     }
 }
示例#2
0
 /// <summary>
 /// Sets the location, if the position has changed.
 /// </summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="e">The event arguments.</param>
 private static void Watcher_PositionChanged(object sender, GeoPositionChangedEventArgs <GeoCoordinate> e)
 {
     if (!LocationQueryService.Watcher.Position.Location.IsUnknown)
     {
         LocationQueryService.SetLocation();
     }
 }