public MenuItem(FeatureWithContextMenu feature, string commandId, string menuId, Action <ItemType> callback, ZPushBehaviour zpushBehaviour) : base(feature, commandId, menuId, null, zpushBehaviour) { // TODO: remove callback from CommandElement this._callback = callback; }
public MenuItem <ItemType> RegisterMenuItem <ItemType>(FeatureWithContextMenu feature, string id, string menuId, System.Action <ItemType> callback, ZPushBehaviour zpushBehaviour = ZPushBehaviour.None) where ItemType : IBase { if (OutlookUI == null || !UI_ContextMenu || !GlobalOptions.INSTANCE.UI_ContextMenu) { return(null); } if (menuId == null) { menuId = GetDefaultMenuId <ItemType>(); } return(OutlookUI.Register(new MenuItem <ItemType>(feature, id, menuId, callback, zpushBehaviour))); }
public MenuItemBase(FeatureWithContextMenu feature, string commandId, string menuId, System.Action callback, ZPushBehaviour zpushBehaviour) : base(feature, commandId, callback, zpushBehaviour) { this.MenuId = menuId; }