📄 titletype.cs
字号:
namespace PowerEasy.WebSite.Controls.FieldControl
{
using PowerEasy.Common;
using PowerEasy.Components;
using PowerEasy.Controls;
using System;
using System.Text;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
public class TitleType : BaseFieldControl
{
protected Literal LitCheckTitle;
protected PowerEasy.Controls.RequiredFieldValidator ReqTxtTitle;
protected HtmlTableRow Tab;
protected TextBox TxtTitle;
protected void Page_Load(object sender, EventArgs e)
{
string basePath = "";
basePath = base.BasePath;
basePath = (this.Page.Request.Url.Scheme + "://" + this.Page.Request.Url.Authority + basePath) + SiteConfig.SiteOption.ManageDir;
this.TxtTitle.MaxLength = DataConverter.CLng(base.Settings[0]);
this.TxtTitle.Columns = DataConverter.CLng(base.Settings[1]);
if (base.IsAdminManage && DataConverter.CBool(base.Settings[2]))
{
this.LitCheckTitle.Visible = true;
this.LitCheckTitle.Text = "<input type=\"button\" onclick=\"ShowCheckTitleMessage()\" value=\"检查是否具有重复\" />";
StringBuilder builder = new StringBuilder();
builder.Append("<script type=\"text/javascript\">\n");
builder.Append("<!--\n");
builder.Append(" function ShowCheckTitleMessage(){\n");
builder.Append(" var urlstr= '" + basePath + "/Accessories/ShowCheckTitleMessage.aspx?NodeId='+document.getElementById(nodeIdClientId).value+'&Title='+escape(document.getElementById(\"" + this.TxtTitle.ClientID + "\").value);\n");
builder.Append(" var isMSIE= (navigator.appName == \"Microsoft Internet Explorer\");\n");
builder.Append(" if (isMSIE){\n");
builder.Append(" var arr= window.showModalDialog(urlstr,'self,width=200,height=150,resizable=yes,scrollbars=yes');\n");
builder.Append(" }else{\n");
builder.Append(" var arr= window.open(urlstr,'newWin','modal=yes,width=400,height=300,resizable=yes,scrollbars=yes'); \n");
builder.Append(" }\n");
builder.Append(" }\n");
builder.Append(" //-->\n");
builder.Append("</script>\n");
if (!this.Page.ClientScript.IsClientScriptBlockRegistered("ShowCheckTitleMessage()"))
{
this.Page.ClientScript.RegisterClientScriptBlock(base.GetType(), "ShowCheckTitleMessage()", builder.ToString());
}
}
if (base.EnableNull)
{
this.ReqTxtTitle.Visible = true;
}
if (!base.IsPostBack)
{
this.TxtTitle.Text = this.FieldValue;
}
else
{
this.FieldValue = this.TxtTitle.Text;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -