Exemplo n.º 1
0
 private void RegisterIcons(GridCommandCollection commands)
 {
     foreach (GridCommandBase command in commands)
     {
         GridCommand cmd = command as GridCommand;
         if (cmd != null)
         {
             if (cmd.Icon != Icon.None)
             {
                 this.ScriptManager.RegisterIcon(cmd.Icon);
             }
             if (cmd.Menu.Items.Count > 0)
             {
                 this.RegisterMenuIcons(cmd.Menu);
             }
         }
     }
 }
Exemplo n.º 2
0
        private void RegisterIcons(GridCommandCollection commands, List <Icon> icons)
        {
            foreach (GridCommandBase command in commands)
            {
                GridCommand cmd = command as GridCommand;

                if (cmd != null)
                {
                    if (cmd.Icon != Icon.None)
                    {
                        icons.Add(cmd.Icon);
                    }

                    if (cmd.Menu.Items.Count > 0)
                    {
                        this.RegisterMenuIcons(cmd.Menu, icons);
                    }
                }
            }
        }