Bug in template name fixed; build-all script initial commit; designs support initial commit

main
Inga 🏳‍🌈 14 years ago
parent 473c0ebfbf
commit 9fd45c094d
  1. 2
      Builder/IISMainHandler/build.txt
  2. 3
      Common/Config.cs
  3. 2
      IISMainHandler/TemplateEngine.cs
  4. 4
      IISMainHandler/WebContext.cs
  5. 7
      IISMainHandler/designs/Classic.cs
  6. 5
      IISMainHandler/designs/IDesign.cs
  7. 5
      IISMainHandler/designs/Lite.cs
  8. 4
      build-all.bat
  9. 0
      templates/Full/Boards.xslt

@ -14,10 +14,13 @@ namespace FLocal.Common {
public readonly string dataDir;
public readonly string DirSeparator;
protected Config(NameValueCollection data) : base(data) {
this.InitTime = DateTime.Now.ToLongTimeString();
this.mainConnection = new MySQLConnector.Connection(data["ConnectionString"]);
this.dataDir = data["DataDir"];
this.DirSeparator = System.IO.Path.DirectorySeparatorChar.ToString();
}
public static void Init(NameValueCollection data) {

@ -22,7 +22,7 @@ namespace FLocal.IISHandler {
lock(this.locker) {
if(!this.cache.ContainsKey(templateName)) {
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load(FLocal.Common.Config.instance.dataDir + templateName);
xslt.Load(FLocal.Common.Config.instance.dataDir + "Templates" + FLocal.Common.Config.instance.DirSeparator + templateName);
this.cache[templateName] = xslt;
}
}

@ -23,7 +23,7 @@ namespace FLocal.IISHandler {
public designs.IDesign design {
get {
throw new NotImplementedException();
return new designs.Classic();
}
}
@ -39,7 +39,7 @@ namespace FLocal.IISHandler {
public string Transform(string templateName, System.Xml.Linq.XDocument data) {
//TODO: this should work according to design!
return TemplateEngine.Compile(templateName, data);
return TemplateEngine.Compile(this.design.fsname + this.config.DirSeparator + templateName, data);
}
}

@ -4,6 +4,11 @@ using System.Linq;
using System.Text;
namespace FLocal.IISHandler.designs {
class Classic : IDesign {
class Classic : IDesign {
public string fsname {
get {
return "Full";
}
}
}
}

@ -5,5 +5,10 @@ using System.Text;
namespace FLocal.IISHandler.designs {
interface IDesign {
string fsname {
get;
}
}
}

@ -5,5 +5,10 @@ using System.Text;
namespace FLocal.IISHandler.designs {
class Lite : IDesign {
public string fsname {
get {
return "Lite";
}
}
}
}

@ -0,0 +1,4 @@
@echo off
cd Builder
Builder IISMainHandler
move /Y IISMainHandler\product.msi ..\IISMainHandler.msi
Loading…
Cancel
Save