示例#1
0
 private void btnCreate_Click(object sender, EventArgs e)
 {
     string namespaces = "System.Data,Discuz.Common,Discuz.Forum,Discuz.Entity";
     NewTemplate nt = new NewTemplate("Discuz.Web", namespaces);
     nt.Productname = "Discuz!NT 2.5 (.net Framework 2.x/3.x)";
     nt.Productversion = "2.5.0";
     nt.CreateFromFolder(tbxTemplateFolder.Text, tbxPagefileFolder.Text);
     MessageBox.Show("完成!");
 }
示例#2
0
 private void CreateTemplate(List<KeyValuePair<string, string>> templateFileList)
 {
     NewTemplate ntp = new NewTemplate("LiteCMS.Web", "");
     ntp.Productname = "LiteCMS";
     ntp.Productversion = Config.Versions.GetProductVersionFromAssembly();
     ntp.CreateFromFileList(templateFileList);
     //if (folder.Length > 0)
     //{
     //    ntp.CreateFromFolder(Server.MapPath(string.Format("~/templates/{0}/{1}/", MainConfigs.Load().Templatefolder, folder)), Server.MapPath(string.Format("~/{0}/", folder)));
     //}
     //else
     //{
     //}
 }