titleheader.cs

来自「本系统是在asp版《在线文件管理器》的基础上设计制作」· CS 代码 · 共 65 行

CS
65
字号
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Web.UI.WebControls;
using CommunityServer.Components;

namespace CommunityServer.Controls
{
	/// <summary>
	/// Summary description for TitleHeader.
	/// </summary>
	public class TitleHeader : TemplatedWebControl
	{
        private Label _mainTitle = null;
        private Label _subTitle = null;

		public TitleHeader()
		{
		
		}

        protected override void AttachChildControls()
        {
            _mainTitle = FindControl("MainTitle") as Label;
            _subTitle = FindControl("SubTitle") as Label;
        }

        protected override void OnPreRender(EventArgs e)
        {
            if(_mainTitle != null)
                _mainTitle.Text = ResourceManager.GetString(Title);

            if(_subTitle != null)
                _subTitle.Text = ResourceManager.GetString(SubTitle);

            base.OnPreRender (e);
        }


        public string Title
        {
            get
            { return ViewState["Title"] as string; }
            set
            {  ViewState["Title"] = value; }
        }

        /// <summary>
        /// Property SubTitle (string)
        /// </summary>
        public string SubTitle
        {
            get
            { return ViewState["SubTitle"] as string; }
            set
            {  ViewState["SubTitle"] = value; }
        }

	}
}

⌨️ 快捷键说明

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