Ancora update x gestione ritorno dizionario forme validate

This commit is contained in:
Samuele Locatelli
2025-10-22 19:20:31 +02:00
parent 6b9ab0421c
commit 38ab3eee81
4 changed files with 24 additions and 11 deletions
+18 -7
View File
@@ -48,6 +48,8 @@ namespace Test.UI.Components.Pages
protected Dictionary<string, string> m_CurrArgs = new Dictionary<string, string>();
protected string prevJwd = "";
protected Dictionary<int, string> currGroupShape = new Dictionary<int, string>();
/// <summary>
/// Configurazione elenchi anagrafiche
/// </summary>
@@ -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<string>("ServerConf:CalcTag") ?? "";
svgChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
shapeChannel = Config.GetValue<string>("ServerConf:ShapeChannel") ?? "";
}
private async Task ExecRequest(Dictionary<string, string> 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);
}
+1 -3
View File
@@ -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;
+2
View File
@@ -72,6 +72,8 @@
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.7.10.2216</Version>
<Version>2.7.10.2219</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione JWD per LUX</Description>
@@ -144,6 +144,8 @@