📄 templatemanageguide.aspx.cs
字号:
namespace PowerEasy.WebSite.Admin.Template
{
using PowerEasy.Components;
using PowerEasy.Controls;
using PowerEasy.Web.UI;
using System;
using System.IO;
using System.Web.UI.WebControls;
public class TemplateManageGuide : AdminPage
{
protected DropDownList DropSearch;
protected DropDownList DropSearchFile;
protected FileTreeView TrvTemplateDir;
protected TextBox TxtSearch;
private void DrpFilePath(ListControl dropName)
{
string templateDir = SiteConfig.SiteOption.TemplateDir;
if (!string.IsNullOrEmpty(templateDir))
{
DirectoryInfo info = new DirectoryInfo(base.Request.PhysicalApplicationPath + templateDir);
if (info.Exists)
{
foreach (DirectoryInfo info2 in info.GetDirectories("*", SearchOption.AllDirectories))
{
if (!info2.FullName.Contains("标签库") && !info2.FullName.Contains("分页标签库"))
{
string text = (info2.FullName.Remove(0, info.FullName.Length) + "/").Replace(@"\", "/");
dropName.Items.Add(new ListItem(text, text));
}
}
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!this.Page.IsPostBack)
{
this.TrvTemplateDir.FileDirectory = SiteConfig.SiteOption.TemplateDir;
string templateDir = SiteConfig.SiteOption.TemplateDir;
int startIndex = templateDir.LastIndexOf("/") + 1;
string str2 = "";
if (startIndex >= 0)
{
str2 = templateDir.Substring(startIndex, templateDir.Length - startIndex);
}
else
{
str2 = templateDir;
}
this.TrvTemplateDir.RootNodeName = str2;
this.DrpFilePath(this.DropSearchFile);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -