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


C# TabController.UpdateTranslationStatus方法代码示例

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


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

示例1: languageTranslatedCheckbox_CheckChanged

        protected void languageTranslatedCheckbox_CheckChanged(object sender, EventArgs e)
        {
            try
            {
                if ((sender) is DnnCheckBox)
                {
                    var translatedCheckbox = (DnnCheckBox)sender;
                    int tabId = int.Parse(translatedCheckbox.CommandArgument);
                    var tabCtrl = new TabController();
                    TabInfo localizedTab = tabCtrl.GetTab(tabId, PortalId, false);

                    tabCtrl.UpdateTranslationStatus(localizedTab, translatedCheckbox.Checked);

                }
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
开发者ID:RichardHowells,项目名称:dnnextensions,代码行数:20,代码来源:ManageTabs.ascx.cs

示例2: translatedCheckbox_CheckedChanged

        protected void translatedCheckbox_CheckedChanged(object sender, EventArgs e)
        {
            var tabCtrl = new TabController();
            TabInfo localizedTab = tabCtrl.GetTab(TabId, PortalId, false);

            tabCtrl.UpdateTranslationStatus(localizedTab, translatedCheckbox.Checked);

            //Rebind Tab
            _tab = null;
            BindLocalization(true);
        }
开发者ID:smkkstudios,项目名称:BlackandWhiteReporting,代码行数:11,代码来源:ManageTabs.ascx.cs

示例3: SaveTabData


//.........这里部分代码省略.........
                                        var objObject = Reflection.CreateObject(newModule.DesktopModule.BusinessControllerClass, newModule.DesktopModule.BusinessControllerClass);
                                        if (objObject is IPortable)
                                        {
                                            var content = Convert.ToString(((IPortable)objObject).ExportModule(intModuleID));
                                            if (!string.IsNullOrEmpty(content))
                                            {
                                                ((IPortable)objObject).ImportModule(newModule.ModuleID, content, newModule.DesktopModule.Version, UserInfo.UserID);
                                            }
                                        }
                                    }
                                }
                            }

                            if (optReference.Checked)
                            {
                                //Make reference copies on secondary language
                                foreach (var m in objModule.LocalizedModules.Values)
                                {
                                    var newLocalizedModule = m.Clone();
                                    var localizedTab = Tab.LocalizedTabs[m.CultureCode];
                                    newLocalizedModule.TabID = localizedTab.TabID;
                                    newLocalizedModule.CultureCode = localizedTab.CultureCode;
                                    newLocalizedModule.ModuleTitle = txtCopyTitle.Text;
                                    newLocalizedModule.DefaultLanguageGuid = newModule.UniqueId;
                                    newLocalizedModule.ModuleID = objModules.AddModule(newLocalizedModule);
                                }
                            }
                        }
                    }
                }
                else
                {
                    // create the page from a template
                    if (cboTemplate.SelectedItem != null && cboTemplate.SelectedItem.Value != Null.NullInteger.ToString())
                    {
                        var xmlDoc = new XmlDocument();
                        try
                        {
                            // open the XML file
                            xmlDoc.Load(PortalSettings.HomeDirectoryMapPath + cboFolders.SelectedValue + cboTemplate.SelectedValue);
                        }
                        catch (Exception ex)
                        {
                            Exceptions.LogException(ex);

                            UI.Skins.Skin.AddModuleMessage(this, Localization.GetString("BadTemplate", LocalResourceFile), ModuleMessage.ModuleMessageType.RedError);
                            return Null.NullInteger;
                        }
                        TabController.DeserializePanes(xmlDoc.SelectSingleNode("//portal/tabs/tab/panes"), Tab.PortalID, Tab.TabID, PortalTemplateModuleAction.Ignore, new Hashtable());
                        //save tab permissions
                        RibbonBarManager.DeserializeTabPermissions(xmlDoc.SelectNodes("//portal/tabs/tab/tabpermissions/permission"), Tab);

                        var tabIndex = 0;
                        var exceptions = string.Empty;
                        foreach (XmlNode tabNode in xmlDoc.SelectSingleNode("//portal/tabs").ChildNodes)
                        {
                            //Create second tab onward tabs. Note first tab is already created above.
                            if(tabIndex > 0)
                            {
                                try
                                {
                                    TabController.DeserializeTab(tabNode, null, PortalId, PortalTemplateModuleAction.Replace);
                                }
                                catch (Exception ex)
                                {
                                    Exceptions.LogException(ex);
                                    exceptions += string.Format("Template Tab # {0}. Error {1}<br/>", tabIndex + 1, ex.Message);
                                }
                            }
                            tabIndex++;
                        }

                        if (!string.IsNullOrEmpty(exceptions))
                        {
                            UI.Skins.Skin.AddModuleMessage(this, exceptions, ModuleMessage.ModuleMessageType.RedError);
                            return Null.NullInteger;
                        }
                    }
                }
            }

            // url tracking
            var objUrls = new UrlController();
            objUrls.UpdateUrl(PortalId, ctlURL.Url, ctlURL.UrlType, 0, Null.NullDate, Null.NullDate, ctlURL.Log, ctlURL.Track, Null.NullInteger, ctlURL.NewWindow);

            //Clear the Tab's Cached modules
            DataCache.ClearModuleCache(TabId);

            //Update Cached Tabs as TabPath may be needed before cache is cleared
            TabInfo tempTab;
            if (new TabController().GetTabsByPortal(PortalId).TryGetValue(Tab.TabID, out tempTab))
            {
                tempTab.TabPath = Tab.TabPath;
            }

            //Update Translation Status
            objTabs.UpdateTranslationStatus(Tab, translatedCheckbox.Checked);

            return Tab.TabID;
        }
开发者ID:smkkstudios,项目名称:BlackandWhiteReporting,代码行数:101,代码来源:ManageTabs.ascx.cs

示例4: publishPageButton_Click

        protected void publishPageButton_Click(object sender, EventArgs e)
        {
            var tabCtrl = new TabController();
            var modCtrl = new ModuleController();

            //First mark all modules as translated
            foreach (ModuleInfo m in modCtrl.GetTabModules(Tab.TabID).Values)
            {
                modCtrl.UpdateTranslationStatus(m, true);
            }

            //First mark tab as translated
            tabCtrl.UpdateTranslationStatus(Tab, true);

            //Next publish Tab (update Permissions)
            tabCtrl.PublishTab(Tab);

            //Redirect to refresh page (and skinobjects)
            Response.Redirect(Request.RawUrl, true);
        }
开发者ID:smkkstudios,项目名称:BlackandWhiteReporting,代码行数:20,代码来源:ManageTabs.ascx.cs

示例5: MarkTranslatedSelectedItems

        public void MarkTranslatedSelectedItems(bool translated)
        {
            foreach (GridDataItem row in localizedTabsGrid.SelectedItems)
            {
                var language = (string) row.OwnerTableView.DataKeyValues[row.ItemIndex]["CultureCode"];
                var tabCtrl = new TabController();
                TabInfo localizedTab = null;
                if (Tab.LocalizedTabs.TryGetValue(language, out localizedTab))
                {
                    tabCtrl.UpdateTranslationStatus(localizedTab, translated);
                }
            }

            //Raise Changed event
            OnTabLocalizationChanged(EventArgs.Empty);

            //Rebind localized Tabs
            DataBind();
        }
开发者ID:RichardHowells,项目名称:dnnextensions,代码行数:19,代码来源:TabLocalization.ascx.cs


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