📄 titleheader.cs
字号:
//------------------------------------------------------------------------------
// <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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -