private static BuildConfig MSRConfig(string name) { BuildConfig buildConfig = new BuildConfig(); buildConfig.buildConfiguration = name; buildConfig.editionName = buildConfig.buildConfiguration + " Edition Resurrection ;}"; buildConfig.debugModeEnabled = true; buildConfig.forceAffineControlVisible = true; buildConfig.enableS3 = true; buildConfig.usingManifests = true; //buildConfig.logInteractiveRenders = (buildConfig.buildConfiguration == "Development"); buildConfig.allFilesOption = "|All files (*.*)|*.*"; buildConfig.enableSnapFeatures = true; buildConfig.veFormatUpdateURL = "http://research.microsoft.com/mapcruncher/AppData/VEUrlFormat-3.1.5.xml"; buildConfig.debugLevel = 0; buildConfig.mapControl = "http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5"; buildConfig.hostHome = "http://research.microsoft.com/mapcruncher/scripts/v5.5/"; buildConfig.mapCruncherHomeSite = "http://research.microsoft.com/mapcruncher/"; return(buildConfig); }
private static BuildConfig MSRConfig(string name) { BuildConfig buildConfig = new BuildConfig(); buildConfig.buildConfiguration = name; buildConfig.editionName = buildConfig.buildConfiguration + " Edition Resurrection ;}"; buildConfig.debugModeEnabled = true; buildConfig.forceAffineControlVisible = true; buildConfig.enableS3 = true; buildConfig.usingManifests = true; //buildConfig.logInteractiveRenders = (buildConfig.buildConfiguration == "Development"); buildConfig.allFilesOption = "|All files (*.*)|*.*"; buildConfig.enableSnapFeatures = true; buildConfig.veFormatUpdateURL = "http://research.microsoft.com/mapcruncher/AppData/VEUrlFormat-3.1.5.xml"; buildConfig.debugLevel = 0; buildConfig.mapControl = "http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5"; buildConfig.hostHome = "http://research.microsoft.com/mapcruncher/scripts/v5.5/"; buildConfig.mapCruncherHomeSite = "http://research.microsoft.com/mapcruncher/"; return buildConfig; }
public static void Initialize() { try { Stream inStream = null; string name = "MapCruncherAppConfig.xml"; try { inStream = BuildConfig.OpenConfigFile(name); } catch (Exception) { } XmlDocument xmlDocument = new XmlDocument(); xmlDocument.Load(inStream); XmlNode xmlNode = xmlDocument.GetElementsByTagName("Build")[0]; string value = xmlNode.Attributes["Configuration"].Value; BuildConfig buildConfig; if (value == "MSR" || value == "Development") { buildConfig = BuildConfig.MSRConfig(value); } else { buildConfig = BuildConfig.VEConfig(); } foreach (XmlNode xmlNode2 in xmlDocument.GetElementsByTagName("Parameter")) { string value2 = xmlNode2.Attributes["Name"].Value; string value3 = xmlNode2.Attributes["Value"].Value; if (buildConfig.configurationDict.ContainsKey(value2)) { try { buildConfig.configurationDict[value2].ParseFrom(value3); continue; } catch (Exception ex) { D.Sayf(0, "Unable to parse field {0} value {1}: {2}", new object[] { value2, value3, ex.Message }); continue; } } D.Sayf(0, "Unrecognized field name {0}", new object[] { value2 }); } if (xmlNode.Attributes["AutoMaxZoomOffset"] != null) { buildConfig.autoMaxZoomOffset = Convert.ToInt32(xmlNode.Attributes["AutoMaxZoomOffset"].Value, CultureInfo.InvariantCulture); } BuildConfig.theConfig = buildConfig; } catch (Exception) { if (AppDomain.CurrentDomain.SetupInformation.ApplicationName.EndsWith(".vshost.exe")) { BuildConfig.theConfig = BuildConfig.MSRConfig("Development"); } else { BuildConfig.theConfig = BuildConfig.VEConfig(); } } }