Ejemplo n.º 1
0
		void Run(string[] args)
		{						
			SharpSnippetCompilerManager.Init();
		
			mainForm = new MainForm();
			
			// Force creation of the debugger before workbench is created.
			IDebugger debugger = DebuggerService.CurrentDebugger;
			
			Workbench workbench = new Workbench(mainForm);
			WorkbenchSingleton.InitializeWorkbench(workbench, new WorkbenchLayout());
			PadDescriptor errorList = workbench.GetPad(typeof(ErrorListPad));
			errorList.CreatePad();
			mainForm.ErrorList = errorList.PadContent.Control;			
			
			PadDescriptor outputList = workbench.GetPad(typeof(CompilerMessageView));
			outputList.CreatePad();
			mainForm.OutputList = outputList.PadContent.Control;
			
			mainForm.Visible = true;
			
			SnippetCompilerProject.Load();
			IProject project = GetCurrentProject();
			ProjectService.CurrentProject = project;
			LoadFiles(project);
			
			ParserService.StartParserThread();
			
			//WorkbenchSingleton.SafeThreadAsyncCall(new Action<Program>(LoadFile));
							
			try {
				Application.Run(mainForm);
			} finally {
				try {
					// Save properties
					//PropertyService.Save();
				} catch (Exception ex) {
					MessageService.ShowError(ex, "Properties could not be saved.");
				}
			}
		}