private void InitItem(string _id, string _title, string _command, Image _icon, int _width, bool _enabled, MenuCommandDefine _cdefine) { this._menuID = _id; this._menuIcon = _icon; this._commandName = _command; this._menuTitle = _title; this._menuPicWidth = _width; this._buttonEnable = _enabled; this._commandDefine = _cdefine; }
protected void _menuitem_ItemClick(object sender, ItemClickEventArgs e) { BarItem _bi = e.Item; if (_bi.Tag is FrmMenuItem) { FrmMenuItem _mi = _bi.Tag as FrmMenuItem; if (_mi.MenuCommand != null) { MenuCommandDefine _cd = _mi.MenuCommand; LastClickMenu = _mi; _cd.RunCommand(_mi.MenuID); } } }
public FrmMenuItem(string _id, string _title, string _command, Image _icon, bool _enabled, MenuCommandDefine _cdefine) { InitItem(_id, _title, _command, _icon, 70, _enabled, _cdefine); }
public FrmMenuItem(string _id, string _title, string _command, Image _icon, int _width, MenuCommandDefine _cdefine) { InitItem(_id, _title, _command, _icon, _width, true, _cdefine); }