private void DeclareGlobals() { if (!LocationSettings.TryGetLocationFromSettings(out location)) { RefreshLocation(); } RefreshSettings(); }
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); }