예제 #1
0
 private void InitializeUserInterface()
 {
     //NOTE: ��ʼ�����ߴ���
     this._workspaceTool = new WorkspaceToolWindow(base.ServiceProvider);
     this._openDocsTool = new OpenDocumentsToolWindow(base.ServiceProvider);
     this._toolboxTool = new ToolboxToolWindow(base.ServiceProvider);
     this._propBrowserTool = new PropertyBrowserToolWindow(base.ServiceProvider);
     this._dataTool = new DataToolWindow(base.ServiceProvider);
     this._classViewTool = new ClassViewToolWindow(base.ServiceProvider);
     this._communityTool = new CommunityToolWindow(base.ServiceProvider);
     ImageList list = new ImageList();
     CommandBar commandBar = new CommandBar();
     MxToolBar mainToolBar = new MxToolBar();
     MxToolBar helpToolBar = new MxToolBar();
     MxToolBar documentToolBar = new MxToolBar();
     MxStatusBar statusBar = new MxStatusBar();
     this.leftContainer = new DockingContainer();
     DockingContainer rightContainer = new DockingContainer();
     Splitter splitter = new Splitter();
     Splitter splitter2 = new Splitter();
     MainMenu mainMenu = new MainMenu();
     MxStatusBarPanel panel = new MxStatusBarPanel();
     ProgressStatusBarPanel panel2 = new ProgressStatusBarPanel();
     EditorStatusBarPanel panel3 = new EditorStatusBarPanel();
     MxStatusBarPanel panel4 = new MxStatusBarPanel();
     MxStatusBarPanel panel5 = new MxStatusBarPanel();
     commandBar.SuspendLayout();
     base.SuspendLayout();
     ((ISupportInitialize) statusBar).BeginInit();
     list.ImageSize = new Size(0x10, 0x10);
     list.TransparentColor = Color.Lime;
     list.ColorDepth = ColorDepth.Depth32Bit;
     list.Images.AddStrip(new Bitmap(typeof(ApplicationWindow), "Commands.bmp"));
     mainToolBar.Appearance = ToolBarAppearance.Flat;
     mainToolBar.Divider = false;
     mainToolBar.DropDownArrows = true;
     mainToolBar.ShowToolTips = true;
     mainToolBar.TabIndex = 1;
     mainToolBar.TabStop = false;
     mainToolBar.TextAlign = ToolBarTextAlign.Right;
     mainToolBar.Wrappable = false;
     mainToolBar.ImageList = list;
     helpToolBar.Appearance = ToolBarAppearance.Flat;
     helpToolBar.Divider = false;
     helpToolBar.DropDownArrows = true;
     helpToolBar.ShowToolTips = true;
     helpToolBar.TabIndex = 1;
     helpToolBar.TabStop = false;
     helpToolBar.TextAlign = ToolBarTextAlign.Right;
     helpToolBar.Wrappable = false;
     helpToolBar.ImageList = list;
     Graphics graphics = Graphics.FromHwnd(IntPtr.Zero);
     helpToolBar.Width = (((int) graphics.MeasureString(new string('_', 30), this.Font).Width) + 0x18) + 6;
     graphics.Dispose();
     documentToolBar.Appearance = ToolBarAppearance.Flat;
     documentToolBar.Divider = false;
     documentToolBar.DropDownArrows = true;
     documentToolBar.ShowToolTips = true;
     documentToolBar.TabIndex = 0;
     documentToolBar.TabStop = false;
     documentToolBar.TextAlign = ToolBarTextAlign.Right;
     documentToolBar.Wrappable = false;
     documentToolBar.ImageList = list;
     commandBar.Dock = DockStyle.Top;
     commandBar.MenuBar = mainMenu;
     commandBar.TabIndex = 1;
     commandBar.TabStop = false;
     commandBar.Controls.Add(mainToolBar);
     commandBar.Controls.Add(helpToolBar);
     commandBar.Controls.Add(documentToolBar);
     commandBar.TopRightToolBar = helpToolBar;
     this.leftContainer.AssociatedSplitter = splitter;
     this.leftContainer.Dock = DockStyle.Left;
     this.leftContainer.Size = new Size(0x7d, 0x1fb);
     this.leftContainer.TabIndex = 3;
     this.leftContainer.TabStop = false;
     splitter.Size = new Size(4, 4);
     splitter.TabIndex = 4;
     splitter.TabStop = false;
     rightContainer.AssociatedSplitter = splitter2;
     rightContainer.Dock = DockStyle.Right;
     rightContainer.Size = new Size(230, 0x1fb);
     rightContainer.TabIndex = 5;
     rightContainer.TabStop = false;
     splitter2.Dock = DockStyle.Right;
     splitter2.Size = new Size(4, 4);
     splitter2.TabIndex = 6;
     splitter2.TabStop = false;
     panel.AutoSize = StatusBarPanelAutoSize.Spring;
     panel2.MinWidth = 0x80;
     panel2.Width = 0x80;
     panel3.Alignment = HorizontalAlignment.Center;
     panel3.Width = 0x80;
     panel3.MinWidth = 0x80;
     panel4.Alignment = HorizontalAlignment.Center;
     panel4.Width = 0x23;
     panel5.Alignment = HorizontalAlignment.Center;
     panel5.Width = 0x23;
     statusBar.Size = new Size(0x318, 20);
     statusBar.TabIndex = 2;
     statusBar.TabStop = false;
     statusBar.ShowPanels = true;
     statusBar.Panels.AddRange(new StatusBarPanel[] { panel, panel2, panel3, panel4, panel5 });
     this.AutoScaleBaseSize = new Size(5, 13);
     base.Icon = new Icon(typeof(ApplicationWindow), "WebIDE.ico");
     base.IsMdiContainer = true;
     base.Menu = mainMenu;
     base.StatusBar = statusBar;
     base.CommandBar = commandBar;
     base.MinimumSize = new Size(640, 480);
     this.Text = "Microsoft ASP.NET Web Matrix";
     base.Controls.AddRange(new Control[] { splitter2, rightContainer, splitter, this.leftContainer, statusBar, commandBar });
     this._windowManager = new MdiWindowManager(this);
     this._windowManager.EnableDocking(DockStyle.Left, this.leftContainer);
     this._windowManager.EnableDocking(DockStyle.Right, rightContainer);
     IWindowManager manager = this._windowManager;
     manager.AddToolWindow(this._toolboxTool, DockStyle.Left);
     manager.AddToolWindow(this._propBrowserTool, DockStyle.Right);
     manager.AddToolWindow(this._classViewTool, DockStyle.Right, 0);
     manager.AddToolWindow(this._communityTool, DockStyle.Right, 0);
     manager.AddToolWindow(this._workspaceTool, DockStyle.Right, -1);
     manager.AddToolWindow(this._dataTool, DockStyle.Right, 1);
     manager.AddToolWindow(this._openDocsTool, DockStyle.Right, 1);
     ((ISupportInitialize) statusBar).EndInit();
     commandBar.ResumeLayout(false);
     base.ResumeLayout(false);
 }