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


C# TabController.LocalizeTab方法代码示例

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


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

示例1: MakeTranslatable_Click

 protected void MakeTranslatable_Click(object sender, EventArgs e)
 {
     var t = new TabController();
     var defaultLocale = LocaleController.Instance.GetDefaultLocale(PortalId);
     t.LocalizeTab(_tab, defaultLocale);
     t.AddMissingLanguages(PortalId, _tab.TabID);
     t.ClearCache(PortalId);
     Response.Redirect(Request.RawUrl, false);
 }
开发者ID:RichardHowells,项目名称:dnnextensions,代码行数:9,代码来源:ManageTabs.ascx.cs

示例2: ProcessLanguage

        private void ProcessLanguage(List<TabInfo> pageList, Locale locale, int languageCount, int totalLanguages)
        {
            var tabCtrl = new TabController();
            RadProgressContext progress = RadProgressContext.Current;

            progress.Speed = "N/A";
            progress.PrimaryTotal = totalLanguages;
            progress.PrimaryValue = languageCount;
            

            int total = pageList.Count;
            if (total == 0)
            {
                progress.SecondaryTotal = 0;
                progress.SecondaryValue = 0;
                progress.SecondaryPercent = 100;
            }

            for (int i = 0; i <= total - 1; i++)
            {
                TabInfo currentTab = pageList[i];
                int stepNo = i + 1;

                progress.SecondaryTotal = total;
                progress.SecondaryValue = stepNo;
                float secondaryPercent = ((float) stepNo/(float) total) * 100;
                progress.SecondaryPercent = Convert.ToInt32(secondaryPercent);
                float primaryPercent = ((((float)languageCount + ((float)stepNo / (float)total)) / (float)totalLanguages)) * 100;
                progress.PrimaryPercent = Convert.ToInt32(primaryPercent);
                
                progress.CurrentOperationText = string.Format(Localization.GetString("ProcessingPage", LocalResourceFile), locale.Code, stepNo, total, currentTab.TabName);

                if (!Response.IsClientConnected)
                {
                    //clear cache
                    DataCache.ClearPortalCache(PortalId, true);

                    //Cancel button was clicked or the browser was closed, so stop processing
                    break;
                }

                progress.TimeEstimated = (total - stepNo)*100;

                if (locale.Code == PortalDefault)
                {
                    tabCtrl.LocalizeTab(currentTab, locale, false);
                }
                else
                {
                    tabCtrl.CreateLocalizedCopy(currentTab, locale, false);
                }
            }
        }
开发者ID:chutinhha,项目名称:onlineexampro,代码行数:53,代码来源:EnableLocalizedContent.ascx.cs


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