protected IMenuBarItem CreateAddNewChild <T>(TContainer container) where T : class, IEntity
        {
            var typeName = _objectTypeResolver.TypeFor <T>();

            return(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddNew(typeName))
                   .WithIcon(ApplicationIcons.AddIconFor(typeName))
                   .WithCommandFor <AddNewCommandFor <IContainer, T>, IContainer>(container));
        }
示例#2
0
 protected IMenuBarItem CreateAddNewItemFor(TParent parent)
 {
     return(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddNew(ObjectTypeName))
            .WithIcon(ApplicationIcons.AddIconFor(typeof(TObjectBase).Name))
            .WithCommandFor <AddNewCommandFor <TParent, TObjectBase>, TParent>(parent));
 }