From 38ab3eee81cdeabb536f062dac7fc21047d580d1 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 22 Oct 2025 19:20:31 +0200 Subject: [PATCH] Ancora update x gestione ritorno dizionario forme validate --- Test.UI/Components/Pages/EditJWD.razor.cs | 25 +++++++++++++------ WebWindowComplex/TableComp.razor.cs | 4 +-- WebWindowComplex/WebWindowComplex.csproj | 2 ++ .../WebWindowConfigurator.csproj | 4 ++- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs index 1569213..d3d3379 100644 --- a/Test.UI/Components/Pages/EditJWD.razor.cs +++ b/Test.UI/Components/Pages/EditJWD.razor.cs @@ -48,6 +48,8 @@ namespace Test.UI.Components.Pages protected Dictionary m_CurrArgs = new Dictionary(); protected string prevJwd = ""; + protected Dictionary currGroupShape = new Dictionary(); + /// /// Configurazione elenchi anagrafiche /// @@ -143,7 +145,8 @@ namespace Test.UI.Components.Pages CurrData = new LivePayload() { CurrJwd = InitialJwd, - SvgPreview = currSvg + SvgPreview = currSvg, + DictShape = currGroupShape }; DLService.PipeSvg.EA_NewMessage += PipeSvg_EA_NewMessage; DLService.PipeShape.EA_NewMessage += PipeShape_EA_NewMessage; @@ -214,7 +217,7 @@ namespace Test.UI.Components.Pages calcTag = Config.GetValue("ServerConf:CalcTag") ?? ""; svgChannel = Config.GetValue("ServerConf:SvgChannel") ?? ""; shapeChannel = Config.GetValue("ServerConf:ShapeChannel") ?? ""; - + } private async Task ExecRequest(Dictionary CurrArgs) @@ -241,18 +244,26 @@ namespace Test.UI.Components.Pages } private async void PipeShape_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($"{shapeChannel}:{windowUid}")) + if (currArgs.msgUid.StartsWith($"{shapeChannel}:{windowUid}:")) { -#if false + int groupId = 0; // verifica del groupID... - CurrData.Shape = "Rectangle";// currArgs.newMessage; -#endif + int.TryParse(currArgs.msgUid.Replace($"{shapeChannel}:{windowUid}:", ""), out groupId); + if (currGroupShape.ContainsKey(groupId)) + { + currGroupShape[groupId] = currArgs.newMessage; + } + else + { + currGroupShape.Add(groupId, currArgs.newMessage); + } + CurrData.DictShape = currGroupShape; } await InvokeAsync(StateHasChanged); } diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index fb4b2b2..c745f40 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -582,9 +582,7 @@ namespace WebWindowComplex { CurrJwd = LiveData.CurrJwd, OptionsXml = LiveData.OptionsXml, -#if false - Shape = LiveData.Shape, -#endif + DictShape = LiveData.DictShape, SvgPreview = LiveData.SvgPreview }; m_SelSVG = LiveData.SvgPreview; diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index f36fcc3..ca37ebc 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -72,6 +72,8 @@ + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 18a7ee5..ba95b44 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.7.10.2216 + 2.7.10.2219 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -144,6 +144,8 @@ + +