public CommandBar(CommandBarManager commandBarManager) { this.commandBarManager = commandBarManager; this.items = new CommandBarItemCollection(this); this.SetStyle(ControlStyles.UserPaint, false); this.TabStop = false; this.Font = SystemInformation.MenuFont; this.Dock = DockStyle.Top; }
void Aveva.ApplicationFramework.IAddin.Start(ServiceManager serviceManager) { sServiceManager = serviceManager; sCommandManager = (CommandManager)sServiceManager.GetService(typeof(CommandManager)); sCommandBarManager = (CommandBarManager)sServiceManager.GetService(typeof(CommandBarManager)); //Add ExampleCommand to Command Manager sCommandManager.Commands.Add(new ExampleCommand()); //Create example toolbar menu CommandBar myToolBar = sCommandBarManager.CommandBars.AddCommandBar("ExampleCommandBar"); //sCommandBarManager.RootTools.AddButtonTool("ExampleCommand", "ExampleCommand", null, "ExampleCommand"); //myToolBar.Tools.AddTool("ExampleCommand"); ComboBoxTool tool = sCommandBarManager.RootTools.AddComboBoxTool("ExampleCommand", "Examples", null, "ExampleCommand"); tool.SelectedIndex = 0; myToolBar.Tools.AddTool("ExampleCommand"); }
public EndUserDesignerForm(string reportName, string reportTemplatePath) { System.Diagnostics.Debug.Assert(!string.IsNullOrEmpty(reportTemplatePath)); InitializeComponent(); // Create new report instance and assign to Report Explorer this.arDesigner.Toolbox = this.arToolbox; this.arDesigner.PropertyGrid = this.arPropertyGrid; // Add Menu and CommandBar to Form this.commandBarManager = this.arDesigner.CommandBarManager; // Edit CommandBar // NOTE: need check after each used version of ActiveReports - can be changed this.commandBarManager.CommandBars.RemoveAt(0); // NOTE: remove menu CommandBarItem item = this.commandBarManager.CommandBars[0].Items[2]; // NOTE: get SaveAs button this.commandBarManager.CommandBars[0].Items.Clear(); // NOTE: remove New, Open, SaveAs buttons this.commandBarManager.CommandBars[0].Items.AddButton(item.Image, item.Text, new CommandEventHandler(OnSaveNew), 0); // NOTE: set customize Save routine this.Controls.Add(this.commandBarManager); // Fill Toolbox LoadTools(this.arToolbox); // Activate default group on the toolbox this.arToolbox.SelectedCategory = "ActiveReports 3.0"; // Setup Status Bar this.arStatus.Panels.Add(new StatusBarPanel()); this.arStatus.Panels.Add(new StatusBarPanel()); this.arStatus.Panels[0].AutoSize = StatusBarPanelAutoSize.Spring; this.arStatus.Panels[1].AutoSize = StatusBarPanelAutoSize.Spring; this.arStatus.ShowPanels = true; ActiveReport3 rpt = new ActiveReport3(); rpt.LoadLayout(reportTemplatePath); arDesigner.Report = rpt; if (!string.IsNullOrEmpty(reportName)) this.Text = reportName; templatePath = reportTemplatePath; }
void Aveva.ApplicationFramework.IAddin.Start(ServiceManager serviceManager) { mServiceManager = serviceManager; mWindowManager = (WindowManager)serviceManager.GetService(typeof(WindowManager)); mCommandBarManager = (CommandBarManager)serviceManager.GetService(typeof(CommandBarManager)); mCommandBarManager.RootTools.ToolAdded+=new ToolEventHandler(RootTools_ToolAdded); //Create an instance of Addin control mAddinControl = new NetGridAddinControl(); //Add the Addin mAddinWindow = (DockedWindow)mWindowManager.CreateDockedWindow("Grid Control Addin", "Grid Control Addin", mAddinControl, DockedPosition.Left); mAddinWindow.Width = 225; mAddinWindow.Closing +=new System.ComponentModel.CancelEventHandler(mAddinWindow_Closing); //Hide mAddinWindow.Hide(); //Load custom menus mCommandBarManager.UILoaded +=new EventHandler(mCommandBarManager_UILoaded); }
/** * Builds the main menu and toolbar from xml file */ public void InitializeCommandBarMenus() { try { this.images = new Images(FilePaths.Images, 16); this.xmlBuilder = new XmlBuilder(this, this.images); this.itemFinder = new ItemFinder(this.xmlBuilder); this.commandBarManager = new CommandBarManager(); this.editorMenu = this.xmlBuilder.GenerateContextMenu(FilePaths.ScintillaMenu); this.tabMenu = this.xmlBuilder.GenerateContextMenu(FilePaths.TabMenu); this.commandBarManager.CommandBars.Add(this.xmlBuilder.GenerateMainMenu(FilePaths.MainMenu)); if (this.settings.GetBool("FlashDevelop.ViewToolBar")) { this.commandBarManager.CommandBars.Add(this.xmlBuilder.GenerateToolBar(FilePaths.ToolBar)); } this.Controls.Add(this.commandBarManager); } catch (Exception ex) { ErrorHandler.ShowError("Error while building menus.", ex); } }
public CommandBar(CommandBarManager commandBarManager, CommandBarStyle style) : this(commandBarManager) { this.style = style; }
public CommandBarCollection(CommandBarManager commandBarManager) { this.commandBarManager = commandBarManager; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.arToolbox = new DataDynamics.ActiveReports.Design.Toolbox.Toolbox(); this.pnlToolbox = new System.Windows.Forms.Panel(); this.splitterToolboxDesigner = new System.Windows.Forms.Splitter(); this.arDesigner = new DataDynamics.ActiveReports.Design.Designer(); this.arPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.splitterDesignerProperties = new System.Windows.Forms.Splitter(); this.pnlProperties = new System.Windows.Forms.Panel(); this.splitterReportExplorerPropertyGrid = new System.Windows.Forms.Splitter(); this.arStatus = new System.Windows.Forms.StatusBar(); this.commandBarManager = new DataDynamics.ActiveReports.Design.CommandBarManager(); ((System.ComponentModel.ISupportInitialize)(this.arToolbox)).BeginInit(); this.pnlToolbox.SuspendLayout(); this.pnlProperties.SuspendLayout(); this.SuspendLayout(); // // arToolbox // this.arToolbox.Dock = System.Windows.Forms.DockStyle.Fill; this.arToolbox.LargeImages = null; this.arToolbox.Location = new System.Drawing.Point(0, 0); this.arToolbox.Name = "arToolbox"; this.arToolbox.Selected = null; this.arToolbox.Size = new System.Drawing.Size(200, 578); this.arToolbox.SmallImages = null; this.arToolbox.TabIndex = 0; // // pnlToolbox // this.pnlToolbox.Controls.Add(this.arToolbox); this.pnlToolbox.Dock = System.Windows.Forms.DockStyle.Left; this.pnlToolbox.Location = new System.Drawing.Point(0, 0); this.pnlToolbox.Name = "pnlToolbox"; this.pnlToolbox.Size = new System.Drawing.Size(200, 578); this.pnlToolbox.TabIndex = 0; // // splitterToolboxDesigner // this.splitterToolboxDesigner.BackColor = System.Drawing.SystemColors.Control; this.splitterToolboxDesigner.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.splitterToolboxDesigner.Location = new System.Drawing.Point(200, 0); this.splitterToolboxDesigner.Name = "splitterToolboxDesigner"; this.splitterToolboxDesigner.Size = new System.Drawing.Size(3, 578); this.splitterToolboxDesigner.TabIndex = 1; this.splitterToolboxDesigner.TabStop = false; // // arDesigner // this.arDesigner.Dock = System.Windows.Forms.DockStyle.Fill; this.arDesigner.IsDirty = false; this.arDesigner.Location = new System.Drawing.Point(203, 0); this.arDesigner.LockControls = false; this.arDesigner.Name = "arDesigner"; this.arDesigner.PropertyGrid = this.arPropertyGrid; this.arDesigner.ReportTabsVisible = true; this.arDesigner.ShowDataSourceIcon = true; this.arDesigner.Size = new System.Drawing.Size(397, 578); this.arDesigner.TabIndex = 2; this.arDesigner.Toolbox = null; this.arDesigner.ToolBoxItem = null; this.arDesigner.SelectionChanged += new DataDynamics.ActiveReports.Design.SelectionChangedEventHandler(this.arDesigner_SelectionChanged); // // arPropertyGrid // this.arPropertyGrid.CommandsVisibleIfAvailable = true; this.arPropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill; this.arPropertyGrid.LargeButtons = false; this.arPropertyGrid.LineColor = System.Drawing.SystemColors.ScrollBar; this.arPropertyGrid.Location = new System.Drawing.Point(0, 231); this.arPropertyGrid.Name = "arPropertyGrid"; this.arPropertyGrid.Size = new System.Drawing.Size(200, 347); this.arPropertyGrid.TabIndex = 2; this.arPropertyGrid.Text = "propertyGrid1"; this.arPropertyGrid.ViewBackColor = System.Drawing.SystemColors.Window; this.arPropertyGrid.ViewForeColor = System.Drawing.SystemColors.WindowText; // // splitterDesignerProperties // this.splitterDesignerProperties.BackColor = System.Drawing.SystemColors.Control; this.splitterDesignerProperties.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.splitterDesignerProperties.Dock = System.Windows.Forms.DockStyle.Right; this.splitterDesignerProperties.Location = new System.Drawing.Point(597, 0); this.splitterDesignerProperties.Name = "splitterDesignerProperties"; this.splitterDesignerProperties.Size = new System.Drawing.Size(3, 578); this.splitterDesignerProperties.TabIndex = 3; this.splitterDesignerProperties.TabStop = false; // // pnlProperties // this.pnlProperties.Controls.Add(this.arPropertyGrid); this.pnlProperties.Controls.Add(this.splitterReportExplorerPropertyGrid); this.pnlProperties.Dock = System.Windows.Forms.DockStyle.Right; this.pnlProperties.Location = new System.Drawing.Point(600, 0); this.pnlProperties.Name = "pnlProperties"; this.pnlProperties.Size = new System.Drawing.Size(200, 578); this.pnlProperties.TabIndex = 4; // // splitterReportExplorerPropertyGrid // this.splitterReportExplorerPropertyGrid.Dock = System.Windows.Forms.DockStyle.Top; this.splitterReportExplorerPropertyGrid.Location = new System.Drawing.Point(0, 228); this.splitterReportExplorerPropertyGrid.Name = "splitterReportExplorerPropertyGrid"; this.splitterReportExplorerPropertyGrid.Size = new System.Drawing.Size(200, 3); this.splitterReportExplorerPropertyGrid.TabIndex = 1; this.splitterReportExplorerPropertyGrid.TabStop = false; // // arStatus // this.arStatus.Location = new System.Drawing.Point(0, 578); this.arStatus.Name = "arStatus"; this.arStatus.Size = new System.Drawing.Size(800, 22); this.arStatus.TabIndex = 5; // // commandBarManager // this.commandBarManager.Dock = System.Windows.Forms.DockStyle.Top; this.commandBarManager.Location = new System.Drawing.Point(0, 0); this.commandBarManager.Name = "commandBarManager"; this.commandBarManager.Size = new System.Drawing.Size(800, 0); this.commandBarManager.TabIndex = 6; this.commandBarManager.TabStop = false; // // EndUserDesignerMainForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(800, 600); this.Controls.Add(this.splitterDesignerProperties); this.Controls.Add(this.arDesigner); this.Controls.Add(this.splitterToolboxDesigner); this.Controls.Add(this.pnlToolbox); this.Controls.Add(this.pnlProperties); this.Controls.Add(this.arStatus); this.Controls.Add(this.commandBarManager); this.Name = "EndUserDesignerMainForm"; this.Text = (string)App.Current.FindResource("ActiveReportsTitle"); ((System.ComponentModel.ISupportInitialize)(this.arToolbox)).EndInit(); this.pnlToolbox.ResumeLayout(false); this.pnlProperties.ResumeLayout(false); this.ResumeLayout(false); }