当前位置: 首页>>代码示例>>C#>>正文


C# TabController.GetTabSettings方法代码示例

本文整理汇总了C#中DotNetNuke.Entities.Tabs.TabController.GetTabSettings方法的典型用法代码示例。如果您正苦于以下问题:C# TabController.GetTabSettings方法的具体用法?C# TabController.GetTabSettings怎么用?C# TabController.GetTabSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DotNetNuke.Entities.Tabs.TabController的用法示例。


在下文中一共展示了TabController.GetTabSettings方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BindTabControls

        private void BindTabControls(TabInfo tab)
        {
            cboParentTab.DataSource = string.IsNullOrEmpty(_strAction) || _strAction == "copy" || _strAction == "add"
                                        ? GetTabs(true, true, false, true)
                                        : GetTabs(false, true, true, false);
            cboParentTab.DataBind();

            if ((string.IsNullOrEmpty(_strAction) || _strAction == "copy" || _strAction == "add")
                    && !UserInfo.IsSuperUser && !UserInfo.IsInRole(PortalSettings.AdministratorRoleName))
            {
                cboParentTab.Select(PortalSettings.ActiveTab.TabID.ToString(), false, 0);
            }
            else
            {
                cboParentTab.Select(PortalSettings.ActiveTab.ParentId.ToString(), false, 0);
            }

            // tab administrators can only create children of the current tab
            if (string.IsNullOrEmpty(_strAction) || _strAction == "add" || _strAction == "copy")
            {
                BindBeforeAfterTabControls();
                insertPositionRow.Visible = cboPositionTab.Items.Count > 0;
                cboParentTab.AutoPostBack = true;

                cultureTypeList.SelectedValue = "Localized";
            }
            else
            {
                DisablePositionDropDown();
            }

            // if editing a tab, load tab parent so parent link is not lost
            // parent tab might not be loaded in cbotab if user does not have edit rights on it
            if (!TabPermissionController.CanAdminPage() && (tab != null))
            {
                if (cboParentTab.Items.FindByValue(tab.ParentId.ToString()) == null)
                {
                    var objtabs = new TabController();
                    var objparent = objtabs.GetTab(tab.ParentId, tab.PortalID, false);
                    if (objparent != null)
                    {
                        cboParentTab.Items.Add(new ListItem(objparent.LocalizedTabName, objparent.TabID.ToString()));
                    }
                }
            }

            cboCacheProvider.DataSource = OutputCachingProvider.GetProviderList();
            cboCacheProvider.DataBind();
            cboCacheProvider.Items.Insert(0, new ListItem(Localization.GetString("None_Specified"), ""));
            if (tab == null)
            {
                cboCacheProvider.ClearSelection();
                cboCacheProvider.Items[0].Selected = true;
                rblCacheIncludeExclude.ClearSelection();
                rblCacheIncludeExclude.Items[0].Selected = true;
            }

            var tabController = new TabController();
            var tabSettings = tabController.GetTabSettings(TabId);
            SetValue(cboCacheProvider, tabSettings, "CacheProvider");
            SetValue(txtCacheDuration, tabSettings, "CacheDuration");
            SetValue(rblCacheIncludeExclude, tabSettings, "CacheIncludeExclude");
            SetValue(txtIncludeVaryBy, tabSettings, "IncludeVaryBy");
            SetValue(txtExcludeVaryBy, tabSettings, "ExcludeVaryBy");
            SetValue(txtMaxVaryByCount, tabSettings, "MaxVaryByCount");

            ShowCacheRows();
        }
开发者ID:smkkstudios,项目名称:BlackandWhiteReporting,代码行数:68,代码来源:ManageTabs.ascx.cs

示例2: BindTabControls

        private void BindTabControls(TabInfo tab)
        {
            // only superusers and administrators can manage parent pages
            if ((string.IsNullOrEmpty(_strAction) || _strAction == "copy" || _strAction == "add")
                    && !UserInfo.IsSuperUser && !UserInfo.IsInRole(PortalSettings.AdministratorRoleName))
            {
                var tabList = GetTabs(true, true, false, true);
                var selectedParentTab = tabList.SingleOrDefault(t => t.TabID == PortalSettings.ActiveTab.TabID);
                cboParentTab.SelectedPage = selectedParentTab;
            }
            else
            {
                var tabList = GetTabs(true, true, true, true);
                var selectedParentTab = tabList.SingleOrDefault(t => t.TabID == PortalSettings.ActiveTab.ParentId);
                cboParentTab.SelectedPage = selectedParentTab;
            }

            if (string.IsNullOrEmpty(_strAction) || _strAction == "add" || _strAction == "copy")
            {
                BindBeforeAfterTabControls();
                insertPositionRow.Visible = cboPositionTab.Items.Count > 0;
                cboParentTab.AutoPostBack = true;
                cultureTypeList.SelectedValue = "Localized";
            }
            else
            {
                DisablePositionDropDown();
            }

            cboCacheProvider.DataSource = OutputCachingProvider.GetProviderList();
            cboCacheProvider.DataBind();
            cboCacheProvider.InsertItem(0, Localization.GetString("None_Specified"), "");
            if (tab == null)
            {
                cboCacheProvider.ClearSelection();
                cboCacheProvider.Items[0].Selected = true;
                rblCacheIncludeExclude.ClearSelection();
                rblCacheIncludeExclude.Items[0].Selected = true;
            }

            var tabController = new TabController();
            var tabSettings = tabController.GetTabSettings(TabId);
            SetValue(cboCacheProvider, tabSettings, "CacheProvider");
            SetValue(txtCacheDuration, tabSettings, "CacheDuration");
            SetValue(rblCacheIncludeExclude, tabSettings, "CacheIncludeExclude");
            SetValue(txtIncludeVaryBy, tabSettings, "IncludeVaryBy");
            SetValue(txtExcludeVaryBy, tabSettings, "ExcludeVaryBy");
            SetValue(txtMaxVaryByCount, tabSettings, "MaxVaryByCount");

            ShowCacheRows();
        }
开发者ID:RichardHowells,项目名称:dnnextensions,代码行数:51,代码来源:ManageTabs.ascx.cs

示例3: SynchronizeModule

        /// <summary>
        /// Synchronizes the module content between cache and database.
        /// </summary>
        /// <param name="moduleID">The module ID.</param>
        public static void SynchronizeModule(int moduleID)
        {
            var moduleController = new ModuleController();
            ArrayList modules = moduleController.GetModuleTabs(moduleID);
            var tabController = new TabController();
            foreach (ModuleInfo module in modules)
            {
                Hashtable tabSettings = tabController.GetTabSettings(module.TabID);
                if (tabSettings["CacheProvider"] != null && tabSettings["CacheProvider"].ToString().Length > 0)
                {
                    var outputProvider = OutputCachingProvider.Instance(tabSettings["CacheProvider"].ToString());
                    if (outputProvider != null)
                    {
                        outputProvider.Remove(module.TabID);
                    }
                }

                if (module.CacheTime > 0)
                {
                    var moduleProvider = ModuleCachingProvider.Instance(module.GetEffectiveCacheMethod());
                    if (moduleProvider != null)
                    {
                        moduleProvider.Remove(module.TabModuleID);
                    }
                }

                //Synchronize module is called when a module needs to indicate that the content
                //has changed and the cache's should be refreshed.  So we can update the Version
                //and also the LastContentModificationDate
                UpdateTabModuleVersion(module.TabModuleID);
                dataProvider.UpdateModuleLastContentModifiedOnDate(module.ModuleID);

                //We should also indicate that the Transalation Status has changed
                if (PortalController.GetPortalSettingAsBoolean("ContentLocalizationEnabled", module.PortalID, false))
                {
                    moduleController.UpdateTranslationStatus(module, false);
                }
		// and clear the cache
                moduleController.ClearCache(module.TabID);
            }
        }
开发者ID:rajeshvar,项目名称:Dnn.Platform,代码行数:45,代码来源:ModuleController.cs


注:本文中的DotNetNuke.Entities.Tabs.TabController.GetTabSettings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。