📄 aspnetpager.cs
字号:
{
str = Unit.Percentage(100.0 - this.CustomInfoSectionWidth.Value).ToString();
writer.AddStyleAttribute(HtmlTextWriterStyle.Width, str);
}
writer.AddAttribute(HtmlTextWriterAttribute.Valign, "bottom");
}
writer.AddAttribute(HtmlTextWriterAttribute.Nowrap, "true");
}
private void WriteCssClass(HtmlTextWriter writer)
{
if ((this.cssClassName != null) && (this.cssClassName.Trim().Length > 0))
{
writer.AddAttribute(HtmlTextWriterAttribute.Class, this.cssClassName);
}
}
[Description("总是显示分页控件,即使要分页的数据只要一页"), Browsable(true), Category("Behavior"), DefaultValue(false)]
public bool AlwaysShow
{
get
{
object obj2 = this.ViewState["AlwaysShow"];
return ((obj2 != null) && ((bool) obj2));
}
set
{
this.ViewState["AlwaysShow"] = value;
}
}
[Category("图片按钮"), Browsable(true), Description("指定当使用图片按钮时,图片的对齐方式"), DefaultValue(3)]
public ImageAlign ButtonImageAlign
{
get
{
object obj2 = this.ViewState["ButtonImageAlign"];
if (obj2 != null)
{
return (ImageAlign) obj2;
}
return ImageAlign.Baseline;
}
set
{
this.ViewState["ButtonImageAlign"] = value;
}
}
[Category("图片按钮"), Browsable(true), Description("当使用图片按钮时,图片的类型,如gif或jpg,该值即图片文件的后缀名"), DefaultValue(".gif")]
public string ButtonImageExtension
{
get
{
object obj2 = this.ViewState["ButtonImageExtension"];
if (obj2 != null)
{
return (string) obj2;
}
return ".gif";
}
set
{
string str = value.Trim();
this.ViewState["ButtonImageExtension"] = str.StartsWith(".") ? str : ("." + str);
}
}
[Browsable(true), Category("图片按钮"), DefaultValue((string) null), Description("自定义图片文件名的后缀字符串(非文件后缀名),如图片“1f.gif”的ButtonImageNameExtension即为“f”")]
public string ButtonImageNameExtension
{
get
{
return (string) this.ViewState["ButtonImageNameExtension"];
}
set
{
this.ViewState["ButtonImageNameExtension"] = value;
}
}
[Description("是否将页索引数值按钮用中文数字一、二、三等代替"), DefaultValue(false), Category("导航按钮"), Browsable(true)]
public bool ChinesePageIndex
{
get
{
object obj2 = this.ViewState["ChinesePageIndex"];
return ((obj2 != null) && ((bool) obj2));
}
set
{
this.ViewState["ChinesePageIndex"] = value;
}
}
[Browsable(true), DefaultValue((string) null), Category("图片按钮"), Description("当前页索引按钮的图片名后缀字符串")]
public string CpiButtonImageNameExtension
{
get
{
object obj2 = this.ViewState["CpiButtonImageNameExtension"];
if (obj2 != null)
{
return (string) obj2;
}
return this.ButtonImageNameExtension;
}
set
{
this.ViewState["CpiButtonImageNameExtension"] = value;
}
}
[Browsable(true), Category("Appearance"), DefaultValue((string) null), Description("应用于控件的CSS类名")]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.CssClass = value;
this.cssClassName = value;
}
}
[Browsable(false), ReadOnly(true), Description("当前显示页的索引"), Category("分页"), DefaultValue(1), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public int CurrentPageIndex
{
get
{
object obj2 = this.ViewState["CurrentPageIndex"];
if ((this.Page != null) && (this.Page.Session != null))
{
string str = this.Page.GetType().Name + "_" + this.UniqueID + "_CurrentPageIndex";
if (this.Page.Session[str] != null)
{
obj2 = this.Page.Session[str];
}
}
int num = (obj2 == null) ? 1 : ((int) obj2);
if ((num > this.PageCount) && (this.PageCount > 0))
{
return this.PageCount;
}
if (num < 1)
{
return 1;
}
return num;
}
set
{
int pageCount = value;
if (pageCount < 1)
{
pageCount = 1;
}
else if (pageCount > this.PageCount)
{
pageCount = this.PageCount;
}
if ((this.Page != null) && (this.Page.Session != null))
{
string str = this.Page.GetType().Name + "_" + this.UniqueID + "_CurrentPageIndex";
this.Page.Session[str] = value;
}
else
{
this.ViewState["CurrentPageIndex"] = pageCount;
}
}
}
[Category("自定义信息区"), DefaultValue((string) null), Description("应用于用户自定义信息区的级联样式表类名"), Browsable(true)]
public string CustomInfoClass
{
get
{
object obj2 = this.ViewState["CustomInfoClass"];
if (obj2 != null)
{
return (string) obj2;
}
return this.CssClass;
}
set
{
this.ViewState["CustomInfoClass"] = value;
}
}
[Browsable(true), Category("自定义信息区"), Description("用户自定义信息区的宽度"), DefaultValue(typeof(Unit), "40%")]
public Unit CustomInfoSectionWidth
{
get
{
object obj2 = this.ViewState["CustomInfoSectionWidth"];
if (obj2 != null)
{
return (Unit) obj2;
}
return Unit.Percentage(40.0);
}
set
{
this.ViewState["CustomInfoSectionWidth"] = value;
}
}
[DefaultValue((string) null), Browsable(true), Description("应用于用户自定义信息区的CSS样式文本"), Category("自定义信息区")]
public string CustomInfoStyle
{
get
{
object obj2 = this.ViewState["CustomInfoStyle"];
if (obj2 != null)
{
return (string) obj2;
}
return this.GetStyleString();
}
set
{
this.ViewState["CustomInfoStyle"] = value;
}
}
[Browsable(true), DefaultValue((string) null), Description("要显示在用户自定义信息区的用户自定义信息文本"), Category("自定义信息区")]
public string CustomInfoText
{
get
{
return (string) this.ViewState["CustomInfoText"];
}
set
{
this.ViewState["CustomInfoText"] = value;
}
}
[Browsable(true), DefaultValue(1), Description("用户自定义信息区文本的对齐方式"), Category("自定义信息区")]
public HorizontalAlign CustomInfoTextAlign
{
get
{
object obj2 = this.ViewState["CustomInfoTextAlign"];
if (obj2 != null)
{
return (HorizontalAlign) obj2;
}
return HorizontalAlign.Left;
}
set
{
this.ViewState["CustomInfoTextAlign"] = value;
}
}
[Browsable(true), Description("已禁用的页导航按钮的图片名后缀字符串"), DefaultValue((string) null), Category("图片按钮")]
public string DisabledButtonImageNameExtension
{
get
{
object obj2 = this.ViewState["DisabledButtonImageNameExtension"];
if (obj2 != null)
{
return (string) obj2;
}
return this.ButtonImageNameExtension;
}
set
{
this.ViewState["DisabledButtonImageNameExtension"] = value;
}
}
[DefaultValue(true), Category("Behavior"), Browsable(false), Description("是否启用控件的视图状态,该属性的值必须为true,不允许用户设置。")]
public override bool EnableViewState
{
get
{
return base.EnableViewState;
}
set
{
base.EnableViewState = true;
}
}
[Description("第一页按钮上显示的文本"), Browsable(true), DefaultValue("<font face=\"webdings\">9</font>首页"), Category("导航按钮")]
public string FirstPageText
{
get
{
object obj2 = this.ViewState["FirstPageText"];
if (obj2 != null)
{
return (string) obj2;
}
return "首页";
}
set
{
this.ViewState["FirstPageText"] = value;
}
}
[DefaultValue((string) null), Browsable(true), Description("当使用图片按钮时,指定图片文件的路径"), Category("图片按钮")]
public string ImagePath
{
get
{
string relativeUrl = (string) this.ViewState["ImagePath"];
if (relativeUrl != null)
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -