本文整理汇总了C#中DotNetNuke.Entities.Portals.PortalInfo类的典型用法代码示例。如果您正苦于以下问题:C# PortalInfo类的具体用法?C# PortalInfo怎么用?C# PortalInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PortalInfo类属于DotNetNuke.Entities.Portals命名空间,在下文中一共展示了PortalInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Start
public void Start(PortalInfo portalInfo)
{
var cache = DataCache.GetCache("InspectorIT.FileMonitor." + portalInfo.PortalID);
if (cache == null)
{
FileSystemWatcher fileWatcher = new FileSystemWatcher();
fileWatcher.Path = portalInfo.HomeDirectoryMapPath;
fileWatcher.IncludeSubdirectories = true;
fileWatcher.EnableRaisingEvents = true;
fileWatcher.NotifyFilter = NotifyFilters.FileName;
fileWatcher.Created += (s, e) => onFileChanged(s, e, portalInfo);
fileWatcher.Deleted += (s, e) => onFileDeleted(s, e, portalInfo);
fileWatcher.Renamed += (s, e) => onFileRenamed(s, e, portalInfo);
FileSystemWatcher folderWatcher = new FileSystemWatcher();
folderWatcher.Path = portalInfo.HomeDirectoryMapPath;
folderWatcher.IncludeSubdirectories = true;
folderWatcher.EnableRaisingEvents = true;
folderWatcher.NotifyFilter = NotifyFilters.DirectoryName;
folderWatcher.Created += (s, e) => onFolderChanged(s, e, portalInfo);
folderWatcher.Deleted += (s, e) => onFolderDeleted(s, e, portalInfo);
folderWatcher.Renamed += (s, e) => onFolderRenamed(s, e, portalInfo);
DataCache.SetCache("InspectorIT.FileMonitor." + portalInfo.PortalID, true);
}
}
开发者ID:jsheely,项目名称:DotNetNuke-FileWatcher,代码行数:28,代码来源:FileMonitor.cs
示例2: SerializeFiles
/// -----------------------------------------------------------------------------
/// <summary>
/// Serializes all Files
/// </summary>
/// <param name="objportal">Portal to serialize</param>
/// <param name="folderPath">The folder containing the files</param>
/// <remarks>
/// The serialization uses the xml attributes defined in FileInfo class.
/// </remarks>
/// <history>
/// [cnurse] 11/08/2004 Created
/// [cnurse] 05/20/2004 Extracted adding of file to zip to new FileSystemUtils method
/// </history>
/// -----------------------------------------------------------------------------
private void SerializeFiles(XmlWriter writer, PortalInfo objportal, string folderPath, ref ZipOutputStream zipFile)
{
var folderManager = FolderManager.Instance;
var objFolder = folderManager.GetFolder(objportal.PortalID, folderPath);
writer.WriteStartElement("files");
foreach (FileInfo objFile in folderManager.GetFiles(objFolder))
{
//verify that the file exists on the file system
var filePath = objportal.HomeDirectoryMapPath + folderPath + objFile.FileName;
if (File.Exists(filePath))
{
writer.WriteStartElement("file");
writer.WriteElementString("contenttype", objFile.ContentType);
writer.WriteElementString("extension", objFile.Extension);
writer.WriteElementString("filename", objFile.FileName);
writer.WriteElementString("height", objFile.Height.ToString());
writer.WriteElementString("size", objFile.Size.ToString());
writer.WriteElementString("width", objFile.Width.ToString());
writer.WriteEndElement();
FileSystemUtils.AddToZip(ref zipFile, filePath, objFile.FileName, folderPath);
}
}
writer.WriteEndElement();
}
开发者ID:davidsports,项目名称:Dnn.Platform,代码行数:42,代码来源:Template.ascx.cs
示例3: FillPortalInfo
private static PortalInfo FillPortalInfo( IDataReader dr, bool CheckForOpenDataReader )
{
PortalInfo objPortalInfo = null;
// read datareader
bool canContinue = true;
if( CheckForOpenDataReader )
{
canContinue = false;
if( dr.Read() )
{
canContinue = true;
}
}
if( canContinue )
{
objPortalInfo = new PortalInfo();
objPortalInfo.PortalID = Convert.ToInt32( Null.SetNull( dr["PortalID"], objPortalInfo.PortalID ) );
objPortalInfo.PortalName = Convert.ToString( Null.SetNull( dr["PortalName"], objPortalInfo.PortalName ) );
objPortalInfo.LogoFile = Convert.ToString( Null.SetNull( dr["LogoFile"], objPortalInfo.LogoFile ) );
objPortalInfo.FooterText = Convert.ToString( Null.SetNull( dr["FooterText"], objPortalInfo.FooterText ) );
objPortalInfo.ExpiryDate = Convert.ToDateTime( Null.SetNull( dr["ExpiryDate"], objPortalInfo.ExpiryDate ) );
objPortalInfo.UserRegistration = Convert.ToInt32( Null.SetNull( dr["UserRegistration"], objPortalInfo.UserRegistration ) );
objPortalInfo.BannerAdvertising = Convert.ToInt32( Null.SetNull( dr["BannerAdvertising"], objPortalInfo.BannerAdvertising ) );
objPortalInfo.AdministratorId = Convert.ToInt32( Null.SetNull( dr["AdministratorID"], objPortalInfo.AdministratorId ) );
objPortalInfo.Email = Convert.ToString( Null.SetNull( dr["Email"], objPortalInfo.Email ) );
objPortalInfo.Currency = Convert.ToString( Null.SetNull( dr["Currency"], objPortalInfo.Currency ) );
objPortalInfo.HostFee = Convert.ToInt32( Null.SetNull( dr["HostFee"], objPortalInfo.HostFee ) );
objPortalInfo.HostSpace = Convert.ToInt32( Null.SetNull( dr["HostSpace"], objPortalInfo.HostSpace ) );
objPortalInfo.PageQuota = Convert.ToInt32( Null.SetNull( dr["PageQuota"], objPortalInfo.PageQuota ) );
objPortalInfo.UserQuota = Convert.ToInt32( Null.SetNull( dr["UserQuota"], objPortalInfo.UserQuota ) );
objPortalInfo.AdministratorRoleId = Convert.ToInt32( Null.SetNull( dr["AdministratorRoleID"], objPortalInfo.AdministratorRoleId ) );
objPortalInfo.RegisteredRoleId = Convert.ToInt32( Null.SetNull( dr["RegisteredRoleID"], objPortalInfo.RegisteredRoleId ) );
objPortalInfo.Description = Convert.ToString( Null.SetNull( dr["Description"], objPortalInfo.Description ) );
objPortalInfo.KeyWords = Convert.ToString( Null.SetNull( dr["KeyWords"], objPortalInfo.KeyWords ) );
objPortalInfo.BackgroundFile = Convert.ToString( Null.SetNull( dr["BackGroundFile"], objPortalInfo.BackgroundFile ) );
objPortalInfo.GUID = new Guid( Convert.ToString( Null.SetNull( dr["GUID"], objPortalInfo.GUID ) ) );
objPortalInfo.PaymentProcessor = Convert.ToString( Null.SetNull( dr["PaymentProcessor"], objPortalInfo.PaymentProcessor ) );
objPortalInfo.ProcessorUserId = Convert.ToString( Null.SetNull( dr["ProcessorUserId"], objPortalInfo.ProcessorUserId ) );
objPortalInfo.ProcessorPassword = Convert.ToString( Null.SetNull( dr["ProcessorPassword"], objPortalInfo.ProcessorPassword ) );
objPortalInfo.SiteLogHistory = Convert.ToInt32( Null.SetNull( dr["SiteLogHistory"], objPortalInfo.SiteLogHistory ) );
objPortalInfo.SplashTabId = Convert.ToInt32( Null.SetNull( dr["SplashTabID"], objPortalInfo.SplashTabId ) );
objPortalInfo.HomeTabId = Convert.ToInt32( Null.SetNull( dr["HomeTabID"], objPortalInfo.HomeTabId ) );
objPortalInfo.LoginTabId = Convert.ToInt32( Null.SetNull( dr["LoginTabID"], objPortalInfo.LoginTabId ) );
objPortalInfo.UserTabId = Convert.ToInt32( Null.SetNull( dr["UserTabID"], objPortalInfo.UserTabId ) );
objPortalInfo.DefaultLanguage = Convert.ToString( Null.SetNull( dr["DefaultLanguage"], objPortalInfo.DefaultLanguage ) );
objPortalInfo.TimeZoneOffset = Convert.ToInt32( Null.SetNull( dr["TimeZoneOffset"], objPortalInfo.TimeZoneOffset ) );
objPortalInfo.AdminTabId = Convert.ToInt32( Null.SetNull( dr["AdminTabID"], objPortalInfo.AdminTabId ) );
objPortalInfo.HomeDirectory = Convert.ToString( Null.SetNull( dr["HomeDirectory"], objPortalInfo.HomeDirectory ) );
objPortalInfo.SuperTabId = Convert.ToInt32( Null.SetNull( dr["SuperTabId"], objPortalInfo.SuperTabId ) );
objPortalInfo.AdministratorRoleName = Convert.ToString( Null.SetNull( dr["AdministratorRoleName"], objPortalInfo.AdministratorRoleName ) );
objPortalInfo.RegisteredRoleName = Convert.ToString( Null.SetNull( dr["RegisteredRoleName"], objPortalInfo.RegisteredRoleName ) );
objPortalInfo.Users = Null.NullInteger;
objPortalInfo.Pages = Null.NullInteger;
}
return objPortalInfo;
}
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:59,代码来源:PortalController.cs
示例4: CopyUserToPortal
public static void CopyUserToPortal(UserInfo user, PortalInfo portal, bool mergeUser, bool deleteUser)
{
if (deleteUser)
{
MoveUserToPortal(user, portal, mergeUser);
}
else
{
CopyUserToPortal(user, portal, mergeUser);
}
}
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:11,代码来源:UserController.cs
示例5: AddAdminPage
/// <summary>
/// AddAdminPage adds an Admin Tab Page
/// </summary>
/// <param name="Portal">The Portal</param>
/// <param name="TabName">The Name to give this new Tab</param>
/// <param name="TabIconFile">The Icon for this new Tab</param>
/// <param name="IsVisible">A flag indicating whether the tab is visible</param>
private static TabInfo AddAdminPage(PortalInfo Portal, string TabName, string TabIconFile, bool IsVisible)
{
TabController objTabController = new TabController();
TabInfo AdminPage = objTabController.GetTab(Portal.AdminTabId, Portal.PortalID, false);
TabPermissionCollection objTabPermissions = new TabPermissionCollection();
AddPagePermission(ref objTabPermissions, "View", Convert.ToInt32(Portal.AdministratorRoleId));
//Call AddPage with parentTab = AdminPage & RoleId = AdministratorRoleId
return AddPage(AdminPage, TabName, TabIconFile, IsVisible, objTabPermissions, true);
}
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:18,代码来源:Upgrade.cs
示例6: GetManageablePortals
protected IEnumerable<PortalInfo> GetManageablePortals ()
{
if (UserInfo.IsSuperUser) {
// host can manage all portals plus host "portal"
var portals = PortalController.Instance.GetPortals ();
portals.Insert (0, new PortalInfo { PortalID = Const.HOST_PORTAL_ID, PortalName = LocalizeString ("Host.Text") });
return portals.Cast<PortalInfo> ();
}
if (UserInfo.IsInRole ("Administrators")) {
// admin can manage its portal only
var portals = new PortalInfo [] {
new PortalInfo { PortalID = PortalId, PortalName = PortalSettings.Current.PortalName }
};
return portals;
}
return Enumerable.Empty<PortalInfo> ();
}
开发者ID:roman-yagodin,项目名称:R7.Epsilon,代码行数:21,代码来源:ViewLayoutManager.ascx.cs
示例7: onFileChanged
private void onFileChanged(object sender, FileSystemEventArgs e, PortalInfo portalInfo)
{
try
{
var relativeFilePath = Utils.GetRelativePath(portalInfo.HomeDirectoryMapPath, e.FullPath);
string fileName = Path.GetFileName(e.Name);
var fileInfo = FileManager.Instance.GetFile(0, relativeFilePath);
if (fileInfo == null)
{
//Get Folder
string folderPath = relativeFilePath.Replace(fileName, "");
var folderInfo = FolderManager.Instance.GetFolder(portalInfo.PortalID, folderPath);
if (folderInfo == null)
{
folderInfo = FolderManager.Instance.AddFolder(portalInfo.PortalID, folderPath);
}
FileManager.Instance.AddFile(folderInfo, fileName, null, false);
}
}
catch (Exception ex)
{
DotNetNuke.Services.Exceptions.Exceptions.LogException(ex);
}
}
开发者ID:jsheely,项目名称:DotNetNuke-FileWatcher,代码行数:24,代码来源:FileMonitor.cs
示例8: SerializeFolderPermissions
/// <summary>
/// Serializes all Folder Permissions
/// </summary>
/// <param name="xmlTemplate">Reference to XmlDocument context</param>
/// <param name="nodePermissions"></param>
/// <param name="objportal">Portal to serialize</param>
/// <param name="folderPath">The folder containing the files</param>
/// <remarks>
/// The serialization uses the xml attributes defined in FolderInfo class.
/// </remarks>
/// <history>
/// [cnurse] 11/08/2004 Created
/// </history>
public void SerializeFolderPermissions( XmlDocument xmlTemplate, XmlNode nodePermissions, PortalInfo objportal, string folderPath )
{
FolderPermissionController objPermissions = new FolderPermissionController();
ArrayList arrPermissions = objPermissions.GetFolderPermissionsByFolder( objportal.PortalID, folderPath );
foreach( FolderPermissionInfo objPermission in arrPermissions )
{
XmlElement nodePermission = xmlTemplate.CreateElement( "permission" );
nodePermission.AppendChild( XmlUtils.CreateElement( xmlTemplate, "permissioncode", objPermission.PermissionCode ) );
nodePermission.AppendChild( XmlUtils.CreateElement( xmlTemplate, "permissionkey", objPermission.PermissionKey ) );
nodePermission.AppendChild( XmlUtils.CreateElement( xmlTemplate, "rolename", objPermission.RoleName ) );
nodePermission.AppendChild( XmlUtils.CreateElement( xmlTemplate, "allowaccess", objPermission.AllowAccess.ToString().ToLower() ) );
nodePermissions.AppendChild( nodePermission );
}
}
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:28,代码来源:Template.ascx.cs
示例9: SerializeProfileDefinitions
/// <summary>
/// Serializes all Profile Definitions
/// </summary>
/// <param name="xmlTemplate">Reference to XmlDocument context</param>
/// <param name="nodeProfileDefinitions">Node to add the serialized objects</param>
/// <param name="objportal">Portal to serialize</param>
/// <remarks>
/// The serialization uses the xml attributes defined in ProfilePropertyDefinition class.
/// </remarks>
/// <history>
/// </history>
public void SerializeProfileDefinitions(XmlDocument xmlTemplate, XmlNode nodeProfileDefinitions, PortalInfo objportal)
{
ListController objListController = new ListController();
XmlSerializer xser = new XmlSerializer(typeof(ProfilePropertyDefinition));
foreach (ProfilePropertyDefinition objProfileProperty in ProfileController.GetPropertyDefinitionsByPortal(objportal.PortalID))
{
StringWriter sw = new StringWriter();
xser.Serialize(sw, objProfileProperty);
XmlDocument xmlPropertyDefinition = new XmlDocument();
xmlPropertyDefinition.LoadXml(sw.GetStringBuilder().ToString());
XmlNode nodeProfileDefinition = xmlPropertyDefinition.SelectSingleNode("profiledefinition");
nodeProfileDefinition.Attributes.Remove(nodeProfileDefinition.Attributes["xmlns:xsd"]);
nodeProfileDefinition.Attributes.Remove(nodeProfileDefinition.Attributes["xmlns:xsi"]);
ListEntryInfo objList = objListController.GetListEntryInfo(objProfileProperty.DataType);
XmlNode newnode = xmlPropertyDefinition.CreateElement("datatype");
if (objList == null)
{
newnode.InnerXml = "Unknown";
}
else
{
newnode.InnerXml = objList.Value;
}
nodeProfileDefinition.AppendChild(newnode);
nodeProfileDefinitions.AppendChild(xmlTemplate.ImportNode(nodeProfileDefinition, true));
}
}
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:41,代码来源:Template.ascx.cs
示例10: SerializeFiles
/// <summary>
/// Serializes all Files
/// </summary>
/// <param name="xmlTemplate">Reference to XmlDocument context</param>
/// <param name="nodeFiles">Node to add the serialized objects</param>
/// <param name="objportal">Portal to serialize</param>
/// <param name="folderPath">The folder containing the files</param>
/// <param name="zipFile"></param>
/// <remarks>
/// The serialization uses the xml attributes defined in FileInfo class.
/// </remarks>
/// <history>
/// [cnurse] 11/08/2004 Created
/// [cnurse] 05/20/2004 Extracted adding of file to zip to new FileSystemUtils method
/// </history>
public void SerializeFiles(XmlDocument xmlTemplate, XmlNode nodeFiles, PortalInfo objportal, string folderPath, ref ZipOutputStream zipFile)
{
FolderController objFolders = new FolderController();
FolderInfo objFolder = objFolders.GetFolder( objportal.PortalID, folderPath );
ArrayList arrFiles = FileSystemUtils.GetFilesByFolder(objportal.PortalID, objFolder.FolderID);
XmlSerializer xser = new XmlSerializer(typeof(FileInfo));
foreach (FileInfo objFile in arrFiles)
{
// verify that the file exists on the file system
string filePath = objportal.HomeDirectoryMapPath + folderPath + objFile.FileName;
if (File.Exists(filePath))
{
StringWriter sw = new StringWriter();
xser.Serialize(sw, objFile);
//Add node to template
XmlDocument xmlFile = new XmlDocument();
xmlFile.LoadXml(sw.GetStringBuilder().ToString());
XmlNode nodeFile = xmlFile.SelectSingleNode("file");
nodeFile.Attributes.Remove(nodeFile.Attributes["xmlns:xsd"]);
nodeFile.Attributes.Remove(nodeFile.Attributes["xmlns:xsi"]);
nodeFiles.AppendChild(xmlTemplate.ImportNode(nodeFile, true));
FileSystemUtils.AddToZip(ref zipFile, filePath, objFile.FileName, folderPath);
}
}
}
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:46,代码来源:Template.ascx.cs
示例11: SerializeFolders
/// <summary>
/// Serializes all Folders including Permissions
/// </summary>
/// <param name="xmlTemplate">Reference to XmlDocument context</param>
/// <param name="nodeFolders"></param>
/// <param name="objportal">Portal to serialize</param>
/// <param name="zipFile"></param>
/// <remarks>
/// The serialization uses the xml attributes defined in FolderInfo class.
/// </remarks>
/// <history>
/// [cnurse] 11/08/2004 Created
/// </history>
public void SerializeFolders( XmlDocument xmlTemplate, XmlNode nodeFolders, PortalInfo objportal, ref ZipOutputStream zipFile )
{
// Sync db and filesystem before exporting so all required files are found
FileSystemUtils.Synchronize(objportal.PortalID, objportal.AdministratorRoleId, objportal.HomeDirectoryMapPath);
FolderController objFolders = new FolderController();
ArrayList arrFolders = objFolders.GetFoldersByPortal( objportal.PortalID );
XmlSerializer xser = new XmlSerializer( typeof( FolderInfo ) );
foreach( FolderInfo objFolder in arrFolders )
{
StringWriter sw = new StringWriter();
xser.Serialize( sw, objFolder );
XmlDocument xmlFolder = new XmlDocument();
xmlFolder.LoadXml( sw.GetStringBuilder().ToString() );
XmlNode nodeFolder = xmlFolder.SelectSingleNode( "folder" );
nodeFolder.Attributes.Remove( nodeFolder.Attributes["xmlns:xsd"] );
nodeFolder.Attributes.Remove( nodeFolder.Attributes["xmlns:xsi"] );
//Serialize Folder Permissions
XmlNode nodePermissions = xmlTemplate.CreateElement( "folderpermissions" );
SerializeFolderPermissions( xmlTemplate, nodePermissions, objportal, objFolder.FolderPath );
nodeFolder.AppendChild( xmlFolder.ImportNode( nodePermissions, true ) );
// Serialize files
XmlNode nodeFiles = xmlTemplate.CreateElement( "files" );
SerializeFiles( xmlTemplate, nodeFiles, objportal, objFolder.FolderPath, ref zipFile );
nodeFolder.AppendChild( xmlFolder.ImportNode( nodeFiles, true ) );
nodeFolders.AppendChild( xmlTemplate.ImportNode( nodeFolder, true ) );
}
}
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:46,代码来源:Template.ascx.cs
示例12: SerializePortalSettings
private void SerializePortalSettings(XmlWriter writer, PortalInfo portal)
{
writer.WriteStartElement("settings");
writer.WriteElementString("logofile", portal.LogoFile);
writer.WriteElementString("footertext", portal.FooterText);
writer.WriteElementString("userregistration", portal.UserRegistration.ToString());
writer.WriteElementString("banneradvertising", portal.BannerAdvertising.ToString());
writer.WriteElementString("defaultlanguage", portal.DefaultLanguage);
Dictionary<string, string> settingsDictionary = PortalController.GetPortalSettingsDictionary(portal.PortalID);
string setting;
settingsDictionary.TryGetValue("DefaultPortalSkin", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("skinsrc", setting);
}
settingsDictionary.TryGetValue("DefaultAdminSkin", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("skinsrcadmin", setting);
}
settingsDictionary.TryGetValue("DefaultPortalContainer", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("containersrc", setting);
}
settingsDictionary.TryGetValue("DefaultAdminContainer", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("containersrcadmin", setting);
}
settingsDictionary.TryGetValue("EnableSkinWidgets", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("enableskinwidgets", setting);
}
settingsDictionary.TryGetValue("portalaliasmapping", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("portalaliasmapping", setting);
}
writer.WriteElementString("contentlocalizationenabled", this.chkMultilanguage.Checked.ToString());
settingsDictionary.TryGetValue("TimeZone", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("timezone", setting);
}
settingsDictionary.TryGetValue("EnablePopups", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("enablepopups", setting);
}
settingsDictionary.TryGetValue("InlineEditorEnabled", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("inlineeditorenabled", setting);
}
settingsDictionary.TryGetValue("HideFoldersEnabled", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("hidefoldersenabled", setting);
}
settingsDictionary.TryGetValue("ControlPanelMode", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("controlpanelmode", setting);
}
settingsDictionary.TryGetValue("ControlPanelSecurity", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("controlpanelsecurity", setting);
}
settingsDictionary.TryGetValue("ControlPanelVisibility", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("controlpanelvisibility", setting);
}
writer.WriteElementString("hostspace", portal.HostSpace.ToString());
writer.WriteElementString("userquota", portal.UserQuota.ToString());
writer.WriteElementString("pagequota", portal.PageQuota.ToString());
//End Portal Settings
writer.WriteEndElement();
}
开发者ID:davidsports,项目名称:Dnn.Platform,代码行数:95,代码来源:Template.ascx.cs
示例13: SerializeSettings
/// <summary>
/// Serializes a PortalInfo object
/// </summary>
/// <param name="xmlTemplate">Reference to XmlDocument context</param>
/// <param name="nodePortal">Node to add the serialized objects</param>
/// <param name="objportal">Portal to serialize</param>
/// <remarks>
/// The serialization uses the xml attributes defined in PortalInfo class.
/// </remarks>
/// <history>
/// [VMasanas] 23/09/2004 Created
/// </history>
public void SerializeSettings( XmlDocument xmlTemplate, XmlNode nodePortal, PortalInfo objportal )
{
XmlSerializer xser;
StringWriter sw;
XmlNode nodeSettings;
XmlDocument xmlSettings;
xser = new XmlSerializer( typeof( PortalInfo ) );
sw = new StringWriter();
xser.Serialize( sw, objportal );
xmlSettings = new XmlDocument();
xmlSettings.LoadXml( sw.GetStringBuilder().ToString() );
nodeSettings = xmlSettings.SelectSingleNode( "settings" );
nodeSettings.Attributes.Remove( nodeSettings.Attributes["xmlns:xsd"] );
nodeSettings.Attributes.Remove( nodeSettings.Attributes["xmlns:xsi"] );
//remove unwanted elements
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "portalid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "portalname" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "administratorid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "administratorroleid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "administratorrolename" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "registeredroleid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "registeredrolename" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "description" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "keywords" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "processorpassword" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "processoruserid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "admintabid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "supertabid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "users" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "pages" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "splashtabid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "hometabid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "logintabid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "usertabid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "homedirectory" ) );
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("expirydate"));
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("currency"));
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("hostfee"));
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("hostspace"));
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "pagequota" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "userquota" ) );
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("backgroundfile"));
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("paymentprocessor"));
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("siteloghistory"));
AddSkinXml( xmlSettings, nodeSettings, SkinInfo.RootSkin, "portal", objportal.PortalID );
AddSkinXml( xmlSettings, nodeSettings, SkinInfo.RootContainer, "portal", objportal.PortalID );
nodePortal.AppendChild( xmlTemplate.ImportNode( nodeSettings, true ) );
}
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:63,代码来源:Template.ascx.cs
示例14: RenderPortalNode
/// <summary>
/// Renders the <paramref name="portal" /> node.
/// </summary>
/// <param name="portal">The <paramref name="portal" />.</param>
/// <param name="moduleController">The module controller.</param>
/// <param name="editorHostSettings">The editor host settings.</param>
private void RenderPortalNode(PortalInfo portal, ModuleController moduleController, List<EditorHostSetting> editorHostSettings)
{
var portalKey = string.Format("DNNCKP#{0}#", portal.PortalID);
var portalSettingsExists = SettingsUtil.CheckExistsPortalOrPageSettings(editorHostSettings, portalKey);
// Portals
var portalNode = new TreeNode
{
Text = portal.PortalName,
Value = string.Format("p{0}", portal.PortalID),
ImageUrl =
portalSettingsExists
? "../images/PortalHasSetting.png"
: "../images/PortalNoSetting.png",
Expanded = this.PortalOnly.Checked
};
foreach (var tabInfo in TabController.GetTabsByParent(-1, portal.PortalID))
{
this.RenderTabNode(portalNode, tabInfo, moduleController, editorHostSettings);
}
this.PortalTabsAndModulesTree.Nodes.Add(portalNode);
}
开发者ID:huoxudong125,项目名称:dnnckeditor,代码行数:31,代码来源:EditorConfigManager.ascx.cs
示例15: AddChildNodes
private void AddChildNodes(RadTreeNode parentNode, PortalInfo portal)
{
parentNode.Nodes.Clear();
var parentId = int.Parse(parentNode.Value);
var Tabs = TabController.Instance.GetTabsByPortal(portal.PortalID).WithCulture(languageComboBox.SelectedValue, true).WithParentId(parentId);
foreach (var tab in Tabs)
{
if (tab.ParentId == parentId)
{
string tooltip;
var nodeIcon = GetNodeIcon(tab, out tooltip);
var node = new RadTreeNode
{
Text = string.Format("{0} {1}", tab.TabName, GetNodeStatusIcon(tab)),
Value = tab.TabID.ToString(CultureInfo.InvariantCulture),
AllowEdit = true,
ImageUrl = nodeIcon,
ToolTip = tooltip,
Checked = true
};
AddChildNodes(node, portal);
parentNode.Nodes.Add(node);
}
}
}
开发者ID:davidsports,项目名称:Dnn.Platform,代码行数:29,代码来源:Template.ascx.cs
示例16: GetPortalSkins
private static List<KeyValuePair<string, string>> GetPortalSkins(PortalInfo portalInfo, string skinRoot)
{
var skins = new List<KeyValuePair<string, string>>();
if (portalInfo != null)
{
string rootFolder = portalInfo.HomeDirectoryMapPath + skinRoot;
if (Directory.Exists(rootFolder))
{
foreach (string skinFolder in Directory.GetDirectories(rootFolder))
{
AddSkinFiles(skins, skinRoot, skinFolder, true);
}
}
}
return skins;
}
开发者ID:rut5949,项目名称:Dnn.Platform,代码行数:17,代码来源:SkinController.cs
示例17: BindTree
private void BindTree(PortalInfo portal)
{
ctlPages.Nodes.Clear();
var rootNode = new RadTreeNode
{
Text = PortalSettings.PortalName,
ImageUrl = IconPortal,
Value = Null.NullInteger.ToString(CultureInfo.InvariantCulture),
Expanded = true,
AllowEdit = false,
EnableContextMenu = true,
Checked = true
};
rootNode.Attributes.Add("isPortalRoot", "True");
//var tabs = new TabCollection();
List<TabInfo> tabs;
if (chkMultilanguage.Checked)
{
tabs = TabController.GetPortalTabs(TabController.GetTabsBySortOrder(portal.PortalID, portal.DefaultLanguage, true),
Null.NullInteger,
false,
"<" + Localization.GetString("None_Specified") + ">",
true,
false,
true,
false,
false);
//Tabs = tabController.GetTabsByPortal(portal.PortalID).WithCulture(portal.DefaultLanguage, true);
}
else
{
tabs = TabController.GetPortalTabs(TabController.GetTabsBySortOrder(portal.PortalID, languageComboBox.SelectedValue, true),
Null.NullInteger,
false,
"<" + Localization.GetString("None_Specified") + ">",
true,
false,
true,
false,
false);
//tabs = tabController.GetTabsByPortal(portal.PortalID);
}
foreach (var tab in tabs) //.Values)
{
if (tab.Level == 0)
{
string tooltip;
var nodeIcon = GetNodeIcon(tab, out tooltip);
var node = new RadTreeNode
{
Text = string.Format("{0} {1}", tab.TabName, GetNodeStatusIcon(tab)),
Value = tab.TabID.ToString(CultureInfo.InvariantCulture),
AllowEdit = true,
ImageUrl = nodeIcon,
ToolTip = tooltip,
Checked = true
};
AddChildNodes(node, portal);
rootNode.Nodes.Add(node);
}
}
ctlPages.Nodes.Add(rootNode);
}
开发者ID:davidsports,项目名称:Dnn.Platform,代码行数:69,代码来源:Template.ascx.cs
示例18: BindLocales
private void BindLocales(PortalInfo portalInfo)
{
var locales = LocaleController.Instance.GetLocales(portalInfo.PortalID).Values;
MultiselectLanguages.Visible = false;
SingleSelectLanguages.Visible = false;
if (chkMultilanguage.Checked)
{
MultiselectLanguages.Visible = true;
chkLanguages.DataTextField = "EnglishName";
chkLanguages.DataValueField = "Code";
chkLanguages.DataSource = locales;
chkLanguages.DataBind();
foreach (ListItem item in chkLanguages.Items)
{
if (item.Value == portalInfo.DefaultLanguage)
{
item.Enabled = false;
item.Attributes.Add("title", string.Format(LocalizeString("DefaultLanguage"), item.Text));
lblNote.Text = string.Format(LocalizeString("lblNote"), item.Text);
}
item.Selected = true;
}
}
else
{
languageComboBox.BindData(true);
languageComboBox.SetLanguage(portalInfo.DefaultLanguage);
SingleSelectLanguages.Visible = true;
lblNoteSingleLanguage.Text = string.Format(LocalizeString("lblNoteSingleLanguage"), new CultureInfo(portalInfo.DefaultLanguage).EnglishName);
}
}
开发者ID:davidsports,项目名称:Dnn.Platform,代码行数:35,代码来源:Template.ascx.cs
示例19: SerializeEnabledLocales
-
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:18216|2023-10-27
-
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:9658|2022-11-06
-
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8172|2022-11-06
-
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8543|2022-11-06
-
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8449|2022-11-06
-
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9375|2022-11-06
-
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8420|2022-11-06
-
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:7855|2022-11-06
-
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8405|2022-11-06
-
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7391|2022-11-06
|
请发表评论