當前位置: 首頁>>代碼示例>>C#>>正文


C# NavigationBuilder.AddImageSet方法代碼示例

本文整理匯總了C#中Orchard.UI.Navigation.NavigationBuilder.AddImageSet方法的典型用法代碼示例。如果您正苦於以下問題:C# NavigationBuilder.AddImageSet方法的具體用法?C# NavigationBuilder.AddImageSet怎麽用?C# NavigationBuilder.AddImageSet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Orchard.UI.Navigation.NavigationBuilder的用法示例。


在下文中一共展示了NavigationBuilder.AddImageSet方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetNavigation

        public void GetNavigation(NavigationBuilder builder)
        {
            builder.AddImageSet("modules")
                .Add(T("Modules"), "9", menu => menu.Add(T("Download"), "5", item => item.Action("Index", "Admin", new { area = "RaisingStudio.PackageManager" }).Permission(Permissions.DownloadPackages).LocalNav())
                    );
            builder.AddImageSet("themes")
                .Add(T("Themes"), "10", menu => menu.Add(T("Download"), "5", item => item.Action("Themes", "Admin", new { area = "RaisingStudio.PackageManager" }).Permission(Permissions.DownloadPackages).LocalNav()));

        }
開發者ID:SmartFire,項目名稱:Orchard.Platform-Modules,代碼行數:9,代碼來源:AdminMenu.cs

示例2: GetNavigation

        public void GetNavigation(NavigationBuilder builder)
        {
            var contentTypeDefinitions = _contentDefinitionManager.ListTypeDefinitions().OrderBy(d => d.Name);
            builder.AddImageSet("content")
                .Add("Content", "1.4", menu => menu
                    .Add("Content Items", "1", item => item.Action("List", "Admin", new { area = "Contents", id = "" })));

            builder.AddImageSet("contenttypes");
            builder.Add("Content Definition", "1.4.1", menu =>
            {
                menu.LinkToFirstChild(true);
                menu.Add("Content Types", "1", item => item.Action("Index", "ContentTypes", new { area = "Contents" }).LocalNav());
                menu.Add("Content Parts", "2", item => item.Action("ListParts", "ContentTypes", new { area = "Contents" }).LocalNav());
            });
        }
開發者ID:qhme,項目名稱:OrchardLite,代碼行數:15,代碼來源:AdminMenu.cs

示例3: GetNavigation

 public void GetNavigation(NavigationBuilder builder)
 {
     builder.AddImageSet("modules")
         .Add(T("Modules"), "9", menu => menu.Action("Features", "Admin", new {area = "Orchard.Modules"}).Permission(Permissions.ManageFeatures)
             .Add(T("Features"), "0", item => item.Action("Features", "Admin", new {area = "Orchard.Modules"}).Permission(Permissions.ManageFeatures).LocalNav())
             .Add(T("Installed"), "1", item => item.Action("Index", "Admin", new {area = "Orchard.Modules"}).Permission(StandardPermissions.SiteOwner).LocalNav()));
 }
開發者ID:stack72,項目名稱:GiveCamp-London,代碼行數:7,代碼來源:AdminMenu.cs

示例4: GetNavigation

 public void GetNavigation(NavigationBuilder builder)
 {
     builder.AddImageSet("contentsync")
         .Add(root => root
                 .Caption(T("Content Sync"))
                 .Position("1")
                 .LinkToFirstChild(true)
                 .Add(child=>child.Caption(T("Overview"))
                         .Position("0")
                         .Action("Overview", "Admin", new {area = "Tad.ContentSync"})
                         .LocalNav())
                 .Add(child => child.Caption(T("Local Only"))
                         .Position("1")
                         .Action("Comparison", "Admin", new { area = "Tad.ContentSync", type = "LocalOnly" })
                         .LocalNav())
                 .Add(child => child.Caption(T("Remote Only"))
                         .Position("1")
                         .Action("Comparison", "Admin", new { area = "Tad.ContentSync", type = "RemoteOnly" })
                         .LocalNav())
                 .Add(child => child.Caption(T("Differences"))
                         .Position("1")
                         .Action("Comparison", "Admin", new { area = "Tad.ContentSync", type = "Differences" })
                         .LocalNav())
                 .Add(child => child.Caption(T("Mismatches"))
                         .Position("2")
                         .Action("Comparison", "Admin", new { area = "Tad.ContentSync", type = "Mismatches" })
                         .LocalNav()))
         .Add(T("Settings"), menu => menu
             .Add(T("Content Sync"), "99", item => item.Action("Settings", "Admin", new {area = "Tad.ContentSync"})));
 }
開發者ID:JustGiving,項目名稱:Tad.ContentSync,代碼行數:30,代碼來源:AdminMenu.cs

示例5: GetNavigation

 public void GetNavigation(NavigationBuilder builder) {
     var themeName = _siteThemeService.GetSiteTheme();
     if (themeName.Name == Constants.THEME_NAME) {
         builder.AddImageSet("themes")
             .Add(T("Themes"), "10", BuildMenu);
     }
 }
開發者ID:CloudMetal,項目名稱:Raptor.Ericka,代碼行數:7,代碼來源:AdminMenu.cs

示例6: GetNavigation

        public void GetNavigation(NavigationBuilder builder)
        {
            builder

                // Image set
                .AddImageSet("patrocinadores")

                // "Webshop"
                .Add(item => item

                    .Caption(T("Patrocínios"))
                    .Position("1")
                    .LinkToFirstChild(true)

                    // "Customers"
                    .Add(subItem => subItem
                        .Caption(T("Sumário"))
                        .Position("1.1")
                        .Action("Sumario", "Sumario", new { area = "Patrocinadores" })
                    )

                    // "Orders"
                    .Add(subItem => subItem
                        .Caption(T("Patrocinadores"))
                        .Position("1.2")
                        .Action("List", "PatrocinadoresAdmin", new { area = "Patrocinadores" })
                    )
                );
        }
開發者ID:NunoRodrigues,項目名稱:Orchard-Patrocinios,代碼行數:29,代碼來源:AdminMenu.cs

示例7: GetNavigation

        public void GetNavigation(NavigationBuilder builder)
        {
            builder

                // Image set
                .AddImageSet("Sellit")

                // "Sellit"
                .Add(item => item

                    .Caption(T("Sellit"))
                    .Position("2")
                    .LinkToFirstChild(false)

                    // "Products"
                    .Add(subItem => subItem
                        .Caption(T("Products"))
                        .Position("2.1")
                        .Action("List", "ProductAdmin", new { area = "Devq.Sellit" }))

                    // "Categories"
                    .Add(tab => tab
                        .Caption(T("Categories"))
                        .Position("2.5")
                        .Action("Index", "CategoryAdmin", new { area = "Devq.Sellit" }))

                    // "Customers"
                    .Add(subItem => subItem
                        .Caption(T("Customers"))
                        .Position("2.8")
                        .Action("Index", "CustomerAdmin", new { area = "Devq.Sellit" }))
                );
        }
開發者ID:Devqon,項目名稱:Devq.Sellit,代碼行數:33,代碼來源:AdminMenu.cs

示例8: GetNavigation

 public void GetNavigation(NavigationBuilder builder)
 {
     builder.AddImageSet("adcontactlookup")
         .Add(T("Active Directory Contacts"), "10",
             menu => menu.Add(T("List"), "0", item => item.Action("Index", "Admin", new { area = "ActiveDirectoryContactLookup" })
                 .Permission(Permissions.SearchContacts)));
 }
開發者ID:moov2,項目名稱:Orchard.ActiveDirectoryContactLookup,代碼行數:7,代碼來源:AdminMenu.cs

示例9: GetNavigation

 public void GetNavigation(NavigationBuilder builder) {
     builder.AddImageSet("users")
         .Add(T("Users"), "11",
             menu => menu.Action("Index", "Admin", new { area = "Orchard.Users" })
                 .Add(T("Users"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.Users" })
                     .LocalNav().Permission(Permissions.ManageUsers)));
 }
開發者ID:anycall,項目名稱:Orchard,代碼行數:7,代碼來源:AdminMenu.cs

示例10: GetNavigation

 public void GetNavigation(NavigationBuilder builder) {
     builder
         .AddImageSet("taxonomies")
         .Add(T("Taxonomies"), "4", menu => menu
         .Add(T("Manage Taxonomies"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.Taxonomies" }).Permission(Permissions.ManageTaxonomies))
     );
 }
開發者ID:SunRobin2015,項目名稱:RobinWithOrchard,代碼行數:7,代碼來源:AdminMenu.cs

示例11: GetNavigation

 public void GetNavigation(NavigationBuilder builder) {
     var contentTypeDefinitions = _contentDefinitionManager
         .ListTypeDefinitions().OrderBy(d => d.Name);
     var contentTypes = contentTypeDefinitions
         .Where(ctd => ctd.Settings.GetModel<ContentTypeSettings>().Creatable)
         .OrderBy(ctd => ctd.DisplayName);
     if (contentTypes.Any()) {
         builder
             .AddImageSet("content")
             .Add(T("Content"), "1.4", menu => {
                 menu.LinkToFirstChild(false);
                 foreach (var contentTypeDefinition in contentTypes) {
                     if (string.Compare(
                         contentTypeDefinition.Settings["ContentTypeSettings.Creatable"],
                         "true", StringComparison.OrdinalIgnoreCase) == 0) {
                         ContentTypeDefinition definition = contentTypeDefinition;
                         menu.Add(T(contentTypeDefinition.DisplayName), "5", item =>
                             item.Action("List", "Admin",
                             new RouteValueDictionary {
                                 {"area", "Contents"},
                                 {"model.Id", definition.Name}
                             })
                             .Permission(DynamicPermissions.CreateDynamicPermission(
                                 DynamicPermissions.PermissionTemplates["PublishOwnContent"],
                                 definition)));
                     }
                 }
             });
     }
 }
開發者ID:omidam81,項目名稱:Ver1.0,代碼行數:30,代碼來源:ContentAdminMenu.cs

示例12: GetNavigation

 public void GetNavigation(NavigationBuilder builder)
 {
     builder.AddImageSet("imagegallery")
     .Add(T("Image Gallery"), "7",
                 menu => menu.Add(T("Image Gallery"), "0", item => item.Action("Index", "Admin", new {area = "Mello.ImageGallery"})
                                                                       .Permission(Permissions.ManageImageGallery)));
 }
開發者ID:robertbird,項目名稱:BoomJennies,代碼行數:7,代碼來源:AdminMenu.cs

示例13: GetNavigation

 public void GetNavigation(NavigationBuilder builder)
 {
     builder.AddImageSet("media")
         .Add(T("Media"), "6",
             menu => menu.Add(T("Media"), "0", item => item.Action("Index", "Admin", new { area = "Orchard.Media" })
                 .Permission(Permissions.ManageMedia)));
 }
開發者ID:stack72,項目名稱:GiveCamp-London,代碼行數:7,代碼來源:AdminMenu.cs

示例14: GetNavigation

        public void GetNavigation(NavigationBuilder builder) {

            var menus = Services.ContentManager.Query<TitlePart, TitlePartRecord>().OrderBy(x => x.Title).ForType("Menu").List().ToList();
            int firstMenuIndex = 0;
            menus.ForEach(c => {
                builder.AddImageSet(c.Title)
                   .Add(T(c.Title), (++firstMenuIndex).ToString(),
                        menu =>
                        {
                            int menuIdex = 0;
                            var subMenus = _menuService.GetMenuParts(c.Id).
                                OrderBy(menuPartEntry => menuPartEntry.MenuPosition, 
                                new FlatPositionComparer()).ToList();
                            foreach (var subMenu in subMenus) {

                                //var moduleMenuItem = c.As<ModuleMenuItemPart>();
                                //if(moduleMenuItem!=null) {
                                
                                //}

                                var menuItemEntity = CreateMenuItemEntries(subMenu);
                                var moduleMenuItem = subMenu.As<ModuleMenuItemPart>();
                                if (moduleMenuItem != null) {
                                    menu.Add(T(menuItemEntity.Text), (++menuIdex).ToString(), item => item.Url(menuItemEntity.Url), new List<string>() { moduleMenuItem.IconClass});
                                }
                                else
                                {
                                    menu.Add(T(menuItemEntity.Text), (++menuIdex).ToString(), item => item.Url(menuItemEntity.Url));   
                                }
                            }
                        });
            });
        }
開發者ID:jgtaveras,項目名稱:Coevery,代碼行數:33,代碼來源:FrontMenu.cs

示例15: GetNavigation

        public void GetNavigation(NavigationBuilder builder) {

            var menus = Services.ContentManager.Query<TitlePart, TitlePartRecord>().OrderBy(x => x.Title).ForType("Menu").List().ToList();
            int firstMenuIndex = 0;
            menus.ForEach(c => {
                builder.AddImageSet(c.Title)
                    .Add(T(c.Title), (++firstMenuIndex).ToString(),
                        menu => {
                            string url = string.Format("#/{0}", c.Id);
                            menu.Url(url);
                            menu.Content(c);
                            menu.IdHint(c.Id.ToString(CultureInfo.InvariantCulture));
                            int menuIdex = 0;
                            var subMenus = _menuService.GetMenuParts(c.Id)
                                .OrderBy(menuPartEntry => menuPartEntry.MenuPosition, new FlatPositionComparer())
                                .ToList();
                            foreach (var subMenu in subMenus) {
                                var subMenuCotent = subMenu;
                                var menuItemEntity = CreateMenuItemEntries(subMenu, url);
                                var moduleMenuItem = subMenu.As<ModuleMenuItemPart>();
                                var position = (++menuIdex).ToString(CultureInfo.InvariantCulture);
                                if (moduleMenuItem != null) {
                                    menu.Add(T(menuItemEntity.Text), position, item =>
                                        item.Url(menuItemEntity.Url).Content(subMenuCotent).IdHint(subMenuCotent.Id.ToString(CultureInfo.InvariantCulture)), 
                                        new List<string>() {moduleMenuItem.IconClass});
                                }
                                else {
                                    menu.Add(T(menuItemEntity.Text), position, item =>
                                        item.Url(menuItemEntity.Url).Content(subMenuCotent).IdHint(subMenuCotent.Id.ToString(CultureInfo.InvariantCulture)));
                                }
                            }
                        });
            });
        }
開發者ID:wezmag,項目名稱:Coevery,代碼行數:34,代碼來源:FrontMenu.cs


注:本文中的Orchard.UI.Navigation.NavigationBuilder.AddImageSet方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。