📄 scripthandler.cs
字号:
using System;
using System.Web;
using System.IO;
using System.Text;
using System.Collections;
using Lion.Data.Library.HtmlEditor;
using Lion.Data.Library.HtmlEditor.Core;
namespace Lion.Data.Library.HtmlEditor.Core
{
/// <summary>
/// ScriptHandler 的摘要说明。
/// </summary>
internal class ScriptHandler
{
#region Function Custom
internal static void ScriptContent(HttpContext context)
{
string Argument = context.Request.QueryString["configfile"];
string StyleName = Helper.Context.Server.UrlDecode(context.Request.QueryString["style"]);
string filename = null;
if(context.Request["filename"]==null)
throw new ArgumentNullException("filename");
else
filename = context.Request["filename"];
StringBuilder Sb = Helper.GetScript(filename.StartsWith("/")?filename:"/"+filename);
Hashtable hs = ((System.Collections.Hashtable)context.Application[Argument]);
System.Xml.XmlDocument doc = (System.Xml.XmlDocument)hs["Style"];
Sb.Replace("{configfile}",Argument);
Sb.Replace("{sStyleName}",StyleName);
Sb.Replace("{sButtonImgPath}",doc.SelectSingleNode("/Root/Style/S_Name[text()='"+ StyleName +"']").ParentNode.SelectSingleNode("S_ButtonImagesPath").InnerText);
context.Response.Expires=0;
context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
context.Response.ContentEncoding = Encoding.UTF8;
context.Response.ContentType="text/html";
context.Response.Clear();
context.Response.Write(Sb.ToString());
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -