本文整理汇总了C#中DotNetNuke.Entities.Modules.ModuleController.DeleteModuleSettings方法的典型用法代码示例。如果您正苦于以下问题:C# ModuleController.DeleteModuleSettings方法的具体用法?C# ModuleController.DeleteModuleSettings怎么用?C# ModuleController.DeleteModuleSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Modules.ModuleController
的用法示例。
在下文中一共展示了ModuleController.DeleteModuleSettings方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteTab
public void DeleteTab(TabInfo t)
{
PortalSettings portalSettings = new PortalSettings();
int portalId = portalSettings.PortalId;
if (t != null)
{
TabController tc = new TabController();
if (t != null)
{
if (t.Modules != null)
{
foreach (ModuleInfo mod in t.Modules)
{
ModuleController moduleC = new ModuleController();
moduleC.DeleteModule(mod.ModuleID);
moduleC.DeleteModuleSettings(mod.ModuleID);
}
}
tc.DeleteTab(t.TabID, portalId);
tc.DeleteTabSettings(t.TabID);
DataCache.ClearModuleCache(t.TabID);
}
}
}
示例2: SaveSettings
private void SaveSettings()
{
ModuleController ctlModule = new ModuleController();
var sec = new Security.PortalSecurity();
ctlModule.DeleteModuleSettings(this.ModuleId);
ctlModule.DeleteTabModuleSettings(this.TabModuleId);
Entities.Portals.PortalController.UpdatePortalSetting(PortalId, "wnsDisqusApplicationName", sec.InputFilter(txtAppName.Text, PortalSecurity.FilterFlag.NoMarkup), true, PortalSettings.CultureCode);
Entities.Portals.PortalController.UpdatePortalSetting(PortalId, "wnsDisqusApiSecret", sec.InputFilter(txtApiSecret.Text, PortalSecurity.FilterFlag.NoMarkup), true, PortalSettings.CultureCode);
Entities.Portals.PortalController.UpdatePortalSetting(PortalId, "wnsDisqusRequireDnnLogin", chkRequireDnnLogin.Checked.ToString(), true, PortalSettings.CultureCode);
Entities.Portals.PortalController.UpdatePortalSetting(PortalId, "wnsDisqusDeveloperMode", chkDeveloperMode.Checked.ToString(), true, PortalSettings.CultureCode);
Entities.Portals.PortalController.UpdatePortalSetting(PortalId, "wnsDisqusSsoEnabled", chkSsoEnabled.Checked.ToString(), true);
Entities.Portals.PortalController.UpdatePortalSetting(PortalId, "wnsDisqusSsoApiKey", sec.InputFilter(txtSsoApiKey.Text, PortalSecurity.FilterFlag.NoMarkup), true);
if (UserInfo.IsSuperUser)
{
// save & apply schedule preferences
ManageSchedulerItem();
}
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "DisqusView", this.cboModuleView.SelectedValue);
switch (this.cboModuleView.SelectedValue)
{
case "comments":
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "AttachedModuleId", this.cboModuleList.SelectedValue);
break;
case "combination":
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "DisplayItems", this.cboDisplayItems.SelectedValue);
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "ShowModerators", this.chkShowModerators.Checked.ToString());
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "ColorTheme", this.cboColorTheme.SelectedValue);
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "DefaultTab", this.cboDefaultTab.SelectedValue);
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "CommentLength", sec.InputFilter(this.txtCommentLength.Text, PortalSecurity.FilterFlag.NoMarkup));
break;
case "recent-comments":
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "DisplayItems", this.cboDisplayItems.SelectedValue);
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "ShowAvatar", this.chkShowAvatar.Checked.ToString());
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "AvatarSize", this.cboAvatarSize.SelectedValue);
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "CommentLength", sec.InputFilter(this.txtCommentLength.Text, PortalSecurity.FilterFlag.NoMarkup));
break;
case "popular-threads":
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "DisplayItems", this.cboDisplayItems.SelectedValue);
break;
case "top-commenters":
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "DisplayItems", this.cboDisplayItems.SelectedValue);
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "ShowModerators", this.chkShowModerators.Checked.ToString());
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "ShowAvatar", this.chkShowAvatar.Checked.ToString());
ctlModule.UpdateTabModuleSetting(this.TabModuleId, "AvatarSize", this.cboAvatarSize.SelectedValue);
break;
}
ModuleController.SynchronizeModule(this.ModuleId);
}