Exemplo n.º 1
0
 public UndoAddSourceMap(string filename, SourceMap newSourceMap, Layer addedToLayer, LayerControls layerControls, MainAppForm mainAppForm)
 {
     this.filename = filename;
     this.newSourceMap = newSourceMap;
     this.addedToLayer = addedToLayer;
     this.layerControls = layerControls;
     this.mainAppForm = mainAppForm;
 }
Exemplo n.º 2
0
		public int Main(string[] args)
		{
			Thread.CurrentThread.Name = "Main";
			DebugThreadInterrupter.theInstance.RegisterThread(Thread.CurrentThread);
			MainAppForm mainAppForm = null;
			try
			{
				this.ParseArgs(args);
				try
				{
					BuildConfig.Initialize();
					if (BuildConfig.theConfig.buildConfiguration == "Broken")
					{
						throw new ConfigurationException("MapCruncher configuration is broken. Please reinstall MapCruncher.");
					}

					if (this.remoteFoxitServer != null)
					{
						int result = this.remoteFoxitServer.Run();
						return result;
					}
					Application.EnableVisualStyles();
					mainAppForm = new MainAppForm(this.startDocumentPath, this.renderOnLaunch);
					mainAppForm.StartUpApplication();
				}
				catch (ConfigurationException ex)
				{
					D.Say(0, ex.ToString());
					HTMLMessageBox.Show(ex.Message, "MapCruncher Configuration Problem");
					int result = 2;
					return result;
				}
				Application.Run(mainAppForm);
			}
			finally
			{
				DebugThreadInterrupter.theInstance.Quit();
				if (mainAppForm != null)
				{
					mainAppForm.UndoConstruction();
				}
			}
			return ProgramInstance.applicationResultCode;
		}