diff --git a/Test.UI.sln b/Test.UI.sln
index 8d1b4d6..7ee1446 100644
--- a/Test.UI.sln
+++ b/Test.UI.sln
@@ -7,7 +7,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.UI", "Test.UI\Test.UI.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.UI.Client", "Test.UI.Client\Test.UI.Client.csproj", "{11C69377-47CD-4A5F-82A5-34D9A246C2DC}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebWindowConfigurator", ".\WebWindowConfigurator\WebWindowConfigurator.csproj", "{C7BED1A5-5B6B-4B3C-8802-D913A026D1E2}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebWindowConfigurator", "WebWindowConfigurator\WebWindowConfigurator.csproj", "{C7BED1A5-5B6B-4B3C-8802-D913A026D1E2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/Test.UI/Components/Layout/NavMenu.razor b/Test.UI/Components/Layout/NavMenu.razor
index 3cc2e2d..fae7297 100644
--- a/Test.UI/Components/Layout/NavMenu.razor
+++ b/Test.UI/Components/Layout/NavMenu.razor
@@ -13,13 +13,16 @@
Home
-
+
+
+ Test Component
+
+
Counter
-
Weather
diff --git a/Test.UI/Components/Pages/TestComponent.razor b/Test.UI/Components/Pages/TestComponent.razor
new file mode 100644
index 0000000..c133321
--- /dev/null
+++ b/Test.UI/Components/Pages/TestComponent.razor
@@ -0,0 +1,12 @@
+@page "/TestComponent"
+@rendermode InteractiveServer
+
+TestComponent
+
+
+
+
+
diff --git a/Test.UI/Components/Pages/TestComponent.razor.cs b/Test.UI/Components/Pages/TestComponent.razor.cs
new file mode 100644
index 0000000..433883a
--- /dev/null
+++ b/Test.UI/Components/Pages/TestComponent.razor.cs
@@ -0,0 +1,108 @@
+using EgwCoreLib.Lux.Data.Services;
+using Microsoft.AspNetCore.Components;
+using Newtonsoft.Json;
+using NLog;
+using WebWindowConfigurator;
+using WebWindowConfigurator.DTO;
+
+namespace Test.UI.Components.Pages
+{
+ public partial class TestComponent
+ {
+ #region Public Properties
+
+ public Template SelTemplate { get; set; } = new Template(0, "---SELECT---", "", "");
+
+ #endregion Public Properties
+
+ #region Protected Fields
+
+ protected string currJwd = "...";
+
+ #endregion Protected Fields
+
+ #region Protected Properties
+
+ protected List AvailTemplateList { get; set; } = new List();
+
+ protected MarkupString JsonSer
+ {
+ get => (MarkupString)currJwd.Replace(Environment.NewLine, "
").Replace(" ", " ");
+ }
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ protected override async Task OnInitializedAsync()
+ {
+ ConfInit();
+ await ReloadData();
+ }
+
+ [Inject]
+ protected IConfiguration Config { get; set; } = null!;
+
+ private string imgBasePath = "";
+ private string imgTag = "";
+ private void ConfInit()
+ {
+ imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? "";
+ imgTag = Config.GetValue("ServerConf:ImageFileTag") ?? "";
+ }
+
+ ///
+ /// Rilettura dati
+ ///
+ ///
+ private async Task ReloadData()
+ {
+ //return base.OnInitializedAsync();
+ AvailTemplateList = new List();
+ await Task.Delay(100);
+ // brutale, da rivedere...
+ if (File.Exists(cFile))
+ {
+ string rawVal = File.ReadAllText(cFile);
+ var rawList = JsonConvert.DeserializeObject>(rawVal) ?? new List();
+
+ // calcolo URL immagini... DTO da rivedere...
+ foreach (var item in rawList)
+ {
+ item.ImageUrl = $"{imgBasePath}{imgTag}/{item.SVGFileName}";
+ AvailTemplateList.Add(item);
+ }
+ }
+ }
+
+
+
+ #endregion Protected Methods
+
+ #region Private Fields
+
+ private string cFile = "Data/Setup.json";
+
+ #endregion Private Fields
+
+ #region Private Methods
+
+ private void SaveJWD(string newSerial)
+ {
+ currJwd = newSerial;
+ }
+
+ private void SetTemplate(TemplateSelectDTO selTemp)
+ {
+ string rawVal = "";
+ // brutale,d a rivedere...
+ if (File.Exists(selTemp.JwdFileName))
+ {
+ rawVal = File.ReadAllText(selTemp.JwdFileName);
+ }
+ SelTemplate = new Template(selTemp.Index, selTemp.Description, selTemp.SVGFileName, rawVal);
+ }
+
+ #endregion Private Methods
+ }
+}
\ No newline at end of file
diff --git a/Test.UI/Data/Setup.json b/Test.UI/Data/Setup.json
index ec98f9c..d7dec6f 100644
--- a/Test.UI/Data/Setup.json
+++ b/Test.UI/Data/Setup.json
@@ -2,31 +2,31 @@
{
"Index": 1,
"Description": "Anta singola",
- "SVGFileName": "Images/ImgRouter/Singola.svg",
+ "SVGFileName": "AntaDoppia.svg",
"JwdFileName": "Data/AntaSingola.jwd"
},
{
"Index": 2,
"Description": "Anta doppia",
- "SVGFileName": "Images/ImgRouter/Doppia.svg",
+ "SVGFileName": "AntaDoppia.svg",
"JwdFileName": "Data/AntaDoppia.jwd"
},
{
"Index": 3,
"Description": "Finestra con split verticale",
- "SVGFileName": "",
+ "SVGFileName": "FinestraSplitVert.svg",
"JwdFileName": "Data/FinestraSplitVert.jwd"
},
{
"Index": 4,
"Description": "Finestra con split verticale e orizzontale",
- "SVGFileName": "",
+ "SVGFileName": "FinestraSplitVertOriz.svg",
"JwdFileName": "Data/FinestraSplitVertOriz.jwd"
},
{
"Index": 5,
"Description": "Finestra con split orizzontale (sopra due ante e sotto vetro fisso)",
- "SVGFileName": "",
+ "SVGFileName": "FinDueAnteBottomFisso.svg",
"JwdFileName": "Data/FinDueAnteBottomFisso.jwd"
}
diff --git a/Test.UI/Test.UI.csproj b/Test.UI/Test.UI.csproj
index 720545b..f9dbb7d 100644
--- a/Test.UI/Test.UI.csproj
+++ b/Test.UI/Test.UI.csproj
@@ -25,6 +25,10 @@
+
+
+
+
diff --git a/Test.UI/appsettings.json b/Test.UI/appsettings.json
index 10f68b8..5563da5 100644
--- a/Test.UI/appsettings.json
+++ b/Test.UI/appsettings.json
@@ -5,5 +5,12 @@
"Microsoft.AspNetCore": "Warning"
}
},
- "AllowedHosts": "*"
+ "AllowedHosts": "*",
+ "ServerConf": {
+ "PubChannel": "EgwEngineInput",
+ "SubChannel": "EgwEngineOutput",
+ "ImageBaseUrl": "https://iis01.egalware.com/lux/srv/api/window/",
+ "ImageLiveTag": "svg",
+ "ImageFileTag": "svgfile"
+ }
}
diff --git a/WebWindowConfigurator/DTO/TemplateSelectorDTO.cs b/WebWindowConfigurator/DTO/TemplateSelectorDTO.cs
index 98d44ea..f58a0b9 100644
--- a/WebWindowConfigurator/DTO/TemplateSelectorDTO.cs
+++ b/WebWindowConfigurator/DTO/TemplateSelectorDTO.cs
@@ -12,5 +12,6 @@ namespace WebWindowConfigurator.DTO
public string Description { get; set; } = "";
public string JwdFileName { get; set; } = "";
public string SVGFileName { get; set; } = "";
+ public string ImageUrl { get; set; } = "";
}
}
diff --git a/WebWindowConfigurator/WebWindowMaker.razor b/WebWindowConfigurator/WebWindowMaker.razor
index b8d6c07..33e8f42 100644
--- a/WebWindowConfigurator/WebWindowMaker.razor
+++ b/WebWindowConfigurator/WebWindowMaker.razor
@@ -76,7 +76,7 @@
colorClass = "";
DoSelect(item)">
| @item.Index |
-  |
+  |
@item.Description |
}