/// <summary>
        ///
        /// </summary>
        public CommandMenu.Builder CommandMenu(CommandMenu component)
        {
#if MVC
            component.ViewContext = this.HtmlHelper != null ? this.HtmlHelper.ViewContext : null;
#endif
            return(new CommandMenu.Builder(component));
        }
示例#2
0
 /// <summary>
 /// 设置Ext中菜单
 /// </summary>
 /// <param name="menus"></param>
 private void setCommandColumn(Ext.Net.CommandMenu menus)
 {
     foreach (Ext.Net.MenuCommand menu in menus.Items)
     {
         bool check = checkControlActionPermit(menu);
         if (!check)
         {
             setControlAction(menu, check);
         }
         else
         {
             setCommandColumn(menu.Menu);
         }
     }
 }
示例#3
0
        private void RegisterMenuIcons(CommandMenu menu, List <Icon> icons)
        {
            foreach (MenuCommand menuCommand in menu.Items)
            {
                if (menuCommand.Icon != Icon.None)
                {
                    icons.Add(menuCommand.Icon);
                }

                if (menuCommand.Menu.Items.Count > 0)
                {
                    this.RegisterMenuIcons(menuCommand.Menu, icons);
                }
            }
        }
 /// <summary>
 ///
 /// </summary>
 public CommandMenu.Builder CommandMenu(CommandMenu component)
 {
     return(new CommandMenu.Builder(component));
 }