private void InitializeComponent() { MxToolBar bar = new MxToolBar(); ToolBarButton button = new ToolBarButton(); ToolBarButton button2 = new ToolBarButton(); ImageList list = new ImageList(); this._commandBar = new CommandBar(); this._printButton = new MxToolBarButton(); this._closeButton = new MxToolBarButton(); this._firstButton = new MxToolBarButton(); this._lastButton = new MxToolBarButton(); this._nextButton = new MxToolBarButton(); this._prevButton = new MxToolBarButton(); this._zoomButton = new ComboBoxToolBarButton(); this._settingsButton = new MxToolBarButton(); this._onePageButton = new MxToolBarButton(); this._twoPagesButton = new MxToolBarButton(); this._fourPagesButton = new MxToolBarButton(); this._preview = new PrintPreviewControl(); this._statusBar = new MxStatusBar(); this._textPanel = new MxStatusBarPanel(); this._progressPanel = new ProgressStatusBarPanel(); this._pageIndexPanel = new MxStatusBarPanel(); list.ImageSize = new Size(0x10, 0x10); list.TransparentColor = Color.Fuchsia; list.ColorDepth = ColorDepth.Depth32Bit; list.Images.AddStrip(new Bitmap(typeof(PrintPreviewDialog), "PrintPreviewCommands.bmp")); this._printButton.Text = "Print"; this._printButton.ToolTipText = "Print this document"; this._printButton.ImageIndex = 0; this._printButton.Tag = 1; this._printButton.Enabled = false; this._closeButton.Text = "Close"; this._closeButton.ToolTipText = "Close and return to document"; this._closeButton.ImageIndex = 1; this._closeButton.Tag = 2; this._firstButton.ToolTipText = "Go to the first page"; this._firstButton.ImageIndex = 2; this._firstButton.Tag = 5; this._firstButton.Enabled = false; this._prevButton.ToolTipText = "Go to the previous page"; this._prevButton.ImageIndex = 3; this._prevButton.Tag = 4; this._prevButton.Enabled = false; this._nextButton.ToolTipText = "Go to the next page"; this._nextButton.ImageIndex = 4; this._nextButton.Tag = 3; this._nextButton.Enabled = false; this._lastButton.ToolTipText = "Go to the last page"; this._lastButton.ImageIndex = 5; this._lastButton.Tag = 6; this._lastButton.Enabled = false; this._zoomButton.Text = "_____________"; this._zoomButton.ComboBoxItems = new string[] { "Fit to Window", "25%", "50%", "100%", "150%", "200%" }; this._settingsButton.ToolTipText = "Printer Settings"; this._settingsButton.ImageIndex = 6; this._settingsButton.Tag = 7; this._onePageButton.ToolTipText = "One Page at a time"; this._onePageButton.ImageIndex = 7; this._onePageButton.Tag = 8; this._onePageButton.Pushed = true; this._onePageButton.Enabled = false; this._twoPagesButton.ToolTipText = "Two pages at a time"; this._twoPagesButton.ImageIndex = 8; this._twoPagesButton.Tag = 9; this._twoPagesButton.Enabled = false; this._fourPagesButton.ToolTipText = "Four pages at a time"; this._fourPagesButton.ImageIndex = 9; this._fourPagesButton.Tag = 10; this._fourPagesButton.Enabled = false; button.Style = ToolBarButtonStyle.Separator; button2.Style = ToolBarButtonStyle.Separator; bar.Divider = false; bar.Appearance = ToolBarAppearance.Flat; bar.TextAlign = ToolBarTextAlign.Right; bar.Wrappable = false; bar.ShowToolTips = true; bar.DropDownArrows = false; bar.TabIndex = 0; bar.ImageList = list; bar.ButtonClick += new ToolBarButtonClickEventHandler(this.OnToolBarButtonClicked); bar.ComboBoxCreated += new ToolBarComboBoxButtonEventHandler(this.OnToolBarComboBoxCreated); bar.Buttons.AddRange(new ToolBarButton[] { this._printButton, this._settingsButton, this._closeButton, button, this._zoomButton, this._onePageButton, this._twoPagesButton, this._fourPagesButton, button2, this._firstButton, this._prevButton, this._nextButton, this._lastButton }); this._commandBar.Dock = DockStyle.Top; this._commandBar.TabIndex = 0; this._commandBar.Controls.Add(bar); this._preview.Dock = DockStyle.Fill; this._preview.TabIndex = 1; this._preview.TabStop = false; this._preview.StartPageChanged += new EventHandler(this.OnPreviewStartPageChanged); this._textPanel.AutoSize = StatusBarPanelAutoSize.Spring; this._progressPanel.MinWidth = 0x80; this._progressPanel.Width = 0x80; this._pageIndexPanel.Alignment = HorizontalAlignment.Center; this._pageIndexPanel.AutoSize = StatusBarPanelAutoSize.Contents; this._pageIndexPanel.MinWidth = 0x80; this._statusBar.Dock = DockStyle.Bottom; this._statusBar.TabStop = false; this._statusBar.ShowPanels = true; this._statusBar.Panels.AddRange(new StatusBarPanel[] { this._textPanel, this._progressPanel, this._pageIndexPanel }); this.Text = "Print Preview"; base.Size = new Size(800, 600); base.MinimumSize = new Size(200, 150); base.ShowInTaskbar = false; base.MinimizeBox = false; base.SizeGripStyle = SizeGripStyle.Show; base.StartPosition = FormStartPosition.CenterParent; base.Icon = new Icon(typeof(PrintPreviewDialog), "PrintPreviewDialog.ico"); base.Controls.AddRange(new Control[] { this._preview, this._commandBar, this._statusBar }); }
protected override void InitializeUserInterface() { base.InitializeUserInterface(); this._selectionContainer = new Panel(); this._selectionContainer.Dock = DockStyle.Top; this._selectionContainer.Height = _docHeight; this._selectionContainer.TabIndex = 1; this._selectionContainer.BackColor = SystemColors.Control; this._selectionContainer.SuspendLayout(); base.SuspendLayout(); base.Editor.AbsolutePositioningEnabled = false; base.Editor.BordersVisible = false; base.Editor.GlyphsVisible = false; base.Editor.GridVisible = false; this._imageList = new ImageList(); this._filterList = new ArrayList(); this._baseFilterList = new object[] { "isHTML32", "isWML11", "isCHTML10", "isGoAmerica", "isMME", "isMyPalm", "isPocketIE", "isUP3X", "isUP4X", "isEriccsonR380", "isNokia7110", "prefersGIF", "prefersWBMP", "supportsColor", "supportsCookies", "supportsJavaScript", "supportsVoiceCalls", "(Default)" }; this._filterList.AddRange(this._baseFilterList); Bitmap bitmap = new Bitmap(typeof(MobileWebFormsDesignView), "Customization.bmp"); Bitmap bitmap2 = new Bitmap(typeof(MobileWebFormsDesignView), "AllDevice.bmp"); bitmap.MakeTransparent(); bitmap2.MakeTransparent(); this._imageList.ImageSize = new Size(0x10, 0x10); this._imageList.Images.Add(bitmap2); this._imageList.Images.Add(bitmap); this._allDeviceModeToolBarButton = new ToolBarButton(); this._allDeviceModeToolBarButton.Text = "All Device Mode"; this._allDeviceModeToolBarButton.ImageIndex = 0; this._allDeviceModeToolBarButton.Pushed = true; this._allDeviceModeToolBarButton.Style = ToolBarButtonStyle.ToggleButton; this._allDeviceModeToolBarButton.ToolTipText = "All Device Mode"; this._customizationModeToolBarButton = new ToolBarButton(); this._customizationModeToolBarButton.Text = "Customization Mode"; this._customizationModeToolBarButton.ImageIndex = 1; this._customizationModeToolBarButton.Pushed = false; this._customizationModeToolBarButton.Style = ToolBarButtonStyle.ToggleButton; this._customizationModeToolBarButton.ToolTipText = "Customization Mode"; this._editingModeToolBar = new MxToolBar(); this._editingModeToolBar.Appearance = ToolBarAppearance.Flat; this._editingModeToolBar.Divider = false; this._editingModeToolBar.Dock = DockStyle.None; this._editingModeToolBar.DropDownArrows = true; this._editingModeToolBar.ImageList = this._imageList; this._editingModeToolBar.Location = new Point(4, 4); this._editingModeToolBar.ShowToolTips = true; this._editingModeToolBar.Size = new Size(240, 0x19); this._editingModeToolBar.TabIndex = 2; this._editingModeToolBar.TextAlign = ToolBarTextAlign.Right; this._editingModeToolBar.Wrappable = false; this._editingModeToolBar.ButtonClick += new ToolBarButtonClickEventHandler(this.OnToolBarButtonClick); this._editingModeToolBar.Buttons.AddRange(new ToolBarButton[] { this._allDeviceModeToolBarButton, this._customizationModeToolBarButton }); this._filterComboBox = new MxComboBox(); this._filterComboBox.DropDownStyle = ComboBoxStyle.DropDownList; this._filterComboBox.Enabled = false; this._filterComboBox.FlatAppearance = true; this._filterComboBox.Items.AddRange(this._filterList.ToArray()); this._filterComboBox.Location = new Point(250, 5); this._filterComboBox.Size = new Size(160, 0x18); this._filterComboBox.SelectedIndex = 0; this._filterComboBox.SelectedIndexChanged += new EventHandler(this.OnModeChanged); this._filterComboBox.TabIndex = 3; this._editorContainer = new Panel(); this._editorContainer.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top; this._editorContainer.Height = base.Height - _docHeight; this._editorContainer.Location = new Point(0, _docHeight); this._editorContainer.SuspendLayout(); this._editorContainer.Width = base.Width; this._selectionContainer.Controls.AddRange(new Control[] { this._editingModeToolBar, this._filterComboBox }); this._editorContainer.Controls.Add(base.Editor); base.Controls.Add(this._editorContainer); base.Controls.Add(this._selectionContainer); this._editorContainer.ResumeLayout(false); this._selectionContainer.ResumeLayout(false); base.ResumeLayout(false); }
private void InitializeUserInterface() { Panel panel = new Panel(); this._timer = new Timer(); this._timer.Enabled = false; this._timer.Tick += new EventHandler(this.OnTimerTick); this._buttonImages = new ImageList(); this._buttonImages.ColorDepth = ColorDepth.Depth32Bit; this._buttonImages.ImageSize = new Size(0x10, 0x10); this._toolBar = new MxToolBar(); this._toolBar.Appearance = ToolBarAppearance.Flat; this._toolBar.Divider = false; this._toolBar.DropDownArrows = false; this._toolBar.ShowToolTips = true; this._toolBar.TabIndex = 0; this._toolBar.TextAlign = ToolBarTextAlign.Right; this._toolBar.Wrappable = false; this._toolBar.ImageList = this._buttonImages; this._toolBar.ButtonClick += new ToolBarButtonClickEventHandler(this.OnToolBarButtonClick); this._communityView = new PageViewer(); this._communityView.Dock = DockStyle.Fill; this._communityView.TabIndex = 0; panel.SuspendLayout(); base.SuspendLayout(); panel.BackColor = SystemColors.ControlDark; panel.Dock = DockStyle.Fill; panel.DockPadding.All = 1; panel.TabIndex = 1; panel.Controls.Add(this._communityView); base.Controls.AddRange(new Control[] { panel, this._toolBar }); this.Text = "Community"; base.Icon = new Icon(typeof(CommunityToolWindow), "CommunityToolWindow.ico"); panel.ResumeLayout(false); base.ResumeLayout(false); }
private void InitializeUserInterface() { this._bottomPanel = new Panel(); this._columnPropertyGrid = new PropertyGrid(); this._verticalSplitter = new Splitter(); this._columnPropertyHelpLabel = new Label(); this._horizontalSplitter = new Splitter(); this._topPanel = new Panel(); this._columnCommandsToolBar = new MxToolBar(); this._moveColumnUpToolBarButton = new MxToolBarButton(); this._moveColumnDownToolBarButton = new MxToolBarButton(); this._deleteColumnToolBarButton = new MxToolBarButton(); this._newColumnToolBarButton = new MxToolBarButton(); this._separator1ToolBarButton = new MxToolBarButton(); this._separator2ToolBarButton = new MxToolBarButton(); this._columnsListView = new MxListView(); this._columnNameColumnHeader = new ColumnHeader(); this._dataTypeColumnHeader = new ColumnHeader(); this._sizeColumnHeader = new ColumnHeader(); this._allowNullsColumnHeader = new ColumnHeader(); this._columnImageList = new ImageList(); this._errorLabel = new MxInfoLabel(); this._bottomPanel.SuspendLayout(); this._topPanel.SuspendLayout(); base.SuspendLayout(); this._errorLabel.Dock = DockStyle.Top; this._errorLabel.Image = MxInfoLabel.ErrorGlyph; this._errorLabel.Location = new Point(0, 0); this._errorLabel.Padding = 2; this._errorLabel.Size = new Size(660, 160); this._errorLabel.Visible = false; this._errorLabel.DoubleClick += new EventHandler(this.OnErrorLabelDoubleClick); this._bottomPanel.BackColor = SystemColors.Control; this._bottomPanel.Controls.AddRange(new Control[] { this._columnPropertyGrid, this._verticalSplitter, this._columnPropertyHelpLabel }); this._bottomPanel.Dock = DockStyle.Bottom; this._bottomPanel.Location = new Point(2, 0xd4); this._bottomPanel.Name = "_bottomPanel"; this._bottomPanel.Size = new Size(660, 200); this._bottomPanel.TabIndex = 0; this._columnPropertyGrid.CommandsVisibleIfAvailable = false; this._columnPropertyGrid.Dock = DockStyle.Fill; this._columnPropertyGrid.HelpVisible = false; this._columnPropertyGrid.LargeButtons = false; this._columnPropertyGrid.LineColor = SystemColors.Control; this._columnPropertyGrid.Name = "_columnPropertyGrid"; this._columnPropertyGrid.PropertySort = PropertySort.Categorized; this._columnPropertyGrid.Size = new Size(0x18d, 200); this._columnPropertyGrid.TabIndex = 5; this._columnPropertyGrid.ToolbarVisible = false; this._columnPropertyGrid.ViewBackColor = SystemColors.Window; this._columnPropertyGrid.ViewForeColor = SystemColors.WindowText; this._columnPropertyGrid.SelectedGridItemChanged += new SelectedGridItemChangedEventHandler(this.OnColumnPropertyGridSelectedGridItemChanged); this._columnPropertyGrid.PropertyValueChanged += new PropertyValueChangedEventHandler(this.OnColumnPropertyGridPropertyValueChanged); this._verticalSplitter.Dock = DockStyle.Right; this._verticalSplitter.Location = new Point(0x18d, 0); this._verticalSplitter.Name = "_verticalSplitter"; this._verticalSplitter.Size = new Size(3, 200); this._verticalSplitter.TabIndex = 4; this._verticalSplitter.TabStop = false; this._columnPropertyHelpLabel.BorderStyle = BorderStyle.Fixed3D; this._columnPropertyHelpLabel.Dock = DockStyle.Right; this._columnPropertyHelpLabel.ForeColor = Color.Blue; this._columnPropertyHelpLabel.Location = new Point(400, 0); this._columnPropertyHelpLabel.Name = "_columnPropertyHelpLabel"; this._columnPropertyHelpLabel.Size = new Size(260, 200); this._columnPropertyHelpLabel.TabIndex = 3; this._columnPropertyHelpLabel.TextAlign = ContentAlignment.MiddleCenter; this._horizontalSplitter.Dock = DockStyle.Bottom; this._horizontalSplitter.Location = new Point(2, 0xd1); this._horizontalSplitter.Name = "_horizontalSplitter"; this._horizontalSplitter.Size = new Size(660, 3); this._horizontalSplitter.TabIndex = 1; this._horizontalSplitter.TabStop = false; this._topPanel.Controls.AddRange(new Control[] { this._columnsListView, this._columnCommandsToolBar }); this._topPanel.Dock = DockStyle.Fill; this._topPanel.Location = new Point(2, 2); this._topPanel.Name = "_topPanel"; this._topPanel.Size = new Size(660, 0xcf); this._topPanel.TabIndex = 2; this._columnCommandsToolBar.Appearance = ToolBarAppearance.Flat; this._columnCommandsToolBar.Buttons.AddRange(new ToolBarButton[] { this._newColumnToolBarButton, this._separator1ToolBarButton, this._moveColumnUpToolBarButton, this._moveColumnDownToolBarButton, this._separator2ToolBarButton, this._deleteColumnToolBarButton }); this._columnCommandsToolBar.Divider = false; this._columnCommandsToolBar.DropDownArrows = true; this._columnCommandsToolBar.ImageList = this._columnImageList; this._columnCommandsToolBar.Name = "_columnCommandsToolBar"; this._columnCommandsToolBar.ShowToolTips = true; this._columnCommandsToolBar.TabIndex = 5; this._columnCommandsToolBar.TextAlign = ToolBarTextAlign.Right; this._columnCommandsToolBar.Wrappable = false; this._columnCommandsToolBar.ButtonClick += new ToolBarButtonClickEventHandler(this.OnColumnCommandsToolBarButtonClick); this._moveColumnUpToolBarButton.ImageIndex = 2; this._moveColumnUpToolBarButton.ToolTipText = "Move Selected Column Up (Ctrl+Up)"; this._moveColumnDownToolBarButton.ImageIndex = 3; this._moveColumnDownToolBarButton.ToolTipText = "Move Selected Column Down (Ctrl+Down)"; this._deleteColumnToolBarButton.ImageIndex = 5; this._deleteColumnToolBarButton.ToolTipText = "Delete Selected Column (Del)"; this._newColumnToolBarButton.ImageIndex = 4; this._newColumnToolBarButton.Text = "New"; this._newColumnToolBarButton.ToolTipText = "Add New Column (Ins)"; this._separator1ToolBarButton.Style = ToolBarButtonStyle.Separator; this._separator2ToolBarButton.Style = ToolBarButtonStyle.Separator; this._columnsListView.Dock = DockStyle.Fill; this._columnsListView.Columns.AddRange(new ColumnHeader[] { this._columnNameColumnHeader, this._dataTypeColumnHeader, this._sizeColumnHeader, this._allowNullsColumnHeader }); this._columnsListView.FullRowSelect = true; this._columnsListView.HeaderStyle = ColumnHeaderStyle.Nonclickable; this._columnsListView.HideSelection = false; this._columnsListView.LabelEdit = true; this._columnsListView.LabelWrap = false; this._columnsListView.Location = new Point(0, 0x18); this._columnsListView.MultiSelect = false; this._columnsListView.Name = "_columnsListView"; this._columnsListView.Size = new Size(0x292, 0x11a); this._columnsListView.SmallImageList = this._columnImageList; this._columnsListView.TabIndex = 0; this._columnsListView.View = View.Details; this._columnsListView.AfterLabelEdit += new LabelEditEventHandler(this.OnColumnsListViewAfterLabelEdit); this._columnsListView.KeyDown += new KeyEventHandler(this.OnColumnsListViewKeyDown); this._columnsListView.SelectedIndexChanged += new EventHandler(this.OnColumnsListViewSelectedIndexChanged); this._columnNameColumnHeader.Text = "Column Name"; this._columnNameColumnHeader.Width = 200; this._dataTypeColumnHeader.Text = "Data Type"; this._dataTypeColumnHeader.Width = 100; this._sizeColumnHeader.Text = "Size"; this._sizeColumnHeader.Width = 100; this._allowNullsColumnHeader.Text = "Allow Nulls"; this._allowNullsColumnHeader.Width = 0x4b; this._columnImageList.ColorDepth = ColorDepth.Depth8Bit; this._columnImageList.ImageSize = new Size(0x10, 0x10); this._columnImageList.TransparentColor = Color.FromArgb(0xff, 0, 0xff, 0); this._columnImageList.Images.AddStrip(new Bitmap(typeof(TableView), "TableDesignImages.bmp")); this.BackColor = SystemColors.Control; base.ClientSize = new Size(0x298, 0x19e); base.Controls.AddRange(new Control[] { this._topPanel, this._horizontalSplitter, this._bottomPanel, this._errorLabel }); this.Font = new Font("Tahoma", 8f); this._bottomPanel.ResumeLayout(false); this._topPanel.ResumeLayout(false); base.ResumeLayout(false); }
private void InitializeComponent() { Panel panel = new Panel(); ImageList list = new ImageList(); ToolBarButton button = new MxToolBarButton(); ToolBarButton button2 = new MxToolBarButton(); ToolBarButton button3 = new MxToolBarButton(); this._toolBar = new MxToolBar(); this._newDatabaseButton = new MxToolBarButton(); this._closeDatabaseButton = new MxToolBarButton(); this._refreshButton = new MxToolBarButton(); this._deleteButton = new MxToolBarButton(); this._newItemButton = new MxToolBarButton(); this._openButton = new MxToolBarButton(); this._treeView = new MxTreeView(); panel.SuspendLayout(); base.SuspendLayout(); list.ImageSize = new Size(0x10, 0x10); list.TransparentColor = Color.Lime; list.ColorDepth = ColorDepth.Depth32Bit; list.Images.AddStrip(new Bitmap(typeof(DataToolWindow), "DataToolBar.bmp")); this._toolBar.Appearance = ToolBarAppearance.Flat; this._toolBar.Divider = false; this._toolBar.DropDownArrows = true; this._toolBar.ShowToolTips = true; this._toolBar.TabIndex = 0; this._toolBar.TextAlign = ToolBarTextAlign.Right; this._toolBar.Wrappable = false; this._toolBar.ImageList = list; this._toolBar.ButtonClick += new ToolBarButtonClickEventHandler(this.OnToolBarButtonClick); this._newDatabaseButton.ImageIndex = 0; this._newDatabaseButton.ToolTipText = "Add Database Connection"; this._closeDatabaseButton.ImageIndex = 1; this._closeDatabaseButton.ToolTipText = "Close Database Connection"; button.Style = ToolBarButtonStyle.Separator; button2.Style = ToolBarButtonStyle.Separator; button3.Style = ToolBarButtonStyle.Separator; this._refreshButton.ImageIndex = 3; this._refreshButton.ToolTipText = "Refresh"; this._deleteButton.ImageIndex = 4; this._deleteButton.ToolTipText = "Delete"; this._newItemButton.ImageIndex = 5; this._newItemButton.ToolTipText = "New Database Object"; this._openButton.ImageIndex = 2; this._openButton.ToolTipText = "Open"; this._toolBar.Buttons.AddRange(new ToolBarButton[] { this._openButton, button, this._newItemButton, this._deleteButton, button2, this._refreshButton, button3, this._newDatabaseButton, this._closeDatabaseButton }); this._treeView.AllowDrop = true; this._treeView.BorderStyle = BorderStyle.None; this._treeView.Dock = DockStyle.Fill; this._treeView.HideSelection = false; this._treeView.TabIndex = 0; this._treeView.ImageList = list; this._treeView.AfterSelect += new TreeViewEventHandler(this.OnAfterSelectTreeView); this._treeView.BeforeExpand += new TreeViewCancelEventHandler(this.OnBeforeExpandTreeView); this._treeView.NodeDoubleClick += new TreeViewEventHandler(this.OnDoubleClickTreeView); this._treeView.ItemDrag += new ItemDragEventHandler(this.OnItemDragTreeView); panel.BackColor = SystemColors.ControlDark; panel.Controls.Add(this._treeView); panel.Dock = DockStyle.Fill; panel.DockPadding.All = 1; panel.TabIndex = 1; base.Controls.AddRange(new Control[] { panel, this._toolBar }); panel.ResumeLayout(false); base.ResumeLayout(false); this.UpdateToolBarButtons(null); }
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); }
public void AddToolBar(MxToolBar toolBar) { toolBar.ButtonClick += new ToolBarButtonClickEventHandler(this.OnToolBarButtonClicked); toolBar.ComboBoxCreated += new ToolBarComboBoxButtonEventHandler(this.OnToolBarComboBoxCreated); this._toolBars.Add(toolBar); }
private void InitializeComponent() { Panel panel = new Panel(); ImageList list = new ImageList(); ImageList list2 = new ImageList(); list.ImageSize = new Size(0x10, 0x10); list.TransparentColor = Color.Green; list.ColorDepth = ColorDepth.Depth32Bit; list.Images.AddStrip(new Bitmap(typeof(ClassViewToolWindow), "ClassViewTreeImages.bmp")); list2.ImageSize = new Size(0x10, 0x10); list2.TransparentColor = Color.Red; list2.ColorDepth = ColorDepth.Depth32Bit; list2.Images.AddStrip(new Bitmap(typeof(ClassViewToolWindow), "ClassViewToolBar.bmp")); System.Type commandGroup = typeof(ClassViewCommands); this._commandManager = new CommandManager(base.ServiceProvider, this); this._toolBar1 = new MxToolBar(); this._toolBar1.Appearance = ToolBarAppearance.Flat; this._toolBar1.Divider = false; this._toolBar1.DropDownArrows = true; this._toolBar1.ShowToolTips = true; this._toolBar1.TabIndex = 0; this._toolBar1.TextAlign = ToolBarTextAlign.Right; this._toolBar1.Wrappable = false; this._toolBar1.ImageList = list2; if (!this._searchOnly) { MxToolBarButton button = new MxToolBarButton(); MxToolBarButton button2 = new MxToolBarButton(); MxToolBarButton button3 = new MxToolBarButton(); MxToolBarButton button4 = new MxToolBarButton(); MxToolBarButton button5 = new MxToolBarButton(); ToolBarButton button6 = new ToolBarButton(); button2.ImageIndex = 1; button2.ToolTipText = "Browse By Assembly"; button.ImageIndex = 2; button.ToolTipText = "Browse By Namespace"; button3.ImageIndex = 3; button3.ToolTipText = "Sort Alphabetically"; button4.ImageIndex = 4; button4.ToolTipText = "Sort By Class Type"; button5.ImageIndex = 5; button5.ToolTipText = "Sort By Visibility"; button6.Style = ToolBarButtonStyle.Separator; if (!ClassViewPackage.IsClassBrowserApplication) { MxToolBarButton button7 = new MxToolBarButton(); MxToolBarButton button8 = new MxToolBarButton(); MxToolBarButton button9 = new MxToolBarButton(); MxToolBarButton button10 = new MxToolBarButton(); MxToolBarButton button11 = new MxToolBarButton(); ComboBoxToolBarButton button12 = new ComboBoxToolBarButton(); ToolBarButton button13 = new ToolBarButton(); button7.ImageIndex = 0; button7.ToolTipText = "Browse Search Results"; button8.ImageIndex = 7; button8.ToolTipText = "View Non-Public Classes"; button9.ImageIndex = 6; button9.ToolTipText = "Add/Remove Assemblies"; button10.ImageIndex = 8; button10.ToolTipText = "Find By Type Name"; button11.ImageIndex = 9; button11.ToolTipText = "Find By Member Name"; button12.DropDownStyle = ComboBoxStyle.DropDown; button12.Text = new string('_', 0x16); button12.InitialText = "Enter Name to Search"; button12.ToolTipText = "Search for a Class"; button13.Style = ToolBarButtonStyle.Separator; this._toolBar1.Buttons.AddRange(new ToolBarButton[] { button, button2, button7, button6, button3, button4, button5, button13, button8, button9 }); this._toolBar2 = new MxToolBar(); this._toolBar2.Appearance = ToolBarAppearance.Flat; this._toolBar2.Divider = false; this._toolBar2.DropDownArrows = false; this._toolBar2.ShowToolTips = true; this._toolBar2.TabIndex = 0; this._toolBar2.TextAlign = ToolBarTextAlign.Right; this._toolBar2.Wrappable = false; this._toolBar2.ImageList = list2; this._toolBar2.Buttons.AddRange(new ToolBarButton[] { button12 }); this._commandManager.AddCommand(button7, commandGroup, 15); this._commandManager.AddCommand(button8, commandGroup, 0x10); this._commandManager.AddCommand(button9, commandGroup, 1); this._commandManager.AddCommand(button12, commandGroup, 5); this._commandManager.AddToolBar(this._toolBar2); } else { this._toolBar1.Buttons.AddRange(new ToolBarButton[] { button, button2, button6, button3, button4, button5 }); } this._commandManager.AddCommand(button, commandGroup, 14); this._commandManager.AddCommand(button2, commandGroup, 13); this._commandManager.AddCommand(button3, commandGroup, 10); this._commandManager.AddCommand(button4, commandGroup, 11); this._commandManager.AddCommand(button5, commandGroup, 12); this._commandManager.AddToolBar(this._toolBar1); } else { MxToolBarButton button14 = new MxToolBarButton(); MxToolBarButton button15 = new MxToolBarButton(); ComboBoxToolBarButton button16 = new ComboBoxToolBarButton(); ToolBarButton button17 = new ToolBarButton(); button14.ImageIndex = 8; button14.ToolTipText = "Find By Type Name"; button14.Text = "Types"; button15.ImageIndex = 9; button15.ToolTipText = "Find By Member Name"; button15.Text = "Members"; button16.DropDownStyle = ComboBoxStyle.DropDown; button16.Text = new string('_', 0x2d); button16.InitialText = "Enter Name to Search"; button16.ToolTipText = "Search for a Class"; button17.Style = ToolBarButtonStyle.Separator; this._toolBar1.Buttons.AddRange(new ToolBarButton[] { button14, button15, button17, button16 }); this._commandManager.AddCommand(button14, commandGroup, 6); this._commandManager.AddCommand(button15, commandGroup, 7); this._commandManager.AddCommand(button16, commandGroup, 5); this._commandManager.AddToolBar(this._toolBar1); } panel.SuspendLayout(); base.SuspendLayout(); panel.BackColor = SystemColors.ControlDark; panel.Dock = DockStyle.Fill; panel.DockPadding.All = 1; panel.TabIndex = 1; if (!this._searchOnly) { this._treeView = new MxTreeView(); this._treeView.BorderStyle = BorderStyle.None; this._treeView.Dock = DockStyle.Fill; this._treeView.HideSelection = false; this._treeView.ShowLines = false; this._treeView.TabIndex = 0; this._treeView.ImageList = list; this._treeView.AfterCollapse += new TreeViewEventHandler(this.OnAfterCollapseTreeView); this._treeView.AfterSelect += new TreeViewEventHandler(this.OnAfterSelectTreeView); this._treeView.BeforeCollapse += new TreeViewCancelEventHandler(this.OnBeforeCollapseTreeView); this._treeView.BeforeExpand += new TreeViewCancelEventHandler(this.OnBeforeExpandTreeView); this._treeView.NodeDoubleClick += new TreeViewEventHandler(this.OnNodeDoubleClickTreeView); panel.Controls.Add(this._treeView); } if (!ClassViewPackage.IsClassBrowserApplication || this._searchOnly) { ColumnHeader header = new ColumnHeader(); ColumnHeader header2 = new ColumnHeader(); header.Text = "Class"; header2.Text = "Namespace"; if (this._searchOnly) { header.Width = 200; header2.Width = 240; } else { header.Width = 0x87; header2.Width = 240; } this._listView = new MxListView(); this._listView.BorderStyle = BorderStyle.None; this._listView.Dock = DockStyle.Fill; this._listView.HideSelection = false; this._listView.FullRowSelect = true; this._listView.TabIndex = 0; this._listView.SmallImageList = list; this._listView.View = View.Details; this._listView.HeaderStyle = ColumnHeaderStyle.Nonclickable; this._listView.LabelWrap = false; this._listView.MultiSelect = false; this._listView.FlatScrollBars = true; this._listView.ShowToolTips = true; this._listView.WatermarkText = "No Classes Found"; this._listView.Sorting = SortOrder.Ascending; this._listView.Columns.Add(header); this._listView.Columns.Add(header2); if (this._searchOnly) { ColumnHeader header3 = new ColumnHeader(); header3.Width = 200; header3.Text = "Member"; this._listView.Columns.Add(header3); } if (this.Mode == ClassViewToolWindowMode.Browse) { this._listView.Visible = false; } this._listView.DoubleClick += new EventHandler(this.OnDoubleClickListView); this._listView.SelectedIndexChanged += new EventHandler(this.OnSelectedIndexChangedListView); panel.Controls.Add(this._listView); } if (ClassViewPackage.IsClassBrowserApplication || this._searchOnly) { base.Controls.AddRange(new Control[] { panel, this._toolBar1 }); } else { base.Controls.AddRange(new Control[] { panel, this._toolBar2, this._toolBar1 }); } if (!this._searchOnly) { this.Text = "Classes"; if (ClassViewPackage.IsClassBrowserApplication) { base.Icon = new Icon(typeof(ClassViewToolWindowBase), "ClassBrowseToolWindow.ico"); } else { base.Icon = new Icon(typeof(ClassViewToolWindowBase), "ClassViewToolWindow.ico"); } } else { this.Text = "Search"; base.Icon = new Icon(typeof(ClassViewToolWindowBase), "ClassSearchToolWindow.ico"); } panel.ResumeLayout(false); base.ResumeLayout(false); }