diff --git a/Test.UI.Client/Test.UI.Client.csproj b/Test.UI.Client/Test.UI.Client.csproj
index 81d27a4..9033ca5 100644
--- a/Test.UI.Client/Test.UI.Client.csproj
+++ b/Test.UI.Client/Test.UI.Client.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/Test.UI/Components/Pages/EditJWD.razor b/Test.UI/Components/Pages/EditJWD.razor
index 3b1d466..9ea528b 100644
--- a/Test.UI/Components/Pages/EditJWD.razor
+++ b/Test.UI/Components/Pages/EditJWD.razor
@@ -68,7 +68,7 @@
diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs
index 1ad2670..5b21eb7 100644
--- a/Test.UI/Components/Pages/EditJWD.razor.cs
+++ b/Test.UI/Components/Pages/EditJWD.razor.cs
@@ -14,7 +14,6 @@ namespace Test.UI.Components.Pages
{
public partial class EditJWD : IDisposable
{
-
#region Public Fields
public string InitialJwd = "";
@@ -29,6 +28,37 @@ namespace Test.UI.Components.Pages
#region Public Methods
+ ///
+ /// Comparatore euqlity obj dizionario
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool DictionariesEqual(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;
+ }
+
public void Dispose()
{
DLService.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage;
@@ -46,6 +76,7 @@ namespace Test.UI.Components.Pages
protected string currJwd = "...";
protected Dictionary m_CurrArgs = new Dictionary();
protected string prevJwd = "";
+
///
/// Configurazione elenchi anagrafiche
///
@@ -79,6 +110,7 @@ namespace Test.UI.Components.Pages
};
protected List AvailHardwareList { get; set; } = new List();
+
protected List AvailMaterialList { get; set; } = new List()
{
new string("Pino"),
@@ -93,6 +125,7 @@ namespace Test.UI.Components.Pages
};
protected List AvailTemplateList { get; set; } = new List();
+
[Inject]
protected IConfiguration Config { get; set; } = null!;
@@ -153,13 +186,19 @@ namespace Test.UI.Components.Pages
private string CalcUid = "CurrWindow";
private string cFileHardware = "Hardware/Setup.json";
private string cFileTemplate = "Data/Setup.json";
+ private string colorMassUpdate;
private TemplateSelectDTO? currSel = null;
private string currSvg = "";
+ private string familyHWMassUpdate;
private string GenericBasePath = "";
+ private string glassMassUpdate;
+ private Hardware hardwareMassUpdate;
private string imgBasePath = "";
+ private string materialMassUpdate;
private string outClose = "";
private string outSave = "";
+ private string profileMassUpdate;
private string subChannel = "";
private string windowUid = "CurrWindow";
@@ -204,6 +243,29 @@ namespace Test.UI.Components.Pages
subChannel = Config.GetValue("ServerConf:SvgChannel") ?? "";
}
+ private async Task ExecRequest(Dictionary CurrArgs)
+ {
+ outClose = "";
+ outSave = "";
+ // verifico se contiene JWD, lo aggiorno
+ if (CurrArgs.ContainsKey("Jwd"))
+ {
+ currJwd = CurrArgs["Jwd"];
+ CurrData.CurrJwd = currJwd;
+ }
+ // se il SSE variato --> invio
+ if (!currJwd.Equals(prevJwd) || !DictionariesEqual(m_CurrArgs, CurrArgs))
+ {
+ m_CurrArgs = CurrArgs;
+ prevJwd = currJwd;
+ CalcRequestDTO calcRequestDTO = new CalcRequestDTO();
+ calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW;
+ calcRequestDTO.DictExec = m_CurrArgs;
+ // chiamo la chiamata POST alla API, che manda la richiesta via REDIS
+ await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{CalcUid}", calcRequestDTO);
+ }
+ }
+
///
/// Rilettura dati
///
@@ -241,30 +303,6 @@ namespace Test.UI.Components.Pages
await Task.Delay(100);
}
- private async Task SaveJWD(Dictionary CurrArgs)
- {
- outClose = "";
- outSave = "";
- m_CurrArgs = CurrArgs;
- // verifico se contiene JWD, lo aggiorno
- if (CurrArgs.ContainsKey("Jwd"))
- {
- currJwd = CurrArgs["Jwd"];
- CurrData.CurrJwd = currJwd;
- }
-
- // se il SSE variato --> invio
- if (!currJwd.Equals(prevJwd))
- {
- prevJwd = currJwd;
- CalcRequestDTO calcRequestDTO = new CalcRequestDTO();
- calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW;
- calcRequestDTO.DictExec = m_CurrArgs;
- // chiamo la chiamata POST alla API, che manda la richiesta via REDIS
- await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{CalcUid}", calcRequestDTO);
- }
- }
-
private void SetTemplate(TemplateSelectDTO selTemp)
{
string rawVal = "";
@@ -277,18 +315,12 @@ namespace Test.UI.Components.Pages
SelTemplate = new Template(selTemp.Index, selTemp.Description, selTemp.SVGFileName, rawVal);
}
- #endregion Private Methods
-
private void updateInfoJwd(string currSer, string? newFamilyHardware, Hardware? newHardware, string? newColorMaterial, string? newMaterial, string? newGlass, string? newProfile)
{
var newJwd = SerialMan.MassUpdate(currSer, newFamilyHardware, newHardware, newColorMaterial, newMaterial, newGlass, newProfile);
CurrData.CurrJwd = newJwd;
}
- private string familyHWMassUpdate;
- private Hardware hardwareMassUpdate;
- private string materialMassUpdate;
- private string colorMassUpdate;
- private string glassMassUpdate;
- private string profileMassUpdate;
+
+ #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/Test.UI/Components/Pages/Gerarchia.razor b/Test.UI/Components/Pages/Gerarchia.razor
index bfd60ee..6501d4c 100644
--- a/Test.UI/Components/Pages/Gerarchia.razor
+++ b/Test.UI/Components/Pages/Gerarchia.razor
@@ -14,7 +14,7 @@
IN_SelMaterial="@SelMaterial"
IN_GlassList="@AvailGlassList"
IN_SelGlass="@SelGlass"
- EC_OnUpdate="SaveJWD"
+ EC_req="SaveJWD"
EC_OnSelectedTemplate="SetTemplate"
LiveSVG="@currSvg">
diff --git a/Test.UI/Test.UI.csproj b/Test.UI/Test.UI.csproj
index ead5cf7..7368494 100644
--- a/Test.UI/Test.UI.csproj
+++ b/Test.UI/Test.UI.csproj
@@ -34,11 +34,11 @@
-
-
+
+
-
+
diff --git a/WebAedificaConfigurator/WebAedificaConfigurator.csproj b/WebAedificaConfigurator/WebAedificaConfigurator.csproj
index 9e3b60b..b74113a 100644
--- a/WebAedificaConfigurator/WebAedificaConfigurator.csproj
+++ b/WebAedificaConfigurator/WebAedificaConfigurator.csproj
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/WebWindowComplex/Compo/CardSashGroup.razor b/WebWindowComplex/Compo/CardSashGroup.razor
index 7445425..82a0e57 100644
--- a/WebWindowComplex/Compo/CardSashGroup.razor
+++ b/WebWindowComplex/Compo/CardSashGroup.razor
@@ -94,7 +94,7 @@