public static void InitializeWorkbench() { LayoutConfiguration.LoadLayoutConfiguration(); StatusBarService.Initialize(); DomHostCallback.Register(); // must be called after StatusBarService.Initialize() ParserService.InitializeParserService(); Project.CustomToolsService.Initialize(); workbench = new DefaultWorkbench(); #endif MessageService.MainForm = workbench; PropertyService.PropertyChanged += new PropertyChangedEventHandler(TrackPropertyChanges); ResourceService.LanguageChanged += delegate { workbench.RedrawAllComponents(); }; caller = new STAThreadCaller(workbench); workbench.InitializeWorkspace(); workbench.SetMemento(PropertyService.Get(workbenchMemento, new Properties())); workbench.WorkbenchLayout = new SdiWorkbenchLayout(); OnWorkbenchCreated(); }
public static void InitializeWorkbench(System.Type workbenchtype) { LayoutConfiguration.LoadLayoutConfiguration(); StatusBarService.Initialize(); DomHostCallback.Register(); // must be called after StatusBarService.Initialize() ParserService.InitializeParserService(); Project.CustomToolsService.Initialize(); workbench = (ICSharpCode.SharpDevelop.Gui.DefaultWorkbench)Activator.CreateInstance(workbenchtype);
public static void InitializeWorkbench(IWorkbench workbench, IWorkbenchLayout layout) { WorkbenchSingleton.workbench = workbench; //DisplayBindingService.InitializeService(); LayoutConfiguration.LoadLayoutConfiguration(); //FileService.InitializeService(); StatusBarService.Initialize(); //DomHostCallback.Register(); // must be called after StatusBarService.Initialize() ParserService.InitializeParserService(); //Bookmarks.BookmarkManager.Initialize(); //Project.CustomToolsService.Initialize(); //Project.BuildModifiedProjectsOnlyService.Initialize(); workbench.Initialize(); workbench.SetMemento(PropertyService.Get(workbenchMemento, new Core.Properties())); caller = new STAThreadCaller(workbench.MainForm); WinFormsMessageService.DialogOwner = workbench.MainForm; WinFormsMessageService.DialogSynchronizeInvoke = workbench.MainForm; //RemoveXButton(WorkbenchSingleton.MainForm.Handle.ToInt32()); PropertyService.PropertyChanged += new PropertyChangedEventHandler(TrackPropertyChanges); ResourceService.LanguageChanged += delegate { workbench.RedrawAllComponents(); }; ApplicationStateInfoService.RegisterStateGetter(activeContentState, delegate { return(WorkbenchSingleton.Workbench.ActiveContent); }); // attach workbench layout -> load pads workbench.WorkbenchLayout = layout; OnWorkbenchCreated(); // initialize workbench-dependent services: // Project.ProjectService.InitializeService(); NavigationService.InitializeService(); workbench.ActiveContentChanged += delegate { LoggingService.Debug("ActiveContentChanged to " + workbench.ActiveContent); }; workbench.ActiveViewContentChanged += delegate { LoggingService.Debug("ActiveViewContentChanged to " + workbench.ActiveViewContent); }; workbench.ActiveWorkbenchWindowChanged += delegate { LoggingService.Debug("ActiveWorkbenchWindowChanged to " + workbench.ActiveWorkbenchWindow); }; }