diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index b2412e3..4b6f9c3 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -62 \ No newline at end of file +64 \ No newline at end of file diff --git a/Common/Config.cs b/Common/Config.cs index 2c3bac8..b5776d4 100644 --- a/Common/Config.cs +++ b/Common/Config.cs @@ -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) { diff --git a/IISMainHandler/TemplateEngine.cs b/IISMainHandler/TemplateEngine.cs index 16b9fb8..78b4202 100644 --- a/IISMainHandler/TemplateEngine.cs +++ b/IISMainHandler/TemplateEngine.cs @@ -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; } } diff --git a/IISMainHandler/WebContext.cs b/IISMainHandler/WebContext.cs index 4f75958..9d0aaea 100644 --- a/IISMainHandler/WebContext.cs +++ b/IISMainHandler/WebContext.cs @@ -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); } } diff --git a/IISMainHandler/designs/Classic.cs b/IISMainHandler/designs/Classic.cs index dd816e2..8ca9b5a 100644 --- a/IISMainHandler/designs/Classic.cs +++ b/IISMainHandler/designs/Classic.cs @@ -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"; + } + } } } diff --git a/IISMainHandler/designs/IDesign.cs b/IISMainHandler/designs/IDesign.cs index 6208892..b411e7f 100644 --- a/IISMainHandler/designs/IDesign.cs +++ b/IISMainHandler/designs/IDesign.cs @@ -5,5 +5,10 @@ using System.Text; namespace FLocal.IISHandler.designs { interface IDesign { + + string fsname { + get; + } + } } diff --git a/IISMainHandler/designs/Lite.cs b/IISMainHandler/designs/Lite.cs index 0c80463..85941f0 100644 --- a/IISMainHandler/designs/Lite.cs +++ b/IISMainHandler/designs/Lite.cs @@ -5,5 +5,10 @@ using System.Text; namespace FLocal.IISHandler.designs { class Lite : IDesign { + public string fsname { + get { + return "Lite"; + } + } } } diff --git a/build-all.bat b/build-all.bat new file mode 100644 index 0000000..2edf057 --- /dev/null +++ b/build-all.bat @@ -0,0 +1,4 @@ +@echo off +cd Builder +Builder IISMainHandler +move /Y IISMainHandler\product.msi ..\IISMainHandler.msi \ No newline at end of file diff --git a/templates/Full/boards.xml b/templates/Full/Boards.xslt similarity index 100% rename from templates/Full/boards.xml rename to templates/Full/Boards.xslt