📄 panel.cs
字号:
using System;
using System.ComponentModel;
namespace System.Web.UI.WebControls
{
/// <summary>
/// Summary description for Panel.
/// </summary>
public class Panel : WebControl
{
public Panel() : base(System.Web.UI.HtmlTextWriterTag.Div)
{
}
protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
{
string local0;
HorizontalAlign local1;
TypeConverter local2;
this.AddAttributesToRender(writer);
local0 = this.BackImageUrl;
if (local0.Length > 0)
writer.AddStyleAttribute(System.Web.UI.HtmlTextWriterStyle.BackgroundImage, "url(" + this.ResolveUrl(local0) + ")");
local1 = this.HorizontalAlign;
if (local1 != HorizontalAlign.NotSet)
{
local2 = System.ComponentModel.TypeDescriptor.GetConverter(typeof(HorizontalAlign));
writer.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Align, local2.ConvertToString(local1));
}
if (!(this.Wrap))
writer.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Nowrap, "nowrap");
}
public virtual string BackImageUrl
{
get
{
string local0;
local0 = (String) this.ViewState["BackImageUrl"];
if (local0 != null)
return local0;
return System.String.Empty;
}
set
{
this.ViewState["BackImageUrl"] = value;
}
}
public virtual HorizontalAlign HorizontalAlign
{
get
{
object local0;
local0 = this.ViewState["HorizontalAlign"];
if (local0 != null)
return (HorizontalAlign) local0;
return 0;
}
set
{
if ((int)value < 0 || (int)value > 4)
throw new ArgumentOutOfRangeException("value");
this.ViewState["HorizontalAlign"] = value;
}
}
public virtual bool Wrap
{
get
{
object local0;
local0 = this.ViewState["Wrap"];
if (local0 != null)
return (bool) local0;
return true;
}
set
{
this.ViewState["Wrap"] = value;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -