public CommunityToolWindow(IServiceProvider serviceProvider) : base(serviceProvider) { this.InitializeUserInterface(); Bitmap bitmap = new Bitmap(typeof(CommunityToolWindow), "Refresh.bmp"); bitmap.MakeTransparent(Color.Fuchsia); this._buttonImages.Images.Add(bitmap); this._refreshButton = new MxToolBarButton(); this._refreshButton.ToolTipText = "Refresh"; this._refreshButton.Enabled = false; this._refreshButton.ImageIndex = 0; MxToolBarButton button = new MxToolBarButton(); button.Style = ToolBarButtonStyle.Separator; this._toolBar.Buttons.Add(this._refreshButton); this._toolBar.Buttons.Add(button); this._tabs = new ArrayList(); ArrayList config = (ArrayList) ConfigurationSettings.GetConfig("microsoft.matrix/community"); if (config != null) { for (int i = 0; i < config.Count; i += 2) { string typeName = (string) config[i]; string initializationData = (string) config[i + 1]; try { CommunityTab tab = (CommunityTab) Activator.CreateInstance(System.Type.GetType(typeName, true, false)); tab.Initialize(serviceProvider, initializationData); this.AddTab(tab); } catch (Exception) { } } } }
private void InitializeComponent() { Panel panel = new Panel(); ImageList list = new ImageList(); ImageList list2 = new ImageList(); ToolBarButton button = new MxToolBarButton(); ToolBarButton button2 = new MxToolBarButton(); ToolBarButton button3 = new MxToolBarButton(); this._toolBar = new MxToolBar(); this._openButton = new MxToolBarButton(); this._refreshButton = new MxToolBarButton(); this._deleteButton = new MxToolBarButton(); this._newFolderButton = new MxToolBarButton(); this._newDocumentButton = new MxToolBarButton(); this._newProjectButton = new MxToolBarButton(); this._treeView = new MxTreeView(); panel.SuspendLayout(); base.SuspendLayout(); list2.ImageSize = new Size(0x10, 0x10); list2.TransparentColor = Color.Red; list2.ColorDepth = ColorDepth.Depth32Bit; list2.Images.AddStrip(new Bitmap(typeof(WorkspaceToolWindow), "WorkspaceToolBar.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 = list2; this._toolBar.ButtonClick += new ToolBarButtonClickEventHandler(this.OnToolBarButtonClick); button.Style = ToolBarButtonStyle.Separator; button2.Style = ToolBarButtonStyle.Separator; button3.Style = ToolBarButtonStyle.Separator; this._openButton.ImageIndex = 0; this._openButton.ToolTipText = "Open File"; this._openButton.Enabled = false; this._refreshButton.ImageIndex = 2; this._refreshButton.ToolTipText = "Refresh"; this._refreshButton.Enabled = false; this._deleteButton.ImageIndex = 1; this._deleteButton.ToolTipText = "Delete"; this._deleteButton.Enabled = false; this._newFolderButton.ImageIndex = 3; this._newFolderButton.ToolTipText = "New Folder"; this._newFolderButton.Enabled = false; this._newDocumentButton.ImageIndex = 4; this._newDocumentButton.ToolTipText = "New File"; this._newDocumentButton.Enabled = false; this._newProjectButton.ImageIndex = 5; this._newProjectButton.ToolTipText = "New Project"; this._toolBar.Buttons.AddRange(new ToolBarButton[] { this._openButton, button, this._newDocumentButton, this._newFolderButton, this._deleteButton, button2, this._refreshButton, button3, this._newProjectButton }); list.ImageSize = new Size(0x10, 0x10); list.TransparentColor = Color.Fuchsia; list.ColorDepth = ColorDepth.Depth32Bit; list.Images.AddStrip(new Bitmap(typeof(WorkspaceToolWindow), "WorkspaceTreeItems.bmp")); this._treeView.AllowDrop = true; 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.AfterSelect += new TreeViewEventHandler(this.OnAfterSelectTreeView); this._treeView.AfterCollapse += new TreeViewEventHandler(this.OnAfterCollapseTreeView); this._treeView.BeforeExpand += new TreeViewCancelEventHandler(this.OnBeforeExpandTreeView); this._treeView.NodeDoubleClick += new TreeViewEventHandler(this.OnDoubleClickTreeView); this._treeView.ShowContextMenu += new ShowContextMenuEventHandler(this.OnShowContextMenuTreeView); this._treeView.ItemDrag += new ItemDragEventHandler(this.OnItemDragTreeView); this._treeView.DragDrop += new DragEventHandler(this.OnDragDropTreeView); this._treeView.DragEnter += new DragEventHandler(this.OnDragEnterTreeView); this._treeView.DragOver += new DragEventHandler(this.OnDragOverTreeView); 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 }); this.Text = "Workspace"; base.Icon = new Icon(typeof(WorkspaceToolWindow), "WorkspaceToolWindow.ico"); panel.ResumeLayout(false); base.ResumeLayout(false); }
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 }); }
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() { 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 ToolBarButton CreateSeparatorButton() { ToolBarButton button = new MxToolBarButton(); button.Style = ToolBarButtonStyle.Separator; return button; }
private void AddToolBarButton(Hashtable table, System.Type commandGroup, int commandID, string helpText, int imageIndex) { MxToolBarButton button = new MxToolBarButton(); button.ImageIndex = imageIndex; button.ToolTipText = helpText; button.Enabled = false; table[commandID] = button; this.cm.AddCommand(button, commandGroup, commandID); }
public void AddCommand(MxToolBarButton button, Type commandGroup, int commandID) { ToolBarButtonCommand command = new ToolBarButtonCommand(commandGroup, commandID, button); button.Command = command; this._toolBarButtons.Add(button); this.AddCommand(command); }
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); }
public ToolBarButtonCommand(Type commandGroup, int commandID, MxToolBarButton button) : base(commandGroup, commandID, button) { }