コード例 #1
0
        private void btnCoordinatesClick(object sender, RoutedEventArgs e)
        {
            GeoLocation location = new GeoLocation();

            location.GetCurrentCoordinates(coord =>
            {
                tbLatitude.Text  = coord.Latitude.ToString();
                tbLongitude.Text = coord.Longitude.ToString();
            });
        }
コード例 #2
0
 public void RefreshCoordinatesAndClients(System.Action callback = null)
 {
     geoLocation.GetCurrentCoordinates(coord =>
     {
         currentPosition = coord;
         RefreshClients(() =>
         {
             if (callback != null)
             {
                 callback();
             }
         });
     });
 }