📄 thememodule.cs
字号:
using System;
using System.Web;
using System.Web.UI;
namespace Wrox.Web.GlobalEvents
{
public class ThemeModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.PreRequestHandlerExecute += new EventHandler(this.app_PreRequestHandlerExecute);
}
private void app_PreRequestHandlerExecute(object Sender, EventArgs E)
{
Page p = HttpContext.Current.Handler as Page;
if (p != null)
{
ProfileCommon pb = (ProfileCommon)HttpContext.Current.Profile;
p.Theme = pb.Theme;
}
}
public void Dispose()
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -