Пример #1
0
 private void DeclareGlobals()
 {
     if (!LocationSettings.TryGetLocationFromSettings(out location))
     {
         RefreshLocation();
     }
     RefreshSettings();
 }
Пример #2
0
 private void RefreshLocation()
 {
     if (!(LocationSettings.TryGetLocationFromSettings(out location) || LocationSettings.TryGetLocationFromDevice(out location)))
     {
         location = LocationSettings.GetLocationFromZip();
     }
     location.Latitude  = double.Parse(Shared.InputBox("Latitude", "Latitude", location.Latitude.ToString()));
     location.Longitude = double.Parse(Shared.InputBox("Longitude", "Longitude", location.Longitude.ToString()));
     LocationSettings.SaveLocationToConfig(location);
 }
Пример #3
0
 public static System.Device.Location.GeoCoordinate GetLocationFromZip()
 {
     return(LocationSettings.GetLatLong(int.Parse(LocationSettings.TryGetZip())));
 }