From 764cc634f032b8cba59f35ff93f8b1e4e02611d7 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 21 Oct 2025 15:56:00 +0200 Subject: [PATCH] Bozza metodi x nuove richieste x engine --- WebWindowComplex/TableComp.razor.cs | 55 +++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index f4c3382..6c8478f 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -429,7 +429,7 @@ namespace WebWindowComplex } /// - /// Anteprima SVG + /// Richiesta update anteprima SVG /// /// protected async Task DoPreviewSvg() @@ -443,7 +443,6 @@ namespace WebWindowComplex #endif // verifico variazione JWD if (!prevJwd.Equals(CurrJwd)) - //if (!prevJwd.Equals(LiveData.CurrJwd) || !prevJwd.Equals(CurrJwd)) { prevJwd = CurrJwd; Dictionary Args = new Dictionary(); @@ -454,6 +453,58 @@ namespace WebWindowComplex } } + /// + /// Richiesta calcolo Options HW da JWD + /// + /// + protected async Task DoReqOptHardware() + { + if (m_CurrWindow != null) + { +#if DEBUG + var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented); +#else + var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize()); +#endif + // verifico variazione JWD + if (!prevJwd.Equals(CurrJwd)) + { + prevJwd = CurrJwd; + Dictionary Args = new Dictionary(); + Args.Add("Mode", $"{(int)Enums.QuestionModes.HARDWAREMODELLIST}"); + Args.Add("SubMode", $"{(int)Enums.QuestionSubModes.HARDWAREOPTIONS}"); + Args.Add("Jwd", CurrJwd); + await EC_OnUpdate.InvokeAsync(Args); + } + } + } + + /// + /// Richiesta Shape compatibile da JWD + /// + /// + protected async Task DoReqShape() + { + if (m_CurrWindow != null) + { +#if DEBUG + var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented); +#else + var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize()); +#endif + // verifico variazione JWD + if (!prevJwd.Equals(CurrJwd)) + { + prevJwd = CurrJwd; + Dictionary Args = new Dictionary(); + Args.Add("Mode", $"{(int)Enums.QuestionModes.HARDWAREMODELLIST}"); + Args.Add("SubMode", $"{(int)Enums.QuestionSubModes.LIST}"); + Args.Add("Jwd", CurrJwd); + await EC_OnUpdate.InvokeAsync(Args); + } + } + } + /// /// Metodo di reset dei dati a quelli del template ///