コード例 #1
0
        private IMenuBarItem createAddExistingFromTemplateItemFor <T>(TContainer parent) where T : class
        {
            var typeName = _objectTypeResolver.TypeFor <T>();

            return(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddExistingFromTemplate(typeName))
                   .WithIcon(ApplicationIcons.LoadTemplateIconFor(typeName))
                   .WithCommandFor <AddExistingFromTemplateCommandFor <IContainer, T>, IContainer>(parent));
        }
コード例 #2
0
ファイル: RootContextMenuFor.cs プロジェクト: onwhenrdy/MoBi
 protected IMenuBarItem CreateAddExistingFromTemplateItemFor(TParent parent)
 {
     return(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddExistingFromTemplate(ObjectTypeName))
            .WithIcon(ApplicationIcons.LoadTemplateIconFor(typeof(TObjectBase).Name))
            .WithCommandFor <AddExistingFromTemplateCommandFor <TParent, TObjectBase>, TParent>(parent));
 }