diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs index 092847a..514d0d0 100644 --- a/Test.UI/Components/Pages/EditJWD.razor.cs +++ b/Test.UI/Components/Pages/EditJWD.razor.cs @@ -49,7 +49,7 @@ namespace Test.UI.Components.Pages protected bool User = false; protected Dictionary currGroupShape = new Dictionary(); - protected Dictionary currElement = new Dictionary(); + protected List currElement = new List(); protected Dictionary currHwOption = new Dictionary(); protected string currJwd = "..."; protected Dictionary m_CurrArgs = new Dictionary(); @@ -519,9 +519,9 @@ namespace Test.UI.Components.Pages if (currArgs.msgUid.StartsWith($"{channelElement}:{windowUid}")) { // deserializzo il dizionario delle risposte... - var rawDict = JsonConvert.DeserializeObject>(currArgs.newMessage); - currElement = rawDict ?? new Dictionary(); - CurrData.DictElement = currElement; + var rawDict = JsonConvert.DeserializeObject>(currArgs.newMessage); + currElement = rawDict ?? new List(); + CurrData.ProfElementList = currElement; } await InvokeAsync(StateHasChanged); } diff --git a/WebWindowComplex/AreaProfiles.cs b/WebWindowComplex/AreaProfiles.cs new file mode 100644 index 0000000..4c19d02 --- /dev/null +++ b/WebWindowComplex/AreaProfiles.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WebWindowComplex +{ + public class AreaProfiles + { + /// + /// Numero di area + /// + public int GroupId { get; set; } + + /// + /// numero di anta (se è una sash) + /// + public int SashId { get; set; } + + /// + /// Lista profili + /// + public List Profiles { get; set; } + + public AreaProfiles(int groupId, int sashId, List profiles) + { + GroupId = groupId; + SashId = sashId; + Profiles = profiles; + } + } +} diff --git a/WebWindowComplex/Compo/CardFrame.razor.cs b/WebWindowComplex/Compo/CardFrame.razor.cs index 124a7ee..e7ce2f2 100644 --- a/WebWindowComplex/Compo/CardFrame.razor.cs +++ b/WebWindowComplex/Compo/CardFrame.razor.cs @@ -104,13 +104,17 @@ namespace WebWindowComplex.Compo { if (CurrFrameWindow.SelThresholdFromType != value) { - CurrFrameWindow.SelThresholdFromType = value; - var args = new DataUpdateFrame() + string valueName = CurrFrameWindow.ThresholdList.Where(x => x.Type.Equals(value)).First().Name; + if (SashList.Count > 0 || (SashList.Count == 0 && !valueName.Equals("Threshold"))) { - currFrame = CurrFrameWindow, - svgNoHw = false - }; - _ = EC_UpdateFrame.InvokeAsync(args); + CurrFrameWindow.SelThresholdFromType = value; + var args = new DataUpdateFrame() + { + currFrame = CurrFrameWindow, + svgNoHw = false + }; + _ = EC_UpdateFrame.InvokeAsync(args); + } } } } diff --git a/WebWindowComplex/Compo/CardSashGroup.razor.cs b/WebWindowComplex/Compo/CardSashGroup.razor.cs index c1bed29..4bf6f57 100644 --- a/WebWindowComplex/Compo/CardSashGroup.razor.cs +++ b/WebWindowComplex/Compo/CardSashGroup.razor.cs @@ -195,6 +195,7 @@ namespace WebWindowComplex.Compo protected async Task RemoveArea() { CurrSashGroup.Remove(); + FrameWindow.SetSelThresholdFromName(FrameWindow.ThresholdList.FirstOrDefault(x => x.Name != "Threshold").Name); var args = new DataUpdateFrame() { currFrame = FrameWindow diff --git a/WebWindowComplex/DTO/LivePayload.cs b/WebWindowComplex/DTO/LivePayload.cs index 39eba34..9d00a07 100644 --- a/WebWindowComplex/DTO/LivePayload.cs +++ b/WebWindowComplex/DTO/LivePayload.cs @@ -35,9 +35,9 @@ namespace WebWindowComplex.DTO public Dictionary DictOptionsXml { get; set; } = new Dictionary(); /// - /// Dizionario Element + /// Lista profili Element /// - public Dictionary DictElement { get; set; } = new Dictionary(); + public List ProfElementList { get; set; } = new List(); #endregion Public Properties @@ -61,7 +61,8 @@ namespace WebWindowComplex.DTO return false; if (!DictUtils.DictAreEqual(DictShape, item.DictShape)) return false; - + if (ProfElementList.Count == item.ProfElementList.Count && !ProfElementList.OrderBy(x => x).SequenceEqual(item.ProfElementList.OrderBy(x => x))) + return false; return true; } diff --git a/WebWindowComplex/Models/Frame.cs b/WebWindowComplex/Models/Frame.cs index 592070b..19d75b2 100644 --- a/WebWindowComplex/Models/Frame.cs +++ b/WebWindowComplex/Models/Frame.cs @@ -13,9 +13,7 @@ namespace WebWindowComplex.Models public class Frame : Area { #region Public Fields - // Lista hardware completa passata dal chiamante del componente - public static Dictionary> m_AllThresholdListOld = new Dictionary>(); - + // Lista soglie completa passata dal chiamante del componente public static List m_AllThresholdList = new List(); diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index 7d74d97..652c8cf 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -760,12 +760,12 @@ namespace WebWindowComplex } } } - if(LiveData.DictElement.Count > 0) + if(LiveData.ProfElementList.Count > 0) { // Inserisco i profili ricevuti nei rispettivi Element - foreach (var item in LiveData.DictElement) + foreach (var item in LiveData.ProfElementList) { - UpdateProfileElement(null, item.Key); + UpdateProfileElement(item.Profiles, item.GroupId, item.SashId); } } } diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index 998bcd9..b26abdd 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.8.1.2618 + 2.8.1.2712 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -106,6 +106,14 @@ + + + + + + + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 2b5e443..8578e7a 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.8.1.2618 + 2.8.1.2712 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -142,6 +142,18 @@ + + + + + + + + + + + +