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


C# ModuleController.DeleteModuleSetting方法代码示例

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


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

示例1: UpdateModuleSettingForAllLanguages

        /// <summary>
        /// Update a setting for all language-versions of a module
        /// </summary>
        public static void UpdateModuleSettingForAllLanguages(int moduleId, string key, string value)
        {
            var moduleController = new ModuleController();

            // Find this module in other languages and update contentGroupGuid
            var originalModule = moduleController.GetModule(moduleId);
            var languages = LocaleController.Instance.GetLocales(originalModule.PortalID);

            if (!originalModule.IsDefaultLanguage && originalModule.DefaultLanguageModule != null)
                originalModule = originalModule.DefaultLanguageModule;

            foreach (var language in languages)
            {
                // Find module for given Culture
                var moduleByCulture = moduleController.GetModuleByCulture(originalModule.ModuleID, originalModule.TabID, originalModule.PortalID, language.Value);

                // Break if no module found
                if (moduleByCulture == null)
                    continue;

                if (value == null)
                    moduleController.DeleteModuleSetting(moduleByCulture.ModuleID, key);
                else
                    moduleController.UpdateModuleSetting(moduleByCulture.ModuleID, key, value);
            }
        }
开发者ID:2sic,项目名称:2sxc,代码行数:29,代码来源:DnnStuffToRefactor.cs

示例2: ClearModuleSettings

 private void ClearModuleSettings(ModuleInfo objModule)
 {
     var moduleController = new ModuleController();
     if (objModule.ModuleDefinition.FriendlyName == "Text/HTML")
     {
         moduleController.DeleteModuleSetting(objModule.ModuleID, "WorkFlowID");
     }
 }
开发者ID:rut5949,项目名称:Dnn.Platform,代码行数:8,代码来源:HtmlTextController.cs

示例3: DelModuleSettings

        /// <summary>
        /// Delete Settings only for this Module Instance
        /// </summary>
        private void DelModuleSettings()
        {
            this.moduleInstanceName = this.request.QueryString["minc"];
            string moduleKey = string.Format("DNNCKMI#{0}#INS#{1}#", this.ModuleId, this.moduleInstanceName);

            var moduleController = new ModuleController();

            foreach (PropertyInfo info in
                SettingsUtil.GetEditorConfigProperties())
            {
                moduleController.DeleteModuleSetting(this.ModuleId, string.Format("{0}{1}", moduleKey, info.Name));
            }

            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.SKIN));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.CODEMIRRORTHEME));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.BROWSER));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.FILELISTPAGESIZE));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.FILELISTVIEWMODE));
            moduleController.DeleteModuleSetting(
                 this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.DEFAULTLINKMODE));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.USEANCHORSELECTOR));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.SHOWPAGELINKSTABFIRST));
            moduleController.DeleteModuleSetting(
               this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.OVERRIDEFILEONUPLOAD));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.SUBDIRS));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.BROWSERROOTDIRID));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.UPLOADDIRID));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.INJECTJS));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.WIDTH));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.HEIGHT));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.BLANKTEXT));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.STYLES));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.CSS));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.TEMPLATEFILES));
            moduleController.DeleteModuleSetting(
                this.ModuleId,
                string.Format("{0}{1}", moduleKey, SettingConstants.CUSTOMJSFILE));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.CONFIG));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.ROLES));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.RESIZEHEIGHT));
            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{1}", moduleKey, SettingConstants.RESIZEWIDTH));

            foreach (RoleInfo objRole in this.objRoleController.GetPortalRoles(this._portalSettings.PortalId))
            {
                moduleController.DeleteModuleSetting(
                    this.ModuleId, string.Format("{0}{2}#{1}", moduleKey, objRole.RoleID, SettingConstants.TOOLB));
            }

            moduleController.DeleteModuleSetting(
                this.ModuleId, string.Format("{0}{2}#{1}", moduleKey, "-1", SettingConstants.TOOLB));

            // Finally Clear Cache
            DataCache.ClearHostCache(true);
        }
开发者ID:huoxudong125,项目名称:dnnckeditor,代码行数:78,代码来源:CKEditorOptions.ascx.cs

示例4: UpdateSettings

        public override void UpdateSettings()
        {
            try
            {
                var moduleController = new ModuleController();

                //validate console width value
                var wdth = string.Empty;
                if ((ConsoleWidth.Text.Trim().Length > 0))
                {
                    try
                    {
                        wdth = Unit.Parse(ConsoleWidth.Text.Trim()).ToString();
                    }
                    catch (Exception exc)
                    {
                        Logger.Error(exc);

                        throw new Exception("ConsoleWidth value is invalid. Value must be numeric.");
                    }
                }
                if ((ParentTab.SelectedValue == string.Empty))
                {
                    moduleController.DeleteModuleSetting(ModuleId, "ParentTabID");
                }
                else
                {
                    moduleController.UpdateModuleSetting(ModuleId, "ParentTabID", ParentTab.SelectedValue);
                }
                moduleController.UpdateModuleSetting(ModuleId, "Mode", modeList.SelectedValue);
                moduleController.UpdateModuleSetting(ModuleId, "DefaultSize", DefaultSize.SelectedValue);
                moduleController.UpdateModuleSetting(ModuleId, "AllowSizeChange", AllowResize.Checked.ToString(CultureInfo.InvariantCulture));
                moduleController.UpdateModuleSetting(ModuleId, "DefaultView", DefaultView.SelectedValue);
                moduleController.UpdateModuleSetting(ModuleId, "AllowViewChange", AllowViewChange.Checked.ToString(CultureInfo.InvariantCulture));
                moduleController.UpdateModuleSetting(ModuleId, "ShowTooltip", ShowTooltip.Checked.ToString(CultureInfo.InvariantCulture));
                moduleController.UpdateModuleSetting(ModuleId, "IncludeParent", IncludeParent.Checked.ToString(CultureInfo.InvariantCulture));
                moduleController.UpdateModuleSetting(ModuleId, "ConsoleWidth", wdth);

                foreach (RepeaterItem item in tabs.Items)
                {
                    if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
                    {
                        var tabPath = (item.FindControl("tabPath") as HiddenField).Value;
                        var visibility = (item.FindControl("tabVisibility") as DnnComboBox).SelectedValue;

                        var key = String.Format("TabVisibility{0}", tabPath.Replace("//","-"));
                        moduleController.UpdateModuleSetting(ModuleId, key, visibility);
                    }
                }
            }
            catch (Exception exc)
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
开发者ID:rcedev,项目名称:evans-software-solutions,代码行数:55,代码来源:Settings.ascx.cs

示例5: DeletePreviewTemplateId

 public static void DeletePreviewTemplateId(int moduleId)
 {
     var moduleController = new ModuleController();
     moduleController.DeleteModuleSetting(moduleId, PreviewTemplateIdString);
 }
开发者ID:BravoSierra,项目名称:2sxc,代码行数:5,代码来源:ContentGroups.cs

示例6: LoadSettingsFromDnn

        /// <summary>
        /// This method is used to load settings from the DNN Settings collection, for upgrade sites
        /// </summary>
        /// <param name="moduleId"></param>
        /// <param name="Settings"></param>
        public static ModuleSettingsInfo LoadSettingsFromDnn(int moduleId, Hashtable Settings)
        {
            var validSettings = true;
            var oNewSettings = new ModuleSettingsInfo();
            var oModController = new ModuleController();
            oNewSettings.ModuleId = moduleId;
            //If we have CSS settings use them
            object titleCssSetting = Settings["ICG_ETH_TitleCss"];
            object contentCssSetting = Settings["ICG_ETH_ContentCss"];
            object sortOrderSettings = Settings["ICG_ETH_SortOrder"];

            if (titleCssSetting != null)
            {
                oNewSettings.TitleCss = titleCssSetting.ToString();
                oModController.DeleteModuleSetting(moduleId, "ICG_ETH_TitleCss");
            }
            else
                validSettings = false;

            if (contentCssSetting != null)
            {
                oNewSettings.TitleCss = contentCssSetting.ToString();
                oModController.DeleteModuleSetting(moduleId, "ICG_ETH_ContentCss");
            }
            else
                validSettings = false;

            if (sortOrderSettings != null)
            {
                oNewSettings.SortOrder = sortOrderSettings.ToString();
                oModController.DeleteModuleSetting(moduleId, "ICG_ETH_SortOrder");
            }
            else
                validSettings = false;

            if (Settings["ICG_ETH_ExpandOnPrint"] != null)
            {
                oNewSettings.ExpandOnPrint = bool.Parse(Settings["ICG_ETH_ExpandOnPrint"].ToString());
                oModController.DeleteModuleSetting(moduleId, "ICG_ETH_ExpandOnPrint");
            }
            else
                validSettings = false;

            //Load the jquerysettings, if enable
            object jquerySetting = Settings["ICG_ETH_JQuery"];
            if (jquerySetting != null)
            {
                oNewSettings.UseJquery = bool.Parse(jquerySetting.ToString());
                oModController.DeleteModuleSetting(moduleId, "ICG_ETH_JQuery");
            }
            else
                validSettings = false;

            object displayLimitSetting = Settings["ICG_ETH_DisplayLimit"];
            if (displayLimitSetting != null)
            {
                oNewSettings.DisplayLimit = int.Parse(displayLimitSetting.ToString());
                oModController.DeleteModuleSetting(moduleId, "ICG_ETH_DisplayLimit");
            }
            else
                validSettings = false;

            //Also get show all text
            object showAllTextSetting = Settings["ICG_ETH_ShowAllText"];
            if (showAllTextSetting != null)
            {
                oNewSettings.ShowAllText = showAllTextSetting.ToString();
                oModController.DeleteModuleSetting(moduleId, "ICG_ETH_ShowAllText");
            }
            else
                validSettings = false;

            if (validSettings)
            {
                oNewSettings.ShowExpandCollapseAll = true;
                Save(oNewSettings);
                return oNewSettings;
            }
            else
            {
                return null;
            }
        }
开发者ID:IowaComputerGurus,项目名称:DNN-ExpandableText,代码行数:88,代码来源:ModuleSettingsController.cs

示例7: SaveSettings

        protected void SaveSettings()
        {
            ModuleController mc = new ModuleController();
            if (txtAnalyticsTrackingId.Text.Length > 0)
            {
                if (ModuleSettings.ContainsKey("GoogleTrackingId"))
                    ModuleSettings["GoogleTrackingId"] = txtAnalyticsTrackingId.Text;
                else
                    ModuleSettings.Add("GoogleTrackingId", txtAnalyticsTrackingId.Text);
                mc.UpdateModuleSetting(this.ModuleId, "GoogleTrackingId", txtAnalyticsTrackingId.Text);
            }

            if (ModuleSettings.ContainsKey("LocalHostAddress"))
                ModuleSettings["LocalHostAddress"] = txtLocalHostName.Text;
            else
                ModuleSettings.Add("LocalHostAddress", txtLocalHostName.Text );
            mc.UpdateModuleSetting(this.ModuleId, "LocalHostAddress", txtLocalHostName.Text );

            if (ddlSecurityGroups.SelectedValue != "-1")
            {
                if (ModuleSettings.ContainsKey("HideTrackingFromRole"))
                    ModuleSettings["HideTrackingFromRole"] = ddlSecurityGroups.SelectedItem.Text;
                else
                    ModuleSettings.Add("HideTrackingFromRole", ddlSecurityGroups.SelectedItem.Text);
                mc.UpdateModuleSetting(this.ModuleId, "HideTrackingFromRole", ddlSecurityGroups.SelectedItem.Text);
            }
            else
            {
                if (ModuleSettings.ContainsKey("HideTrackingFromRole"))
                    mc.DeleteModuleSetting(this.ModuleId, "HideTrackingFromRole");
            }
        }
开发者ID:goedings,项目名称:VendorLink,代码行数:32,代码来源:ScripterSettings.ascx.cs

示例8: UpdateSettings

        public override void UpdateSettings()
        {
            try
            {
                var objModules = new ModuleController();

                //validate console width value
                var wdth = string.Empty;
                if ((ConsoleWidth.Text.Trim().Length > 0))
                {
                    try
                    {
                        wdth = Unit.Parse(ConsoleWidth.Text.Trim()).ToString();
                    }
                    catch (Exception exc)
                    {
                        DnnLog.Error(exc);

                        throw new Exception("ConsoleWidth value is invalid. Value must be numeric.");
                    }
                }
                if ((ParentTab.SelectedValue == string.Empty))
                {
                    objModules.DeleteModuleSetting(ModuleId, "ParentTabID");
                }
                else
                {
                    objModules.UpdateModuleSetting(ModuleId, "ParentTabID", ParentTab.SelectedValue);
                }
                objModules.UpdateModuleSetting(ModuleId, "DefaultSize", DefaultSize.SelectedValue);
                objModules.UpdateModuleSetting(ModuleId, "AllowSizeChange", AllowResize.Checked.ToString());
                objModules.UpdateModuleSetting(ModuleId, "DefaultView", DefaultView.SelectedValue);
                objModules.UpdateModuleSetting(ModuleId, "AllowViewChange", AllowViewChange.Checked.ToString());
                objModules.UpdateModuleSetting(ModuleId, "ShowTooltip", ShowTooltip.Checked.ToString());
                objModules.UpdateModuleSetting(ModuleId, "ConsoleWidth", wdth);
            }
            catch (Exception exc)
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
开发者ID:sunsiz,项目名称:dnn6-chinese-language-pack,代码行数:41,代码来源:Settings.ascx.cs

示例9: cookie_clear

 protected void cookie_clear()
 {
     if (cookie_check())
     {
         ModuleController obModule = new ModuleController();
         obModule.DeleteModuleSetting(ModuleId, cookie_user());
         Response.Cookies[cookie_name()].Expires = DateTime.Today.AddDays(-1);
         Response.Cookies["EOFFICE"].Expires = DateTime.Today.AddDays(-1);
         tbUsername.Visible = true;
         tbPassword.Visible = true;
         SignIn.Text = "Đăng nhập";
         cbRemember.Visible = true;
         btClear.Visible = false;
     }
 }
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:15,代码来源:Login.ascx.cs

示例10: LoadFormFields

        private void LoadFormFields()
        {
            try
            {
                if (this.AttachedModule > 0)
                    this.cboModuleList.Items.FindByValue(this.AttachedModule.ToString()).Selected = true;
            }
            catch
            {
                ModuleController ctlModule = new ModuleController();
                ctlModule.DeleteModuleSetting(this.ModuleId, "AttachedModuleId");
                ModuleController.SynchronizeModule(this.ModuleId);
                this.cboModuleList.SelectedIndex = 0;
            }

            this.txtAppName.Text = DisqusApplicationName;
            chkRequireDnnLogin.Checked = RequireDnnLogin;

            if (string.IsNullOrEmpty(this.DisqusView))
            {
                this.cboModuleView.Items.FindByValue("comments").Selected = true;
                this.DisqusView = "comments";
            }
            else
            {
                this.cboModuleView.Items.FindByValue(this.DisqusView).Selected = true;
            }

            if (this.DisplayItems > 0)
            {
                this.cboDisplayItems.Items.FindByValue(this.DisplayItems.ToString()).Selected = true;
            }
            else
            {
                this.cboDisplayItems.Items[0].Selected = true;
            }

            this.chkShowModerators.Checked = this.ShowModerators;

            if (string.IsNullOrEmpty(this.ColorTheme))
            {
                this.cboColorTheme.Items.FindByValue("blue").Selected = true;
            }
            else
            {
                this.cboColorTheme.Items.FindByValue(this.ColorTheme).Selected = true;
            }

            if (string.IsNullOrEmpty(this.DefaultTab))
            {
                this.cboDefaultTab.Items.FindByValue("people").Selected = true;
            }
            else
            {
                this.cboDefaultTab.Items.FindByValue(this.DefaultTab).Selected = true;
            }

            if (this.CommentLength > 0)
            {
                this.txtCommentLength.Text = this.CommentLength.ToString();
            }
            else
            {
                this.txtCommentLength.Text = "200";
            }

            this.chkShowAvatar.Checked = this.ShowAvatar;

            if (this.AvatarSize > 0)
            {
                this.cboAvatarSize.Items.FindByValue(this.AvatarSize.ToString()).Selected = true;
            }
            else
            {
                this.cboAvatarSize.Items[0].Selected = true;
            }

            /* SITE-LEVEL SETTINGS */

            if (string.IsNullOrEmpty(DisqusApiSecret) == false)
            {
                txtApiSecret.Text = DisqusApiSecret;
            }

            if (UserInfo.IsSuperUser)
            {
                chkSchedule.Checked = ScheduleEnabled;
            }

            chkDeveloperMode.Checked = DisqusDeveloperMode;

            chkSsoEnabled.Checked = DisqusSsoEnabled;

            txtSsoApiKey.Text = DisqusSsoApiKey;

            this.ChangeView(this.DisqusView);
        }
开发者ID:nvisionative,项目名称:dnnextensions,代码行数:97,代码来源:Edit.ascx.cs

示例11: SetAppIdForModule

        public static void SetAppIdForModule(ModuleInfo module, int? appId)
        {
            var moduleController = new ModuleController();

            // Reset temporary template
            ContentGroups.DeletePreviewTemplateId(module.ModuleID);

            // ToDo: Should throw exception if a real ContentGroup exists

            var zoneId = GetZoneID(module.OwnerPortalID);

            if (appId == 0 || !appId.HasValue)
                moduleController.DeleteModuleSetting(module.ModuleID, AppNameString);
            else
            {
                var appName = ((BaseCache) DataSource.GetCache(0, 0)).ZoneApps[zoneId.Value].Apps[appId.Value];
                moduleController.UpdateModuleSetting(module.ModuleID, AppNameString, appName);
            }

            // Change to 1. available template if app has been set
            if (appId.HasValue)
            {
                var sexyForNewApp = new SexyContent(zoneId.Value, appId.Value, false);
                var templates = sexyForNewApp.GetAvailableTemplatesForSelector(module).ToList();
                if (templates.Any())
                    sexyForNewApp.ContentGroups.SetPreviewTemplateId(module.ModuleID, templates.First().TemplateId);
            }
        }
开发者ID:BravoSierra,项目名称:2sxc,代码行数:28,代码来源:SexyContent.cs


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