diff --git a/Test.UI.sln b/Test.UI.sln
index 27f3d04..9e1e70f 100644
--- a/Test.UI.sln
+++ b/Test.UI.sln
@@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebWindowConfigurator", "We
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAedificaConfigurator", "WebAedificaConfigurator\WebAedificaConfigurator.csproj", "{BD1F43E8-BE5F-469E-9552-C98CA8639A06}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebWindowJWD", "WebWindowJWD\WebWindowJWD.csproj", "{D32E55D6-8C37-477F-8065-4020EB27900E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -33,6 +35,10 @@ Global
{BD1F43E8-BE5F-469E-9552-C98CA8639A06}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD1F43E8-BE5F-469E-9552-C98CA8639A06}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD1F43E8-BE5F-469E-9552-C98CA8639A06}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D32E55D6-8C37-477F-8065-4020EB27900E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D32E55D6-8C37-477F-8065-4020EB27900E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D32E55D6-8C37-477F-8065-4020EB27900E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D32E55D6-8C37-477F-8065-4020EB27900E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Test.UI/Components/Layout/NavMenu.razor b/Test.UI/Components/Layout/NavMenu.razor
index 55755b5..360a784 100644
--- a/Test.UI/Components/Layout/NavMenu.razor
+++ b/Test.UI/Components/Layout/NavMenu.razor
@@ -18,6 +18,11 @@
Test Compo + Serv
+
+
+ EditJWD
+
+
Aedifica
diff --git a/Test.UI/Components/Pages/EditJWD.razor b/Test.UI/Components/Pages/EditJWD.razor
new file mode 100644
index 0000000..c841d50
--- /dev/null
+++ b/Test.UI/Components/Pages/EditJWD.razor
@@ -0,0 +1,10 @@
+@page "/EditJWD"
+@rendermode InteractiveServer
+
+EditJWD
+
+
+
+
\ No newline at end of file
diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs
new file mode 100644
index 0000000..2e95766
--- /dev/null
+++ b/Test.UI/Components/Pages/EditJWD.razor.cs
@@ -0,0 +1,144 @@
+using EgwCoreLib.Lux.Core;
+using EgwCoreLib.Lux.Data.Services;
+using Microsoft.AspNetCore.Components;
+using Newtonsoft.Json;
+using System.Security.AccessControl;
+using WebWindowConfigurator;
+using WebWindowConfigurator.DTO;
+
+namespace Test.UI.Components.Pages
+{
+ public partial class EditJWD : IDisposable
+ {
+ #region Public Properties
+
+ public string InitialJwd = "";
+
+
+ #endregion Public Properties
+
+ #region Public Methods
+
+ public void Dispose()
+ {
+ DLService.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage;
+ }
+
+ #endregion Public Methods
+
+ #region Protected Fields
+
+ protected string currJwd = "";
+
+ #endregion Protected Fields
+
+ #region Protected Properties
+
+ [Inject]
+ protected IConfiguration Config { get; set; } = null!;
+
+ [Inject]
+ protected DataLayerServices DLService { get; set; } = null!;
+
+ [Inject]
+ protected ImageCacheService ICService { get; set; } = null!;
+
+ protected MarkupString JsonSer
+ {
+ get
+ {
+ string outVal = currJwd;
+ return (MarkupString)outVal.Replace(Environment.NewLine, "
").Replace(" ", " ");
+ }
+ }
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ protected override async Task OnInitializedAsync()
+ {
+ isLoading = true;
+ ConfInit();
+ InitialJwd = "{\r\n \"ProfilePath\": \"Profilo78\",\r\n \"AreaList\": [\r\n {\r\n \"Shape\": \"RECTANGLE\",\r\n \"DimensionList\": [\r\n {\r\n \"nIndex\": 1,\r\n \"sName\": \"Width\",\r\n \"dValue\": 1200.0\r\n },\r\n {\r\n \"nIndex\": 2,\r\n \"sName\": \"Height\",\r\n \"dValue\": 1500.0\r\n }\r\n ],\r\n \"JointList\": [\r\n {\r\n \"nIndex\": 1,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 2,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 3,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 4,\r\n \"JointType\": \"FULL_V\"\r\n }\r\n ],\r\n \"BottomRail\": false,\r\n \"BottomRailQty\": 0,\r\n \"AreaList\": [\r\n {\r\n \"bIsSashVertical\": true,\r\n \"SashList\": [\r\n {\r\n \"OpeningType\": \"TURNONLY_LEFT\",\r\n \"bHasHandle\": false,\r\n \"dDimension\": 50.0\r\n },\r\n {\r\n \"OpeningType\": \"TILTTURN_RIGHT\",\r\n \"bHasHandle\": true,\r\n \"dDimension\": 50.0\r\n }\r\n ],\r\n \"SashType\": \"NULL\",\r\n \"JointList\": [\r\n {\r\n \"nIndex\": 1,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 2,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 3,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 4,\r\n \"JointType\": \"FULL_V\"\r\n }\r\n ],\r\n \"Hardware\": \"000000\",\r\n \"AreaList\": [\r\n {\r\n \"AreaList\": [\r\n {\r\n \"FillType\": \"GLASS\",\r\n \"AreaList\": [],\r\n \"AreaType\": \"FILL\"\r\n }\r\n ],\r\n \"AreaType\": \"SPLITTED\"\r\n },\r\n {\r\n \"AreaList\": [\r\n {\r\n \"FillType\": \"GLASS\",\r\n \"AreaList\": [],\r\n \"AreaType\": \"FILL\"\r\n }\r\n ],\r\n \"AreaType\": \"SPLITTED\"\r\n }\r\n ],\r\n \"AreaType\": \"SASH\"\r\n }\r\n ],\r\n \"AreaType\": \"FRAME\"\r\n }\r\n ]\r\n}";
+ DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
+ await ReloadData();
+ }
+
+ private bool isLoading = false;
+
+ #endregion Protected Methods
+
+ #region Private Fields
+
+ private string apiUrl = "";
+ private string calcTag = "";
+ private string cFile = "Data/Setup.json";
+ private string currSvg = "";
+
+ private string imgBasePath = "";
+
+ private string imgTag = "";
+
+ private string subChannel = "";
+
+ #endregion Private Fields
+
+ #region Private Properties
+
+ private string windowUid = "CurrWindow";
+
+ #endregion Private Properties
+
+ #region Private Methods
+
+ private async void CalcDonePipe_EA_NewMessage(object? sender, EventArgs e)
+ {
+ // aggiorno visualizzazione
+ PubSubEventArgs currArgs = (PubSubEventArgs)e;
+ // conversione on-the-fly SVG da mostrare
+ if (!string.IsNullOrEmpty(currArgs.newMessage))
+ {
+ if (currArgs.msgUid.Equals($"{subChannel}:{windowUid}"))
+ {
+ currSvg = currArgs.newMessage;
+ }
+ await InvokeAsync(StateHasChanged);
+ }
+ await Task.Delay(1);
+ }
+
+ private void ConfInit()
+ {
+ apiUrl = Config.GetValue("ServerConf:Prog.ApiUrl") ?? "";
+ imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? "";
+ imgTag = Config.GetValue("ServerConf:ImageFileTag") ?? "";
+ calcTag = Config.GetValue("ServerConf:ImageCalcTag") ?? "";
+ subChannel = Config.GetValue("ServerConf:SvgChannel") ?? "";
+ }
+
+ ///
+ /// Rilettura dati
+ ///
+ ///
+ private async Task ReloadData()
+ {
+ //return base.OnInitializedAsync();
+ // brutale, da rivedere...
+ if (File.Exists(cFile))
+ {
+ //item.ImageUrl = ICService.ImageUrl($"{apiUrl}/{imgBasePath}", false, item.SVGFileName);
+ }
+ isLoading = false;
+ }
+
+ private async Task SaveJWD(string newSerial)
+ {
+ currJwd = newSerial;
+ // chiamo la chiamata POST alla API, che manda la richiesta via REDIS
+ await ICService.CallRestPost($"{apiUrl}/{imgBasePath}", $"{calcTag}/{windowUid}", currJwd);
+ }
+
+ #endregion Private Methods
+ }
+}
\ No newline at end of file
diff --git a/Test.UI/Components/Pages/Home.razor b/Test.UI/Components/Pages/Home.razor
index afd0cb3..1b7c608 100644
--- a/Test.UI/Components/Pages/Home.razor
+++ b/Test.UI/Components/Pages/Home.razor
@@ -10,10 +10,10 @@
else
{
+ LiveSVG="@currSvg">
}
diff --git a/Test.UI/Components/Pages/Home.razor.cs b/Test.UI/Components/Pages/Home.razor.cs
index 619d119..ad91dee 100644
--- a/Test.UI/Components/Pages/Home.razor.cs
+++ b/Test.UI/Components/Pages/Home.razor.cs
@@ -13,9 +13,7 @@ namespace Test.UI.Components.Pages
#region Public Properties
public Template SelTemplate { get; set; } = new Template(0, "---SELECT---", "", "");
- public string InitialJwd = "";
-
-
+
#endregion Public Properties
#region Public Methods
@@ -63,7 +61,6 @@ namespace Test.UI.Components.Pages
{
isLoading = true;
ConfInit();
- InitialJwd = "{\r\n \"ProfilePath\": \"Profilo78\",\r\n \"AreaList\": [\r\n {\r\n \"Shape\": \"RECTANGLE\",\r\n \"DimensionList\": [\r\n {\r\n \"nIndex\": 1,\r\n \"sName\": \"Width\",\r\n \"dValue\": 1200.0\r\n },\r\n {\r\n \"nIndex\": 2,\r\n \"sName\": \"Height\",\r\n \"dValue\": 1500.0\r\n }\r\n ],\r\n \"JointList\": [\r\n {\r\n \"nIndex\": 1,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 2,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 3,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 4,\r\n \"JointType\": \"FULL_V\"\r\n }\r\n ],\r\n \"BottomRail\": false,\r\n \"BottomRailQty\": 0,\r\n \"AreaList\": [\r\n {\r\n \"bIsSashVertical\": true,\r\n \"SashList\": [\r\n {\r\n \"OpeningType\": \"TURNONLY_LEFT\",\r\n \"bHasHandle\": false,\r\n \"dDimension\": 50.0\r\n },\r\n {\r\n \"OpeningType\": \"TILTTURN_RIGHT\",\r\n \"bHasHandle\": true,\r\n \"dDimension\": 50.0\r\n }\r\n ],\r\n \"SashType\": \"NULL\",\r\n \"JointList\": [\r\n {\r\n \"nIndex\": 1,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 2,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 3,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 4,\r\n \"JointType\": \"FULL_V\"\r\n }\r\n ],\r\n \"Hardware\": \"000000\",\r\n \"AreaList\": [\r\n {\r\n \"AreaList\": [\r\n {\r\n \"FillType\": \"GLASS\",\r\n \"AreaList\": [],\r\n \"AreaType\": \"FILL\"\r\n }\r\n ],\r\n \"AreaType\": \"SPLITTED\"\r\n },\r\n {\r\n \"AreaList\": [\r\n {\r\n \"FillType\": \"GLASS\",\r\n \"AreaList\": [],\r\n \"AreaType\": \"FILL\"\r\n }\r\n ],\r\n \"AreaType\": \"SPLITTED\"\r\n }\r\n ],\r\n \"AreaType\": \"SASH\"\r\n }\r\n ],\r\n \"AreaType\": \"FRAME\"\r\n }\r\n ]\r\n}";
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
await ReloadData();
}
diff --git a/Test.UI/Components/_Imports.razor b/Test.UI/Components/_Imports.razor
index 0fd4dac..20e61d8 100644
--- a/Test.UI/Components/_Imports.razor
+++ b/Test.UI/Components/_Imports.razor
@@ -10,4 +10,5 @@
@using Test.UI.Client
@using Test.UI.Components
@using WebWindowConfigurator
-@using WebAedificaConfigurator
\ No newline at end of file
+@using WebAedificaConfigurator
+@using WebWindowJWD
\ No newline at end of file
diff --git a/Test.UI/Test.UI.csproj b/Test.UI/Test.UI.csproj
index 3cc5853..fc7be05 100644
--- a/Test.UI/Test.UI.csproj
+++ b/Test.UI/Test.UI.csproj
@@ -28,6 +28,7 @@
+
diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj
index 7a4f679..a58c93b 100644
--- a/WebWindowConfigurator/WebWindowConfigurator.csproj
+++ b/WebWindowConfigurator/WebWindowConfigurator.csproj
@@ -4,7 +4,7 @@
net8.0
enable
enable
- 2.7.8.912
+ 2.7.8.1117
Annamaria Sassi
Egalware
Componente gestione JWD per LUX
@@ -53,6 +53,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WebWindowConfigurator/WebWindowMaker.razor b/WebWindowConfigurator/WebWindowMaker.razor
index f9acfcf..5c1c01a 100644
--- a/WebWindowConfigurator/WebWindowMaker.razor
+++ b/WebWindowConfigurator/WebWindowMaker.razor
@@ -1,141 +1,250 @@
- @if (string.IsNullOrEmpty(m_CurrJwd) && m_CurrWindow == null)
- {
-
-
-
- | # |
- Image |
- Description |
-
-
-
- @foreach (var item in IN_TemplateDTOList)
- {
- string colorClass = "";
- @if (SelTemplateDTO != null && item.Index == SelTemplateDTO.Index)
- colorClass = "table-success";
- else
- colorClass = "";
- DoSelect(item)">
- | @item.Index |
-  |
- @item.Description |
-
- }
-
-
- }
- else
- {
-