static void CreateWorkspace()                    //创建整个工作空间.
        {
            DefaultWorkbench w = new DefaultWorkbench(); //新建一个空的工作台实例.

            workbench = w;
            w.InitializeWorkspace();            //初始化菜单,工具栏,状态栏之类的东西.
        }
Пример #2
0
        public void Attach(IWorkbench currentWorkbench)
        {
            workbench = (DefaultWorkbench)currentWorkbench;
            workbench.Controls.Clear();

            tabControl.Style            = (Crownwood.Magic.Common.VisualStyle)propertyService.GetProperty("NetFocus.DataStructure.Gui.VisualStyle", Crownwood.Magic.Common.VisualStyle.IDE);
            tabControl.Dock             = DockStyle.Fill;
            tabControl.ShrinkPagesToFit = true;
            tabControl.ShowArrows       = false;
            tabControl.Appearance       = Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiBox;
            workbench.Controls.Add(tabControl);
            tabControl.Visible = false;

            dockManager = new DockingManager(workbench, VisualStyle.IDE);

            IStatusBarService statusBarService = (IStatusBarService)ServiceManager.Services.GetService(typeof(IStatusBarService));

            workbench.Controls.Add(statusBarService.Control);

            workbench.Menu = null;

            workbench.AddMenuAndToolbarControls();

            dockManager.InnerControl = tabControl;
            dockManager.OuterControl = statusBarService.Control;

            foreach (IViewContent content in workbench.ViewContentCollection)
            {
                ShowView(content);
            }

            contentVisibleHandler      = new DockingManager.ContentHandler(RefreshMainMenu);
            dockManager.ContentHidden += contentVisibleHandler;
            dockManager.ContentShown  += contentVisibleHandler;
        }
		static void CreateWorkspace()//创建整个工作空间.
		{
			DefaultWorkbench w = new DefaultWorkbench();//新建一个空的工作台实例.	
			workbench = w;				
			w.InitializeWorkspace();//初始化菜单,工具栏,状态栏之类的东西.

		}
		public void Attach(IWorkbench currentWorkbench)
		{
			workbench = (DefaultWorkbench)currentWorkbench;
			workbench.Controls.Clear();
			
			tabControl.Style = (Crownwood.Magic.Common.VisualStyle)propertyService.GetProperty("NetFocus.DataStructure.Gui.VisualStyle", Crownwood.Magic.Common.VisualStyle.IDE);
			tabControl.Dock = DockStyle.Fill;
			tabControl.ShrinkPagesToFit = true;
			tabControl.ShowArrows = false;
			tabControl.Appearance = Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiBox;
			workbench.Controls.Add(tabControl);
			tabControl.Visible = false;
			
			dockManager = new DockingManager(workbench, VisualStyle.IDE);

			IStatusBarService statusBarService = (IStatusBarService)ServiceManager.Services.GetService(typeof(IStatusBarService));
			workbench.Controls.Add(statusBarService.Control);

			workbench.Menu = null;

			workbench.AddMenuAndToolbarControls();

			dockManager.InnerControl = tabControl;
			dockManager.OuterControl = statusBarService.Control;
			
			foreach (IViewContent content in workbench.ViewContentCollection) 
			{
				ShowView(content);
			}

			contentVisibleHandler = new DockingManager.ContentHandler(RefreshMainMenu);
			dockManager.ContentHidden += contentVisibleHandler;
			dockManager.ContentShown  += contentVisibleHandler; 

		}