Example #1
0
 public StatusBarPanelCommand(Type commandGroup, int commandID, MxStatusBarPanel panel)
     : base(commandGroup, commandID, panel)
 {
 }
Example #2
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);
 }
Example #3
0
 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 });
 }
Example #4
0
 public void AddStatusBarPanel(MxStatusBarPanel panel, Type commandGroup, int commandID)
 {
     StatusBarPanelCommand command = new StatusBarPanelCommand(commandGroup, commandID, panel);
     panel.Command = command;
     this._statusBarPanels.Add(panel);
     this.AddCommand(command);
 }