public MenuItemWrapper(string text, Func <Task> menuAction, Type formType, ApplicationMenuIcon menuIcon) { Text = text; ApplicationMenuIcon = menuIcon; MenuAction = menuAction; FormType = formType; //Access = access; SubMenuItems = new MenuItemWrapper[0]; }
public MenuItemWrapper(string text, Func <Task> menuAction, object formTag, MenuItemWrapper[] subMenuItems, ApplicationMenuIcon menuIcon) { Text = text; ApplicationMenuIcon = menuIcon; //Access = access; MenuAction = menuAction; FormType = null; FormTagValue = formTag; SubMenuItems = subMenuItems.Where(x => x != null).ToArray(); }
public MenuItemWrapper CreateFormItem <T>(string formKey, ApplicationMenuIcon icon, object param) where T : FrmBaseForm { return(new MenuItemWrapper(formKey, () => OpenFormOrActivate <T>(formKey, param), typeof(T), icon)); }