diff --git a/EgwCoreLib.Lux.Core/DictUtils.cs b/EgwCoreLib.Lux.Core/DictUtils.cs
new file mode 100644
index 00000000..ec4af79e
--- /dev/null
+++ b/EgwCoreLib.Lux.Core/DictUtils.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace EgwCoreLib.Lux.Core
+{
+ public class DictUtils
+ {
+ #region Public Methods
+
+ ///
+ /// Comparatore equality obj dizionario
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static bool DictAreEqual(Dictionary dict1, Dictionary dict2)
+ {
+ // Handle null cases
+ if (dict1 == null || dict2 == null)
+ return dict1 == dict2;
+
+ // Quick size check
+ if (dict1.Count != dict2.Count)
+ return false;
+
+ // Compare each key-value pair
+ foreach (var kvp in dict1)
+ {
+ if (!dict2.TryGetValue(kvp.Key, out TValue value))
+ return false; // Key missing in dict2
+
+ if (!EqualityComparer.Default.Equals(kvp.Value, value))
+ return false; // Value mismatch
+ }
+
+ return true;
+ }
+
+ #endregion Public Methods
+ }
+}
\ No newline at end of file
diff --git a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj
index cf161881..fdc9023c 100644
--- a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj
+++ b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj
@@ -21,8 +21,9 @@
-
-
+
+
+
diff --git a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj
index 74a1610f..60fe44c1 100644
--- a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj
+++ b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj
@@ -27,16 +27,16 @@
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/EgwCoreLib.Lux.Data/Services/BaseServ.cs b/EgwCoreLib.Lux.Data/Services/BaseServ.cs
index ae8c8181..8abd2e9e 100644
--- a/EgwCoreLib.Lux.Data/Services/BaseServ.cs
+++ b/EgwCoreLib.Lux.Data/Services/BaseServ.cs
@@ -14,12 +14,12 @@ using System.Threading.Tasks;
namespace EgwCoreLib.Lux.Data.Services
{
///
- /// Classe base per i servizi che fornisce funzionalità comuni come
+ /// Classe base per i servizi che fornisce funzionalità comuni come
/// - connessione a Redis
/// - configurazione
- /// - gestione dei messaggi
- /// - strategie di caching.
- ///
+ /// - gestione dei messaggi
+ /// - strategie di caching.
+ ///
/// Questa classe agisce come modello per altri servizi derivati.
///
public class BaseServ
@@ -41,7 +41,10 @@ namespace EgwCoreLib.Lux.Data.Services
// channel name setup
svgChannel = _config.GetValue("ServerConf:SvgChannel") ?? "Egw:svg:img";
bomChannel = _config.GetValue("ServerConf:BomChannel") ?? "Egw:bom";
- updateChannel = _config.GetValue("ServerConf:UpdateChannel") ?? "Egw-update";
+ updateChannel = _config.GetValue("ServerConf:UpdateChannel") ?? "Egw:update";
+ shapeChannel = _config.GetValue("ServerConf:ShapeChannel") ?? "Egw:shape:curr";
+ hwOptChannel = _config.GetValue("ServerConf:HwOptChannel") ?? "Egw:hw:opt";
+ profListChannel = _config.GetValue("ServerConf:ProfListChannel") ?? "Egw:prof:list";
// Appends ":*" to the channels to enable wildcard subscription for dynamic events
if (!svgChannel.EndsWith(":*"))
{
@@ -55,6 +58,18 @@ namespace EgwCoreLib.Lux.Data.Services
{
updateChannel += ":*";
}
+ if (!shapeChannel.EndsWith(":*"))
+ {
+ shapeChannel += ":*";
+ }
+ if (!hwOptChannel.EndsWith(":*"))
+ {
+ hwOptChannel += ":*";
+ }
+ if (!profListChannel.EndsWith(":*"))
+ {
+ profListChannel += ":*";
+ }
// Configurazione serializzatore JSON per risolvere errore di loop circolare
JSSettings = new JsonSerializerSettings()
@@ -63,9 +78,12 @@ namespace EgwCoreLib.Lux.Data.Services
};
// Configurazione pipe dei messaggi
- CalcDonePipe = new MessagePipe(redisConn, svgChannel);
- BomPipe = new MessagePipe(RedisConn, bomChannel);
- UpdatePipe = new MessagePipe(RedisConn, updateChannel);
+ PipeSvg = new MessagePipe(redisConn, svgChannel);
+ PipeBom = new MessagePipe(RedisConn, bomChannel);
+ PipeUpdate = new MessagePipe(RedisConn, updateChannel);
+ PipeShape = new MessagePipe(RedisConn, shapeChannel);
+ PipeHwOpt = new MessagePipe(RedisConn, hwOptChannel);
+ PipeProfList = new MessagePipe(RedisConn, profListChannel);
}
#endregion Public Constructors
@@ -75,18 +93,36 @@ namespace EgwCoreLib.Lux.Data.Services
///
/// Pipe dei messaggi per la comunicazione riguardo update calcolo BOM
///
- public MessagePipe BomPipe { get; set; } = null!;
+ public MessagePipe PipeBom { get; set; } = null!;
///
- /// Pipe dei messaggi per la comunicazione tra servizi di calcolo e interfaccia utente.
- /// I messaggi vengono inviati sul canale Redis definito da svgChannel.
+ /// Pipe dei messaggi per ritorno HwOptions calcolate da Engine di calcolo verso interfaccia utente.
+ /// I messaggi vengono inviati sul canale Redis definito da HwOptChannel.
///
- public MessagePipe CalcDonePipe { get; set; } = null!;
+ public MessagePipe PipeHwOpt { get; set; } = null!;
+
+ ///
+ /// Pipe dei messaggi per ritorno ProfileList calcolate da Engine di calcolo verso interfaccia utente.
+ /// I messaggi vengono inviati sul canale Redis definito da ProfListChannel.
+ ///
+ public MessagePipe PipeProfList { get; set; } = null!;
+
+ ///
+ /// Pipe dei messaggi per ritorno Shape calcolate da Engine di calcolo verso interfaccia utente.
+ /// I messaggi vengono inviati sul canale Redis definito da ShapeChannel.
+ ///
+ public MessagePipe PipeShape { get; set; } = null!;
+
+ ///
+ /// Pipe dei messaggi per ritorno SVG calcolati da Engine di calcolo verso interfaccia utente.
+ /// I messaggi vengono inviati sul canale Redis definito da SvgChannel.
+ ///
+ public MessagePipe PipeSvg { get; set; } = null!;
///
/// Pipe dei messaggi per la comunicazione riguardo update generico UI
///
- public MessagePipe UpdatePipe { get; set; } = null!;
+ public MessagePipe PipeUpdate { get; set; } = null!;
#endregion Public Properties
@@ -178,12 +214,27 @@ namespace EgwCoreLib.Lux.Data.Services
///
private int cacheTtlShort = 60 * 1;
+ ///
+ /// Canale ritorno Hw Options
+ ///
+ private string hwOptChannel = "";
+
+ ///
+ /// Canale ritorno Profile List
+ ///
+ private string profListChannel = "";
+
///
/// Generatore di numeri casuali utilizzato per introdurre variabilità dinamica nelle durate della cache
/// (simula variazioni reali nella freschezza dei dati e nei tempi di scadenza).
///
private Random rnd = new Random();
+ ///
+ /// Canale ritorno shape calcolate
+ ///
+ private string shapeChannel = "";
+
///
/// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi relativi a img svg.
/// Predefinito a "svg:img" con suffisso ":*".
diff --git a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs
index 20f1c660..4faf8724 100644
--- a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs
+++ b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs
@@ -273,6 +273,9 @@ namespace EgwCoreLib.Lux.Data.Services
private readonly string liveTag = "svg";
private readonly string svgChannel = "svg:img";
+ private readonly string shapeChannel = "shape:curr";
+ private readonly string hwOptChannel = "hw:opt";
+ private readonly string profListChannel = "prof:list";
private IConfiguration _config;
diff --git a/Lux.API/Controllers/GenericController.cs b/Lux.API/Controllers/GenericController.cs
index ebc1affd..048c9b62 100644
--- a/Lux.API/Controllers/GenericController.cs
+++ b/Lux.API/Controllers/GenericController.cs
@@ -50,7 +50,7 @@ namespace Lux.API.Controllers
}
if (!DictExec.ContainsKey("SubMode"))
{
- DictExec.Add("SubMode", $"{(int)Enums.QuestionSubModes.NULL}");
+ DictExec.Add("SubMode", $"{(int)Enums.QuestionConfSubModes.NULL}");
}
if (!DictExec.ContainsKey("UID"))
{
diff --git a/Lux.API/Controllers/WindowController.cs b/Lux.API/Controllers/WindowController.cs
index 52524bf5..a076ceb5 100644
--- a/Lux.API/Controllers/WindowController.cs
+++ b/Lux.API/Controllers/WindowController.cs
@@ -103,10 +103,10 @@ namespace Lux.API.Controllers
private async Task sendHwReq()
{
Dictionary DictExec = new Dictionary();
- DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.HARDWAREMODELLIST}");
+ DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.HARDWARE}");
// da rivedere?
DictExec.Add("UID", "HW.AGB");
- DictExec.Add("SubMode", $"{(int)Egw.Window.Data.Enums.QuestionSubModes.LIST}");
+ DictExec.Add("SubMode", $"{(int)Egw.Window.Data.Enums.QuestionHwSubModes.LIST}");
DictExec.Add("Manufacturer", $"{(int)Egw.Window.Data.Enums.HardwareManufacturers.AGB}");
int nId = 1;
// da modificare con tipo richiesta...
diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj
index 3d94128d..823f6426 100644
--- a/Lux.API/Lux.API.csproj
+++ b/Lux.API/Lux.API.csproj
@@ -4,7 +4,7 @@
net8.0
enable
enable
- 0.9.2510.2115
+ 0.9.2510.2119
diff --git a/Lux.API/Services/ExternalMessageProcessor.cs b/Lux.API/Services/ExternalMessageProcessor.cs
index dd41589f..9c856bc4 100644
--- a/Lux.API/Services/ExternalMessageProcessor.cs
+++ b/Lux.API/Services/ExternalMessageProcessor.cs
@@ -43,6 +43,11 @@ namespace Lux.API.Services
{
if (retData.Args != null && retData.Args.Count > 0)
{
+ /*------------------------------------------
+ * Richieste "continue" di stato/update *
+ * ----------------------------------------*/
+
+ // gestione ritorno preview SVG
if (retData.Args.ContainsKey("Svg"))
{
// dovrei leggere dagli args l'IUID dell'SVG ritornato...
@@ -51,6 +56,8 @@ namespace Lux.API.Services
string UID = retData.Args["UID"];
await cacheService.SaveSvgAsync(UID, retData.ExecEnvironment, newSvg);
}
+
+ // gesitone ritorno BOM
if (retData.Args.ContainsKey("BOM"))
{
string newBom = retData.Args["BOM"];
@@ -63,6 +70,34 @@ namespace Lux.API.Services
// pubblico refresh info così da segnalare richeista di update conseguente
await cacheService.PublishUpdateAsync(UID, retData.ExecEnvironment);
}
+
+ // gestione ritorno tipo Shape
+ if (retData.Args.ContainsKey("SashShape"))
+ {
+ //// salvo HardwareList ricevuta
+ //string newHml = retData.Args["HardwareModelList"];
+ //string UID = retData.Args["UID"];
+ //await cacheService.SaveHmlAsync(UID, retData.ExecEnvironment, newHml);
+ //await dbService.SaveHmlAsync(UID, retData.ExecEnvironment, newHml);
+ }
+
+ // gestione ritorno opzioni HW
+ if (retData.Args.ContainsKey("HardwareOptions"))
+ {
+ //// salvo HardwareList ricevuta
+ //string newHml = retData.Args["HardwareModelList"];
+ //string UID = retData.Args["UID"];
+ //await cacheService.SaveHmlAsync(UID, retData.ExecEnvironment, newHml);
+ //await dbService.SaveHmlAsync(UID, retData.ExecEnvironment, newHml);
+ }
+
+
+ /*------------------------------------------
+ * Richieste "one shot" di configurazione
+ * - fare 1/gg o su richiesta utente
+ * ----------------------------------------*/
+
+ // Gestione ritorno lista preferiti HW (ammissibili)
if (retData.Args.ContainsKey("HardwareModelList"))
{
// salvo HardwareList ricevuta
@@ -71,6 +106,17 @@ namespace Lux.API.Services
await cacheService.SaveHmlAsync(UID, retData.ExecEnvironment, newHml);
await dbService.SaveHmlAsync(UID, retData.ExecEnvironment, newHml);
}
+
+ // gestione ritorno lista profili VALIDI per JWD
+ if (retData.Args.ContainsKey("ProfileList"))
+ {
+ //// salvo HardwareList ricevuta
+ //string newHml = retData.Args["HardwareModelList"];
+ //string UID = retData.Args["UID"];
+ //await cacheService.SaveHmlAsync(UID, retData.ExecEnvironment, newHml);
+ //await dbService.SaveHmlAsync(UID, retData.ExecEnvironment, newHml);
+ }
+
}
}
}
diff --git a/Lux.API/appsettings.json b/Lux.API/appsettings.json
index 827253c5..9523adae 100644
--- a/Lux.API/appsettings.json
+++ b/Lux.API/appsettings.json
@@ -59,6 +59,9 @@
"PubChannel": "EgwEngineInput",
"SubChannel": "EgwEngineOutput",
"SvgChannel": "Egw:svg:img",
+ "ShapeChannel": "Egw:shape:curr",
+ "HwOptChannel": "Egw:hw:opt",
+ "ProfListChannel": "Egw:prof:list",
"BomChannel": "Egw:bom",
"UpdateChannel": "Egw:update",
"BaseUrl": "/lux/srv/",
diff --git a/Lux.UI.Client/Lux.UI.Client.csproj b/Lux.UI.Client/Lux.UI.Client.csproj
index 5a9cb290..46fe6e3e 100644
--- a/Lux.UI.Client/Lux.UI.Client.csproj
+++ b/Lux.UI.Client/Lux.UI.Client.csproj
@@ -9,9 +9,9 @@
-
-
-
+
+
+
diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor
index 4e53ee6a..71a7ebe8 100644
--- a/Lux.UI/Components/Compo/OfferRowMan.razor
+++ b/Lux.UI/Components/Compo/OfferRowMan.razor
@@ -2,7 +2,7 @@
{
}
diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs
index 03a92552..dd8a3974 100644
--- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs
+++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs
@@ -1,18 +1,13 @@
using EgwCoreLib.Lux.Core;
using EgwCoreLib.Lux.Core.RestPayload;
-using EgwCoreLib.Lux.Data;
using EgwCoreLib.Lux.Data.DbModel.Config;
using EgwCoreLib.Lux.Data.DbModel.Sales;
using EgwCoreLib.Lux.Data.DbModel.Utils;
using EgwCoreLib.Lux.Data.Services;
-using EgwMultiEngineManager.Data;
-using Lux.UI.Components.Compo.Config;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
-using Microsoft.EntityFrameworkCore.Storage.Json;
using Microsoft.JSInterop;
-using NLog.LayoutRenderers;
-using System.Text;
+using Newtonsoft.Json;
using WebWindowComplex;
using WebWindowComplex.DTO;
using static EgwCoreLib.Lux.Core.Enums;
@@ -73,8 +68,11 @@ namespace Lux.UI.Components.Compo
///
public void Dispose()
{
- DLService.UpdatePipe.EA_NewMessage -= UpdatePipe_EA_NewMessage;
- DLService.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage;
+ DLService.PipeUpdate.EA_NewMessage -= PipeUpdate_EA_NewMessage;
+ DLService.PipeSvg.EA_NewMessage -= PipeSvg_EA_NewMessage;
+ DLService.PipeHwOpt.EA_NewMessage -= PipeHwOpt_EA_NewMessage;
+ DLService.PipeProfList.EA_NewMessage -= PipeProfList_EA_NewMessage;
+ DLService.PipeShape.EA_NewMessage -= PipeShape_EA_NewMessage;
}
#endregion Public Methods
@@ -93,14 +91,6 @@ namespace Lux.UI.Components.Compo
#endregion Protected Fields
- ///
- /// Formattazione testo come html x display
- ///
- protected MarkupString HtmlConv(string rawData)
- {
- return (MarkupString)rawData.Replace(Environment.NewLine, "
").Replace("\n", "
");//.Replace(" ", " ");
- }
-
#region Protected Properties
[Inject]
@@ -379,6 +369,14 @@ namespace Lux.UI.Components.Compo
return EgwCoreLib.Utils.FileHelpers.SizeSuffix(size, 1);
}
+ ///
+ /// Formattazione testo come html x display
+ ///
+ protected MarkupString HtmlConv(string rawData)
+ {
+ return (MarkupString)rawData.Replace(Environment.NewLine, "
").Replace("\n", "
");//.Replace(" ", " ");
+ }
+
///
/// Calcolo URL immagine
///
@@ -495,8 +493,11 @@ namespace Lux.UI.Components.Compo
ConfInit();
prevJwd = "";
await ReloadBaseList();
- DLService.UpdatePipe.EA_NewMessage += UpdatePipe_EA_NewMessage;
- DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
+ DLService.PipeUpdate.EA_NewMessage += PipeUpdate_EA_NewMessage;
+ DLService.PipeSvg.EA_NewMessage += PipeSvg_EA_NewMessage;
+ DLService.PipeHwOpt.EA_NewMessage += PipeHwOpt_EA_NewMessage;
+ DLService.PipeProfList.EA_NewMessage += PipeProfList_EA_NewMessage;
+ DLService.PipeShape.EA_NewMessage += PipeShape_EA_NewMessage;
}
protected override async Task OnParametersSetAsync()
@@ -568,8 +569,11 @@ namespace Lux.UI.Components.Compo
///
private EditMode CurrEditMode = EditMode.None;
+ private string currOptXml = "";
private int currPage = 1;
+ private List currProfList = new List();
+ private string currShape = "";
private string currSvg = "";
///
@@ -581,6 +585,11 @@ namespace Lux.UI.Components.Compo
private string GenericBasePath = "";
+ ///
+ /// Channel update HwOptions
+ ///
+ private string hwOptChannel = "";
+
private string imgBasePath = "";
private bool isLoading = false;
@@ -599,12 +608,25 @@ namespace Lux.UI.Components.Compo
///
private string prevJwd = "";
+ ///
+ /// Channel update Profile List
+ ///
+ private string profListChannel = "";
+
///
/// Dizionario richieste
///
private Dictionary reqDict = new Dictionary();
- private string subChannel = "";
+ ///
+ /// Channel update Shape
+ ///
+ private string shapeChannel = "";
+
+ ///
+ /// Channel update SVG
+ ///
+ private string svgChannel = "";
private int totalCount = 0;
@@ -612,32 +634,6 @@ namespace Lux.UI.Components.Compo
#region Private Methods
- ///
- /// Ricevuto SVG, se è il mio lo aggiorno...
- ///
- ///
- ///
- private async void CalcDonePipe_EA_NewMessage(object? sender, EventArgs e)
- {
- // vale SOLO SE sono in editing...
- if (EditRecord != null)
- {
- // aggiorno visualizzazione
- PubSubEventArgs currArgs = (PubSubEventArgs)e;
- // conversione on-the-fly SVG da mostrare
- if (!string.IsNullOrEmpty(currArgs.newMessage))
- {
- if (currArgs.msgUid.Equals($"{subChannel}:{EditRecord.OfferRowUID}"))
- {
- currSvg = currArgs.newMessage;
- // salvo in live data...
- CurrData.SvgPreview = currSvg;
- }
- await InvokeAsync(StateHasChanged);
- }
- }
- }
-
///
/// Chiude edit andando eventualmente a salvare
///
@@ -692,7 +688,10 @@ namespace Lux.UI.Components.Compo
imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? "";
GenericBasePath = Config.GetValue("ServerConf:GenericBaseUrl") ?? "";
calcTag = Config.GetValue("ServerConf:CalcTag") ?? "calc";
- subChannel = Config.GetValue("ServerConf:SvgChannel") ?? "";
+ svgChannel = Config.GetValue("ServerConf:SvgChannel") ?? "";
+ shapeChannel = Config.GetValue("ServerConf:ShapeChannel") ?? "";
+ hwOptChannel = Config.GetValue("ServerConf:HwOptChannel") ?? "";
+ profListChannel = Config.GetValue("ServerConf:ProfListChannel") ?? "";
}
private async Task DoRecalcOffer()
@@ -726,6 +725,143 @@ namespace Lux.UI.Components.Compo
isLoading = false;
}
+ ///
+ /// Ricevuto HwOpt, processo
+ ///
+ ///
+ ///
+ private async void PipeHwOpt_EA_NewMessage(object? sender, EventArgs e)
+ {
+ // vale SOLO SE sono in editing...
+ if (EditRecord != null)
+ {
+ // aggiorno visualizzazione
+ PubSubEventArgs currArgs = (PubSubEventArgs)e;
+ // conversione on-the-fly SVG da mostrare
+ if (!string.IsNullOrEmpty(currArgs.newMessage))
+ {
+ if (currArgs.msgUid.Equals($"{hwOptChannel}:{EditRecord.OfferRowUID}"))
+ {
+ currOptXml = currArgs.newMessage;
+ // salvo in live data...
+ CurrData.OptionsXml = currOptXml;
+ }
+ await InvokeAsync(StateHasChanged);
+ }
+ }
+ }
+
+ ///
+ /// Ricevuta profile list, processo
+ ///
+ ///
+ ///
+ private async void PipeProfList_EA_NewMessage(object? sender, EventArgs e)
+ {
+ // vale SOLO SE sono in editing...
+ if (EditRecord != null)
+ {
+ // aggiorno visualizzazione
+ PubSubEventArgs currArgs = (PubSubEventArgs)e;
+ // conversione on-the-fly SVG da mostrare
+ if (!string.IsNullOrEmpty(currArgs.newMessage))
+ {
+ if (currArgs.msgUid.Equals($"{profListChannel}:{EditRecord.OfferRowUID}"))
+ {
+ try
+ {
+ // new List();
+ currProfList = JsonConvert.DeserializeObject>(currArgs.newMessage) ?? SetupList.Profile;
+ // salvo in live data...
+ SetupList.Profile = currProfList;
+ }
+ catch
+ { }
+ }
+ await InvokeAsync(StateHasChanged);
+ }
+ }
+ }
+
+ ///
+ /// Ricevuta shape, procersso
+ ///
+ ///
+ ///
+ private async void PipeShape_EA_NewMessage(object? sender, EventArgs e)
+ {
+ // vale SOLO SE sono in editing...
+ if (EditRecord != null)
+ {
+ // aggiorno visualizzazione
+ PubSubEventArgs currArgs = (PubSubEventArgs)e;
+ // conversione on-the-fly SVG da mostrare
+ if (!string.IsNullOrEmpty(currArgs.newMessage))
+ {
+ if (currArgs.msgUid.Equals($"{shapeChannel}:{EditRecord.OfferRowUID}"))
+ {
+ currShape = currArgs.newMessage;
+ // salvo in live data...
+ CurrData.Shape = currShape;
+ }
+ await InvokeAsync(StateHasChanged);
+ }
+ }
+ }
+
+ ///
+ /// Ricevuto SVG, se è il mio lo aggiorno...
+ ///
+ ///
+ ///
+ private async void PipeSvg_EA_NewMessage(object? sender, EventArgs e)
+ {
+ // vale SOLO SE sono in editing...
+ if (EditRecord != null)
+ {
+ // aggiorno visualizzazione
+ PubSubEventArgs currArgs = (PubSubEventArgs)e;
+ // conversione on-the-fly SVG da mostrare
+ if (!string.IsNullOrEmpty(currArgs.newMessage))
+ {
+ if (currArgs.msgUid.Equals($"{svgChannel}:{EditRecord.OfferRowUID}"))
+ {
+ currSvg = currArgs.newMessage;
+ // salvo in live data...
+ CurrData.SvgPreview = currSvg;
+ }
+ await InvokeAsync(StateHasChanged);
+ }
+ }
+ }
+
+ ///
+ /// Task verifica update ricevuti
+ ///
+ ///
+ ///
+ ///
+ private async void PipeUpdate_EA_NewMessage(object? sender, EventArgs e)
+ {
+ // aggiorno visualizzazione
+ PubSubEventArgs currArgs = (PubSubEventArgs)e;
+ // conversione on-the-fly SVG da mostrare
+ if (!string.IsNullOrEmpty(currArgs.newMessage))
+ {
+ // cerco se faccia aprte dei record correnti...
+ var recFound = AllRecords.Any(x => x.OfferRowUID == currArgs.newMessage);
+ if (recFound)
+ {
+ isLoading = true;
+ await Task.Delay(10);
+ // se si tratta dell'UID corrente --> fa update
+ await DoRecalcOffer();
+ await InvokeAsync(StateHasChanged);
+ }
+ }
+ await Task.Delay(1);
+ }
+
///
/// Preparazione dati x componente edit JWD
///
@@ -869,12 +1005,12 @@ namespace Lux.UI.Components.Compo
// SE contiene il mio Jwd...
if (args.ContainsKey("Jwd"))
{
- reqDict = args;
- string serStruct = reqDict["Jwd"];
+ string serStruct = args["Jwd"];
// controllo SE variato...
- if (!prevJwd.Equals(serStruct))
+ if (!prevJwd.Equals(serStruct) || !DictUtils.DictAreEqual(reqDict, args))
{
// aggiorno val prev
+ reqDict = args;
prevJwd = serStruct;
// aggiorno live data
CurrData.CurrJwd = serStruct;
@@ -940,38 +1076,6 @@ namespace Lux.UI.Components.Compo
}
}
- ///
- /// Task verifica update ricevuti
- ///
- ///
- ///
- ///
- private async void UpdatePipe_EA_NewMessage(object? sender, EventArgs e)
- {
- // aggiorno visualizzazione
- PubSubEventArgs currArgs = (PubSubEventArgs)e;
- // conversione on-the-fly SVG da mostrare
- if (!string.IsNullOrEmpty(currArgs.newMessage))
- {
- // cerco se faccia aprte dei record correnti...
- var recFound = AllRecords.Any(x => x.OfferRowUID == currArgs.newMessage);
- if (recFound)
- {
- isLoading = true;
- await Task.Delay(10);
-#if false
- if (currArgs.msgUid.Equals($"{subChannel}:{windowUid}"))
- {
- }
-#endif
- // se si tratta dell'UID corrente --> fa update
- await DoRecalcOffer();
- await InvokeAsync(StateHasChanged);
- }
- }
- await Task.Delay(1);
- }
-
///
/// Filtro e paginazione
///
diff --git a/Lux.UI/Components/Pages/Scratch.razor.cs b/Lux.UI/Components/Pages/Scratch.razor.cs
index f32c7c17..ec79dfff 100644
--- a/Lux.UI/Components/Pages/Scratch.razor.cs
+++ b/Lux.UI/Components/Pages/Scratch.razor.cs
@@ -11,7 +11,7 @@ namespace Lux.UI.Components.Pages
public void Dispose()
{
- DLService.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage;
+ DLService.PipeSvg.EA_NewMessage -= PipeSvg_EA_NewMessage;
}
#endregion Public Methods
@@ -50,7 +50,7 @@ namespace Lux.UI.Components.Pages
imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? "";
calcTag = Config.GetValue("ServerConf:ImageCalcTag") ?? "";
subChannel = Config.GetValue("ServerConf:SvgChannel") ?? "";
- DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
+ DLService.PipeSvg.EA_NewMessage += PipeSvg_EA_NewMessage;
}
protected void Reset()
@@ -85,7 +85,7 @@ namespace Lux.UI.Components.Pages
#region Private Methods
- private async void CalcDonePipe_EA_NewMessage(object? sender, EventArgs e)
+ private async void PipeSvg_EA_NewMessage(object? sender, EventArgs e)
{
// aggiorno visualizzazione
PubSubEventArgs currArgs = (PubSubEventArgs)e;
diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj
index 1575852b..2f6109c3 100644
--- a/Lux.UI/Lux.UI.csproj
+++ b/Lux.UI/Lux.UI.csproj
@@ -5,7 +5,7 @@
enable
enable
aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50
- 0.9.2510.2115
+ 0.9.2510.2119
@@ -17,14 +17,17 @@
-
+
-
-
-
-
-
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/Lux.UI/appsettings.json b/Lux.UI/appsettings.json
index fb0e4de4..6d57a0b3 100644
--- a/Lux.UI/appsettings.json
+++ b/Lux.UI/appsettings.json
@@ -67,6 +67,9 @@
"PubChannel": "EgwEngineInput",
"SubChannel": "EgwEngineOutput",
"SvgChannel": "Egw:svg:img",
+ "ShapeChannel": "Egw:shape:curr",
+ "HwOptChannel": "Egw:hw:opt",
+ "ProfListChannel": "Egw:prof:list",
"BomChannel": "Egw:bom",
"UpdateChannel": "Egw:update",
"BaseUrl": "/lux/ui/"
diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html
index c21ba89f..cc71e5ad 100644
--- a/Resources/ChangeLog.html
+++ b/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
LUX - Web Windows MES
- Versione: 0.9.2510.2115
+ Versione: 0.9.2510.2119
Note di rilascio:
-
diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt
index 18bc8ad2..f62264ef 100644
--- a/Resources/VersNum.txt
+++ b/Resources/VersNum.txt
@@ -1 +1 @@
-0.9.2510.2115
+0.9.2510.2119
diff --git a/Resources/manifest.xml b/Resources/manifest.xml
index 1647fa08..9355c517 100644
--- a/Resources/manifest.xml
+++ b/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 0.9.2510.2115
+ 0.9.2510.2119
http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip
http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html
false