public WebMenuItem( string itemID, string category, string text, IconInfo icon, IconInfo disabledIcon, WebMenuItemStyle style, RequiredSelection requiredSelection, bool isDisabled, Command command) { _itemID = itemID; _category = category; _text = text; Icon = icon; DisabledIcon = disabledIcon; _style = style; _requiredSelection = requiredSelection; _isDisabled = isDisabled; _command = new SingleControlItemCollection(command, new[] { typeof(Command) }); _commandClick = new CommandClickEventHandler(Command_Click); if (_command.ControlItem != null) { ((Command)_command.ControlItem).Click += _commandClick; } }
public BocMenuItem( string id, string category, string text, IconInfo icon, IconInfo disabledIcon, WebMenuItemStyle style, RequiredSelection requiredSelection, bool isDisabled, BocMenuItemCommand command) : base(id, category, text, icon, disabledIcon, style, requiredSelection, isDisabled, command) { }
private void AddMenuItem(string itemID, string category, string text, WebMenuItemStyle style, RequiredSelection selection, CommandType commandType) { WebMenuItem item = new WebMenuItem( itemID, category, text, new IconInfo("~/Images/ClassicBlue/NullIcon.gif"), new IconInfo("~/Images/ClassicBlue/NullIcon.gif"), style, selection, false, new Command(commandType)); _control.MenuItems.Add(item); }