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

📄 displaytitle.cs

📁 本系统是在asp版《在线文件管理器》的基础上设计制作
💻 CS
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Drawing;
using System.Collections;
using System.Collections.Specialized;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CommunityServer;
using CommunityServer.Components;
using System.ComponentModel;
using System.IO;

namespace CommunityServer.Controls
{

	// *********************************************************************
	//  DisplayTitle
	//
	/// <summary>
	/// This server control is used to display forums title, at the top any page.
	/// </summary>
	// ***********************************************************************/
	public class DisplayTitle : TemplatedWebControl {

		#region member varaibles
	    CSContext csContext = CSContext.Current;

		// *********************************************************************
		//  DisplayTitle
		//
		/// <summary>
		/// Constructor
		/// </summary>
		// ***********************************************************************/
		public DisplayTitle() : base() {

		}
		#endregion

		private string _selected = null;
		public string Selected
		{
			get
			{
				return _selected;
			}
			set
			{
				_selected= value;
			}
		}

		protected override void OnLoad(EventArgs e)
		{
			base.OnLoad (e);
			this.DataBind();
		}



		#region skin init
		/// <summary>
		/// Override this method to attach templated or external skin controls to local references.
		/// </summary>
		/// <remarks>
		/// This will only be called if the non-default skin is used.
		/// </remarks>
		protected override void AttachChildControls()
		{
			Label description;
			HyperLink siteName;
			HyperLink domainName;

			// show/hide the descriptiong based off admin option
			//
			description = (Label) FindControl("Description");
			if (description != null) {
				if (!CSContext.Current.SiteSettings.EnableForumDescription) {
					description.Visible = false;
				} else {
					description.Text = CSContext.Current.SiteSettings.SiteDescription;
					description.Visible = true;
				}
			}

			// link up the SiteName title
			//
			siteName = (HyperLink) FindControl("SiteName");
			if (siteName != null) {
				siteName.Text = CSContext.Current.SiteSettings.SiteName;
				siteName.ToolTip = CSContext.Current.SiteSettings.SiteDescription;
				siteName.NavigateUrl = Globals.GetSiteUrls().Home;
				siteName.Visible = true;
			}

			// link up the DomainName title
			//
			domainName = (HyperLink) FindControl("DomainName");
			if (domainName != null) {
				domainName.Text = CSContext.Current.SiteSettings.SiteDomain.ToLower();
				domainName.ToolTip = CSContext.Current.SiteSettings.SiteName;
				domainName.NavigateUrl = Globals.GetSiteUrls().ForumsHome;
				domainName.Visible = true;
			}
		}
		#endregion


		
	}
}

⌨️ 快捷键说明

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