⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configuration.cs

📁 三层架构的.net源码三层架构的.net源码
💻 CS
📖 第 1 页 / 共 4 页
字号:
			}

			// Sort the modules in order of ModuleOrder
			this.ActiveTab.Modules.Sort();

			// Get the first row in the Global table
			// 获取全局设置
			SiteConfiguration.GlobalRow globalSettings = (SiteConfiguration.GlobalRow) siteSettings.Global.Rows[0];

			// Read Portal global settings 
			// 读取门户站点的全局设置
			this.PortalId = globalSettings.PortalId;
			this.PortalName = globalSettings.PortalName;
			this.AlwaysShowEditButton = globalSettings.AlwaysShowEditButton;
			this.ActiveTab.TabIndex = tabIndex;
			this.ActiveTab.TabId = tabId;
			this.ActiveTab.TabOrder = activeTab.TabOrder;
			this.ActiveTab.MobileTabName = activeTab.MobileTabName;
			this.ActiveTab.AuthorizedRoles = activeTab.AccessRoles;
			this.ActiveTab.TabName = activeTab.TabName;
			this.ActiveTab.ShowMobile = activeTab.ShowMobile;
		}
	}

	#endregion

	#region TabStripDetails Class 导航标签的详细信息类(封装:标签Id,标签名称,标签排序号,可访问角色等属性)

	//*********************************************************************
	//
	// TabStripDetails Class
	//
	// Class that encapsulates the just the tabstrip details -- TabName, TabId and TabOrder 
	// -- for a specific Tab in the Portal
	//
	//*********************************************************************

	/// <summary>
	/// 导航标签的详细信息类(封装:标签Id,标签名称,标签排序号,可访问角色等属性)
	/// </summary>
	public class TabStripDetails 
	{

		public int          TabId;				//标签Id
		public String       TabName;			//标签名称
		public int          TabOrder;			//标签排序号
		public String       AuthorizedRoles;	//可访问角色
	}

	#endregion

	#region TabSettings Class 导航标签设置信息(封装:标签索引,标签Id,标签名称,标签排序号,“移动设备浏览器”上显示的标签名称,可访问角色,是否在“移动设备浏览器”上显示,当前标签下的模块对象list等属性)

	//*********************************************************************
	//
	// TabSettings Class
	//
	// Class that encapsulates the detailed settings for a specific Tab 
	// in the Portal
	//
	//*********************************************************************

	/// <summary>
	/// 导航标签设置信息(封装:标签索引,标签Id,标签名称,标签排序号,“移动设备浏览器”上显示的标签名称,可访问角色,是否在“移动设备浏览器”上显示,当前标签下的模块对象list等属性)
	/// </summary>
	public class TabSettings 
	{
                           
		public int          TabIndex;			//标签索引
		public int          TabId;				//标签Id
		public String       TabName;			//标签名称
		public int          TabOrder;			//标签排序号
		public String       MobileTabName;		//“移动设备浏览器”上显示的标签名称
		public String       AuthorizedRoles;	//可访问角色
		public bool         ShowMobile;			//是否在“移动设备浏览器”上显示
		public ArrayList    Modules = new ArrayList();	//当前标签下的模块对象list
	}

	#endregion

	#region ModuleSettings Class 模块设置信息类

	//*********************************************************************
	//
	// ModuleSettings Class
	//
	// Class that encapsulates the detailed settings for a specific Tab 
	// in the Portal.  ModuleSettings implements the IComparable interface 
	// so that an ArrayList of ModuleSettings objects may be sorted by
	// ModuleOrder, using the ArrayList's Sort() method.
	//
	//*********************************************************************

	/// <summary>
	/// 模块设置信息类
	/// </summary>
	public class ModuleSettings : IComparable 
	{

		public int          ModuleId;					//模块Id
		public int          ModuleDefId;				
		public int          TabId;						//隶属标签Id
		public int          CacheTime;					//缓存时间
		public int          ModuleOrder;				//模块序号
		public String       PaneName;					//显示在那个板块中(左中右)
		public String       ModuleTitle;				//模块标题
		public String       AuthorizedEditRoles;		//可编辑角色
		public bool         ShowMobile;					//是否在移动浏览器上显示
		public String       DesktopSrc;					//桌面源
		public String       MobileSrc;					//移动源


		/// <summary>
		/// 比较是否相等
		/// </summary>
		/// <param name="value"></param>
		/// <returns></returns>
		public int CompareTo(object value) 
		{

			if (value == null) return 1;

			int compareOrder = ((ModuleSettings)value).ModuleOrder;
            
			if (this.ModuleOrder == compareOrder) return 0;
			if (this.ModuleOrder < compareOrder) return -1;
			if (this.ModuleOrder > compareOrder) return 1;
			return 0;
		}
	}

	#endregion 

	
	#region 封装用户模块信息

	//*********************************************************************
	//
	// ModuleItem Class
	//
	// This class encapsulates the basic attributes of a Module, and is used
	// by the administration pages when manipulating modules.  ModuleItem implements 
	// the IComparable interface so that an ArrayList of ModuleItems may be sorted
	// by ModuleOrder, using the ArrayList's Sort() method.
	//
	//*********************************************************************

	public class ModuleItem : IComparable 
	{

		private int      _moduleOrder;
		private String   _title;
		private String   _pane;
		private int      _id;
		private int      _defId;

		/// <summary>
		/// 模块序号
		/// </summary>
		public int ModuleOrder 
		{

			get 
			{
				return _moduleOrder;
			}
			set 
			{
				_moduleOrder = value;
			}
		}    

		/// <summary>
		/// 模块标题
		/// </summary>
		public String ModuleTitle 
		{

			get 
			{
				return _title;
			}
			set 
			{
				_title = value;
			}
		}

		/// <summary>
		/// 所在板块
		/// </summary>
		public String PaneName 
		{

			get 
			{
				return _pane;
			}
			set 
			{
				_pane = value;
			}
		}
        
		/// <summary>
		/// 模块Id
		/// </summary>
		public int ModuleId 
		{

			get 
			{
				return _id;
			}
			set 
			{
				_id = value;
			}
		}  
  
		/// <summary>
		/// 模块所属的模板Id(用户控件)
		/// </summary>
		public int ModuleDefId 
		{

			get 
			{
				return _defId;
			}
			set 
			{
				_defId = value;
			}
		} 
   
		public int CompareTo(object value) 
		{

			if (value == null) return 1;

			int compareOrder = ((ModuleItem)value).ModuleOrder;
            
			if (this.ModuleOrder == compareOrder) return 0;
			if (this.ModuleOrder < compareOrder) return -1;
			if (this.ModuleOrder > compareOrder) return 1;
			return 0;
		}
	}

	#endregion

	#region 标签项目类封装标签项目属性
    
	//*********************************************************************
	//
	// TabItem Class
	//
	// This class encapsulates the basic attributes of a Tab, and is used
	// by the administration pages when manipulating tabs.  TabItem implements 
	// the IComparable interface so that an ArrayList of TabItems may be sorted
	// by TabOrder, using the ArrayList's Sort() method.
	//
	//*********************************************************************

	public class TabItem : IComparable 
	{

		private int      _tabOrder;
		private String   _name;
		private int      _id;

		/// <summary>
		/// 标签序号
		/// </summary>
		public int TabOrder 
		{

			get 
			{
				return _tabOrder;
			}
			set 
			{
				_tabOrder = value;
			}
		}    

		/// <summary>
		/// 标签名称
		/// </summary>
		public String TabName 
		{

			get 
			{
				return _name;
			}
			set 
			{
				_name = value;
			}
		}

		/// <summary>
		/// 标签Id
		/// </summary>
		public int TabId 
		{

			get 
			{
				return _id;
			}
			set 
			{
				_id = value;
			}
		}  
  
		//在对标签ArrayList排序时,为指定的比较项
		public int CompareTo(object value) 
		{

			if (value == null) return 1;

			int compareOrder = ((TabItem)value).TabOrder;
            
			if (this.TabOrder == compareOrder) return 0;
			if (this.TabOrder < compareOrder) return -1;
			if (this.TabOrder > compareOrder) return 1;
			return 0;
		}
	}

	#endregion
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -