示例#1
0
        /// <summary>
        /// Creates a new instance of ToolStrip (Wrapped)
        /// </summary>
        /// <param name="toolbarList">Toolbar List of the Main Toolbar</param>
        /// <param name="toolbarId">Id of the Toolbar</param>
        /// <param name="style">Toolbar type</param>
        /// <returns>A new instance of the Toolbar (wrapped)</returns>
        public static ToolStripWrapper Add(this ToolbarsList toolbarList, string toolbarId, ToolbarHelper.ToolbarStyle style)
        {
            ToolStripWrapper toolbar = new ToolStripWrapper(toolbarId, toolbarList.ToolbarParent);

            toolbar.Dock         = DockStyle.Top;
            toolbar.CaptionStyle = style;
            toolbarList.Add(toolbar);
            (toolbarList.ToolbarParent as ToolStripWrapper).Parent.Controls.Add(toolbar); //The Toolbar is inserted in the Controls of the Form

            return(toolbar);
        }
示例#2
0
 public ToolStripWrapper()
 {
     Tools      = new ToolsList(this);
     Toolbars   = new ToolbarsList(this);
     PopupMenus = new Dictionary <string, ToolStripDropDown>();
 }