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); } } } }
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); } } } }