예제 #1
0
        private RibbonBar CreateChildMenus(MenuInfo subMenuInfo)
        {
            ButtonItem buttonItem = new DevComponents.DotNetBar.ButtonItem();
            buttonItem.Name = subMenuInfo.MenuID;
            buttonItem.Text = subMenuInfo.MenuName;
            buttonItem.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
            //buttonItem.Image = ((System.Drawing.Image)(resourceManager.GetObject("buttonItem1.Image")));
            //buttonItem.Image = ((System.Drawing.Image)(resourceManager.GetObject("OpenExistingPlace")));
            buttonItem.Image = imageList.Images["OpenExistingPlace"];
            buttonItem.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
            buttonItem.RibbonWordWrap = false;
            buttonItem.Visible = true;

            DevComponents.DotNetBar.RibbonBar ribbonBar = new DevComponents.DotNetBar.RibbonBar();

            ribbonBar.AutoOverflowEnabled = true;
            ribbonBar.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            ribbonBar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            ribbonBar.ContainerControlProcessDialogKey = true;
            ribbonBar.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
            buttonItem});
            ribbonBar.Location = new System.Drawing.Point(3, 0);
            ribbonBar.Name = System.Guid.NewGuid().ToString();
            ribbonBar.Size = new System.Drawing.Size(337, 82);
            ribbonBar.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
            ribbonBar.TabIndex = 0;
            //ribbonBar.Text = subMenuInfo.MenuName;
            ribbonBar.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            ribbonBar.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            ribbonBar.Visible = true;

            return ribbonBar;
        }
예제 #2
0
 private RibbonPanel CreateParentMenu(MenuInfo menuInfo)
 {
     RibbonTabItem newTab = ribbonControl.CreateRibbonTab(menuInfo.MenuName, menuInfo.MenuID);
     RibbonPanel ribbonPanel = new DevComponents.DotNetBar.RibbonPanel();
     ribbonPanel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
     ribbonPanel.Dock = System.Windows.Forms.DockStyle.Fill;
     ribbonPanel.Location = new System.Drawing.Point(0, 0);
     ribbonPanel.Name = System.Guid.NewGuid().ToString();
     ribbonPanel.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3);
     ribbonPanel.Size = new System.Drawing.Size(75, 20);
     ribbonPanel.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square;
     ribbonPanel.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
     ribbonPanel.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
     ribbonPanel.TabIndex = 13;
     ribbonPanel.ColorSchemeStyle = eDotNetBarStyle.Office2007;
     ribbonPanel.Visible = true;
     newTab.Panel = ribbonPanel;
     return ribbonPanel;
 }
예제 #3
0
 /// <summary>
 /// 用于向 MenuInfo EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToMenuInfo(MenuInfo menuInfo)
 {
     base.AddObject("MenuInfo", menuInfo);
 }
예제 #4
0
 /// <summary>
 /// 创建新的 MenuInfo 对象。
 /// </summary>
 /// <param name="menuID">MenuID 属性的初始值。</param>
 /// <param name="menuName">MenuName 属性的初始值。</param>
 /// <param name="parentID">ParentID 属性的初始值。</param>
 public static MenuInfo CreateMenuInfo(global::System.String menuID, global::System.String menuName, global::System.String parentID)
 {
     MenuInfo menuInfo = new MenuInfo();
     menuInfo.MenuID = menuID;
     menuInfo.MenuName = menuName;
     menuInfo.ParentID = parentID;
     return menuInfo;
 }