From ffe15c59a60f193ae4fe3ee42e541e2043ff393c Mon Sep 17 00:00:00 2001 From: Annamaria Sassi Date: Wed, 22 Apr 2026 08:51:31 +0200 Subject: [PATCH] Correzioni inglesina --- Test.UI/Data/AntaDoppiaInglesine.jwd | 172 +++++++++++++++--- WebWindowComplex/Models/Inglesina.cs | 13 +- WebWindowComplex/TableComp.razor.cs | 43 +++-- WebWindowComplex/WebWindowComplex.csproj | 10 +- .../WebWindowConfigurator.csproj | 8 +- 5 files changed, 191 insertions(+), 55 deletions(-) diff --git a/Test.UI/Data/AntaDoppiaInglesine.jwd b/Test.UI/Data/AntaDoppiaInglesine.jwd index a4aafdd..34ee64f 100644 --- a/Test.UI/Data/AntaDoppiaInglesine.jwd +++ b/Test.UI/Data/AntaDoppiaInglesine.jwd @@ -10,18 +10,18 @@ { "Index": 1, "Name": "Width", - "Value": 800.0 + "Value": 1400.0 }, { "Index": 2, "Name": "Height", - "Value": 1200.0 + "Value": 2000.0 } ], "ElementDimensionList": [ { "Index": 1, - "Value": 78.0 + "Value": 0.0 }, { "Index": 2, @@ -54,7 +54,7 @@ "JointType": "FULL_H" } ], - "Threshold": "Bottom", + "Threshold": "Threshold", "BottomRail": false, "BottomRailQty": 0, "BottomRailElemDimList": [], @@ -168,27 +168,84 @@ "AreaList": [ { "Side": "BOTH", - "SplitShape": "HORIZONTAL", - "SplitStartVert": false, - "SplitVertList": [], - "SplitHorizList": [ + "SplitShape": "GRID", + "SplitStartVert": true, + "SplitVertList": [ { "IsRelative": true, - "Dimension": 50.0, - "MeasureType": "PERCENTAGE" + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" }, { "IsRelative": true, - "Dimension": 50.0, - "MeasureType": "PERCENTAGE" + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + }, + { + "IsRelative": true, + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + } + ], + "SplitHorizList": [ + { + "IsRelative": true, + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + }, + { + "IsRelative": true, + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + }, + { + "IsRelative": true, + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + }, + { + "IsRelative": true, + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + }, + { + "IsRelative": true, + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + } + ], + "ElementDimVertList": [ + { + "Index": 1, + "Value": 35.0, + "Area": 0 + }, + { + "Index": 2, + "Value": 35.0, + "Area": 0 } ], - "ElementDimVertList": [], "ElementDimHorizList": [ { "Index": 1, - "Value": 60.0, - "Area": 0 + "Value": 35.0, + "Area": 1 + }, + { + "Index": 2, + "Value": 35.0, + "Area": 1 + }, + { + "Index": 3, + "Value": 35.0, + "Area": 1 + }, + { + "Index": 4, + "Value": 35.0, + "Area": 1 } ], "GroupId": 7, @@ -206,34 +263,91 @@ "AreaList": [ { "FillType": "GLASS", - "GroupId": 6, + "GroupId": 8, "AreaList": [ { - "Side": "BOTH", - "SplitShape": "HORIZONTAL", - "SplitStartVert": false, - "SplitVertList": [], - "SplitHorizList": [ + "Side": "EXTERNAL", + "SplitShape": "GRID", + "SplitStartVert": true, + "SplitVertList": [ { "IsRelative": true, - "Dimension": 50.0, - "MeasureType": "PERCENTAGE" + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" }, { "IsRelative": true, - "Dimension": 50.0, - "MeasureType": "PERCENTAGE" + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + }, + { + "IsRelative": true, + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" } ], - "ElementDimVertList": [], - "ElementDimHorizList": [ + "SplitHorizList": [ + { + "IsRelative": true, + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + }, + { + "IsRelative": true, + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + }, + { + "IsRelative": true, + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + }, + { + "IsRelative": true, + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + }, + { + "IsRelative": true, + "Dimension": 1.0, + "MeasureType": "PROPORTIONAL" + } + ], + "ElementDimVertList": [ { "Index": 1, - "Value": 60.0, + "Value": 35.0, + "Area": 0 + }, + { + "Index": 2, + "Value": 35.0, "Area": 0 } ], - "GroupId": 8, + "ElementDimHorizList": [ + { + "Index": 1, + "Value": 35.0, + "Area": 1 + }, + { + "Index": 2, + "Value": 35.0, + "Area": 1 + }, + { + "Index": 3, + "Value": 35.0, + "Area": 1 + }, + { + "Index": 4, + "Value": 35.0, + "Area": 1 + } + ], + "GroupId": 9, "AreaList": [], "AreaType": "INGLESINA" } diff --git a/WebWindowComplex/Models/Inglesina.cs b/WebWindowComplex/Models/Inglesina.cs index 39fa8bf..3d329a8 100644 --- a/WebWindowComplex/Models/Inglesina.cs +++ b/WebWindowComplex/Models/Inglesina.cs @@ -222,12 +222,17 @@ namespace WebWindowComplex.Models } if (bSplitStartVert) { - // Rimuovo da tutte le sottoaree degli element l'ultimo elemento + // Rimuovo da tutte le sottoaree gli element for (int subArea = 1; subArea <= ElemDimHorizList.Max(x => x.nSubArea); subArea++) { - SplitElementDimension? removeElem = ElemDimHorizList.Where(x => x.nSubArea == subArea).OrderByDescending(x => x.nIndex).FirstOrDefault(); - if (removeElem != null) - ElemDimHorizList.Remove(removeElem); + List elemDimList = ElemDimHorizList.Where(x => x.nSubArea == subArea).OrderByDescending(x => x.nIndex).ToList(); + for (var SplitIndex = elemDimList.Count - 1; SplitIndex >= value; SplitIndex += -1) + { + elemDimList.RemoveAt(elemDimList.Count - 1); + } + //SplitElementDimension? removeElem = ElemDimHorizList.Where(x => x.nSubArea == subArea).OrderByDescending(x => x.nIndex).FirstOrDefault(); + //if (removeElem != null) + // ElemDimHorizList.Remove(removeElem); } } else diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index 715d9a4..4438c90 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -2153,33 +2153,36 @@ namespace WebWindowComplex { Inglesina inglesina = (Inglesina)found; List IngElemList = inglesina.searchElemFromSubArea(EntityIdSearch); - for (int i = 0; i < IngElemList.Count; i++) + if (IngElemList != null && IngElemList.Count > 0) { - IngElemList.ElementAt(i).SetNameElement(profileNameList.ElementAt(i)); - IngElemList.ElementAt(i).SetMinDimension(Window.m_ParameterList.GetValueOrDefault(IngElemList.ElementAt(i).sName + "_DimMin")); - IngElemList.ElementAt(i).SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(IngElemList.ElementAt(i).sName + "_DimMax")); - if (IngElemList.ElementAt(i).dDimension > IngElemList.ElementAt(i).dMaxDim) + for (int i = 0; i < IngElemList.Count; i++) { - IngElemList.ElementAt(i).SetDimension(IngElemList.ElementAt(i).dMaxDim); - Frame frame = inglesina.ParentWindow.AreaList.First(); - if (frame != null) + IngElemList.ElementAt(i).SetNameElement(profileNameList.ElementAt(i)); + IngElemList.ElementAt(i).SetMinDimension(Window.m_ParameterList.GetValueOrDefault(IngElemList.ElementAt(i).sName + "_DimMin")); + IngElemList.ElementAt(i).SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(IngElemList.ElementAt(i).sName + "_DimMax")); + if (IngElemList.ElementAt(i).dDimension > IngElemList.ElementAt(i).dMaxDim) { - frame.SearchAreaList(frame, frame.AvailWidthArea(), "Width"); - frame.SearchAreaList(frame, frame.AvailHeightArea(), "Height"); + IngElemList.ElementAt(i).SetDimension(IngElemList.ElementAt(i).dMaxDim); + Frame frame = inglesina.ParentWindow.AreaList.First(); + if (frame != null) + { + frame.SearchAreaList(frame, frame.AvailWidthArea(), "Width"); + frame.SearchAreaList(frame, frame.AvailHeightArea(), "Height"); + } } - } - else if (IngElemList.ElementAt(i).dDimension < IngElemList.ElementAt(i).dMinDim) - { - IngElemList.ElementAt(i).SetDimension(IngElemList.ElementAt(i).dMinDim); - Frame frame = inglesina.ParentWindow.AreaList.First(); - if (frame != null) + else if (IngElemList.ElementAt(i).dDimension < IngElemList.ElementAt(i).dMinDim) { - frame.SearchAreaList(frame, frame.AvailWidthArea(), "Width"); - frame.SearchAreaList(frame, frame.AvailHeightArea(), "Height"); + IngElemList.ElementAt(i).SetDimension(IngElemList.ElementAt(i).dMinDim); + Frame frame = inglesina.ParentWindow.AreaList.First(); + if (frame != null) + { + frame.SearchAreaList(frame, frame.AvailWidthArea(), "Width"); + frame.SearchAreaList(frame, frame.AvailHeightArea(), "Height"); + } } + //string overlapName = string.Join("_", IngElemList.ElementAt(i).sName.Split('_').Skip(1)); + //IngElemList.ElementAt(i).SetOverlapElement(Window.m_ParameterList.GetValueOrDefault(overlapName + "_Overlap")); } - //string overlapName = string.Join("_", IngElemList.ElementAt(i).sName.Split('_').Skip(1)); - //IngElemList.ElementAt(i).SetOverlapElement(Window.m_ParameterList.GetValueOrDefault(overlapName + "_Overlap")); } break; } diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index 467d0a6..9de1408 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.4.1617 + 3.1.4.1713 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -159,6 +159,14 @@ + + + + + + + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 97dd0d1..96f5746 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.4.1617 + 3.1.4.1714 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -266,6 +266,12 @@ + + + + + +