コード例 #1
0
ファイル: MainApp.cs プロジェクト: liukonen/DesertChanger
 private void DeclareGlobals()
 {
     if (!LocationSettings.TryGetLocationFromSettings(out location))
     {
         RefreshLocation();
     }
     RefreshSettings();
 }
コード例 #2
0
ファイル: MainApp.cs プロジェクト: liukonen/DesertChanger
 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);
 }