diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs index e8f722c..6493f76 100644 --- a/Test.UI/Components/Pages/EditJWD.razor.cs +++ b/Test.UI/Components/Pages/EditJWD.razor.cs @@ -338,10 +338,8 @@ namespace Test.UI.Components.Pages Random random = new Random(); CalcUid = Convert.ToString(random.Next(1000, 10000)); windowUid = CalcUid; - //InitialJwd = File.ReadAllText("Data\\FinestraSplitGrid.jwd"); - //InitialJwd = File.ReadAllText("Data\\FinestraSplitHoriz.jwd"); + //InitialJwd = File.ReadAllText("Data\\AntaDoppiaInglesine.jwd"); InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd"); - //InitialJwd = File.ReadAllText("Data\\ArcoAntaDoppia.jwd"); currJwd = InitialJwd; // rileggo altri dati await ReloadData(); diff --git a/Test.UI/Data/AntaDoppiaInglesine.jwd b/Test.UI/Data/AntaDoppiaInglesine.jwd new file mode 100644 index 0000000..5fafd93 --- /dev/null +++ b/Test.UI/Data/AntaDoppiaInglesine.jwd @@ -0,0 +1,222 @@ +{ + "ProfilePath": "Profilo78", + "Material": "Pino", + "ColorMaterial": "Black", + "Glass": "Vetro BE 2S 4T/16/4T", + "AreaList": [ + { + "Shape": "RECTANGLE", + "DimensionList": [ + { + "Index": 1, + "Name": "Width", + "Value": 800.0 + }, + { + "Index": 2, + "Name": "Height", + "Value": 1200.0 + } + ], + "ElementDimensionList": [ + { + "Index": 1, + "Value": 78.0 + }, + { + "Index": 2, + "Value": 78.0 + }, + { + "Index": 3, + "Value": 78.0 + }, + { + "Index": 4, + "Value": 78.0 + } + ], + "JointList": [ + { + "Index": 1, + "JointType": "FULL_H" + }, + { + "Index": 2, + "JointType": "FULL_H" + }, + { + "Index": 3, + "JointType": "FULL_H" + }, + { + "Index": 4, + "JointType": "FULL_H" + } + ], + "Threshold": "Bottom", + "BottomRail": false, + "BottomRailQty": 0, + "BottomRailElemDimList": [], + "GroupId": 1, + "AreaList": [ + { + "IsSashVertical": true, + "IsDimensionLight": true, + "SashList": [ + { + "SashId": 1, + "OpeningType": "TILTTURN_LEFT", + "MeasureType": "PROPORTIONAL", + "Dimension": 1.0, + "HasHandle": true, + "ElementDimensionList": [ + { + "Index": 1, + "Value": 78.0 + }, + { + "Index": 2, + "Value": 78.0 + }, + { + "Index": 3, + "Value": 78.0 + }, + { + "Index": 4, + "Value": 78.0 + } + ], + "JointList": [ + { + "Index": 1, + "JointType": "FULL_V" + }, + { + "Index": 2, + "JointType": "FULL_V" + }, + { + "Index": 3, + "JointType": "FULL_V" + }, + { + "Index": 4, + "JointType": "FULL_V" + } + ] + }, + { + "SashId": 2, + "OpeningType": "TURNONLY_RIGHT", + "MeasureType": "PROPORTIONAL", + "Dimension": 1.0, + "HasHandle": false, + "ElementDimensionList": [ + { + "Index": 1, + "Value": 78.0 + }, + { + "Index": 2, + "Value": 78.0 + }, + { + "Index": 3, + "Value": 78.0 + }, + { + "Index": 4, + "Value": 78.0 + } + ], + "JointList": [ + { + "Index": 1, + "JointType": "FULL_V" + }, + { + "Index": 2, + "JointType": "FULL_V" + }, + { + "Index": 3, + "JointType": "FULL_V" + }, + { + "Index": 4, + "JointType": "FULL_V" + } + ] + } + ], + "SashType": "NULL", + "BottomRail": false, + "BottomRailQty": 0, + "BottomRailElemDimList": [], + "Hardware": "000631", + "HwOptionList": [], + "GroupId": 2, + "AreaList": [ + { + "GroupId": 3, + "AreaList": [ + { + "FillType": "GLASS", + "GroupId": 4, + "AreaList": [ + { + "SplitShape": "HORIZONTAL", + "SplitStartVert": false, + "SplitVertList": [], + "SplitHorizList": [ + { + "IsRelative": true, + "Dimension": 50.0, + "MeasureType": "PERCENTAGE" + }, + { + "IsRelative": true, + "Dimension": 50.0, + "MeasureType": "PERCENTAGE" + } + ], + "ElementDimVertList": [], + "ElementDimHorizList": [ + { + "Index": 1, + "Value": 78.0, + "Area": 0 + } + ], + "GroupId": 7, + "AreaList": [], + "AreaType": "SPLIT" + } + ], + "AreaType": "FILL" + } + ], + "AreaType": "SPLITTED" + }, + { + "GroupId": 5, + "AreaList": [ + { + "FillType": "GLASS", + "GroupId": 6, + "AreaList": [], + "AreaType": "FILL" + } + ], + "AreaType": "SPLITTED" + } + ], + "AreaType": "SASH" + } + ], + "AreaType": "FRAME" + } + ] +} \ No newline at end of file diff --git a/Test.UI/Test.UI.csproj b/Test.UI/Test.UI.csproj index e067628..1426587 100644 --- a/Test.UI/Test.UI.csproj +++ b/Test.UI/Test.UI.csproj @@ -49,6 +49,9 @@ + + Always + Always diff --git a/WebWindowComplex/Compo/AreaSash.razor b/WebWindowComplex/Compo/AreaSash.razor index 42056c6..8199a52 100644 --- a/WebWindowComplex/Compo/AreaSash.razor +++ b/WebWindowComplex/Compo/AreaSash.razor @@ -96,7 +96,7 @@ else
- +
} diff --git a/WebWindowComplex/Compo/AreaSash.razor.cs b/WebWindowComplex/Compo/AreaSash.razor.cs index 520d797..bfb6a20 100644 --- a/WebWindowComplex/Compo/AreaSash.razor.cs +++ b/WebWindowComplex/Compo/AreaSash.razor.cs @@ -328,6 +328,21 @@ namespace WebWindowComplex.Compo return EC_UpdateSash.InvokeAsync(args); } + /// + /// Metodo per aggiungere l'inglesina nella singola anta + /// + /// + private Task AddInglesinaToSash() + { + CurrAnta.AddInglesina(); + DataUpdateProfile args = new DataUpdateProfile() + { + sash = CurrSashGroup, + reqProfile = true + }; + return EC_UpdateSash.InvokeAsync(args); + } + private bool isOpen = false; private void ToggleDropdown() diff --git a/WebWindowComplex/Compo/BottomRail.razor b/WebWindowComplex/Compo/BottomRail.razor index 97cc835..e5e5bd4 100644 --- a/WebWindowComplex/Compo/BottomRail.razor +++ b/WebWindowComplex/Compo/BottomRail.razor @@ -12,16 +12,16 @@ diff --git a/WebWindowComplex/Compo/BottomRail.razor.cs b/WebWindowComplex/Compo/BottomRail.razor.cs index 960e105..6369763 100644 --- a/WebWindowComplex/Compo/BottomRail.razor.cs +++ b/WebWindowComplex/Compo/BottomRail.razor.cs @@ -27,17 +27,16 @@ namespace WebWindowComplex.Compo if (updRec != null) { DataBottomRail ans = new(); - ElementDimension currRec = new(CurrArea, -1, 0); + ElementDimension? currRec = new(CurrArea, -1, 0); if (CurrFrame() != null) { // cerco il record - currRec = CurrFrame().BottomRailElemDimList.FirstOrDefault(x => x.ParentArea == updRec.ParentArea && x.nIndex == updRec.nIndex); - + currRec = CurrFrame()!.BottomRailElemDimList.FirstOrDefault(x => x.ParentArea == updRec.ParentArea && x.nIndex == updRec.nIndex); } else if(CurrSash() != null) { // cerco il record - currRec = CurrSash().BottomRailElemDimList.FirstOrDefault(x => x.ParentArea == updRec.ParentArea && x.nIndex == updRec.nIndex); + currRec = CurrSash()!.BottomRailElemDimList.FirstOrDefault(x => x.ParentArea == updRec.ParentArea && x.nIndex == updRec.nIndex); } if (currRec != null) { diff --git a/WebWindowComplex/Compo/CardSplit.razor.cs b/WebWindowComplex/Compo/CardSplit.razor.cs index e80a4db..09484ba 100644 --- a/WebWindowComplex/Compo/CardSplit.razor.cs +++ b/WebWindowComplex/Compo/CardSplit.razor.cs @@ -198,7 +198,7 @@ namespace WebWindowComplex.Compo { if (updRec != null) { - SplitElementDimension? currRec = new SplitElementDimension(null, 0,0,-1); + SplitElementDimension? currRec = new SplitElementDimension(updRec.ParentArea, 0,0,-1); if (updRec.nSubArea != 0) { List ElemIndexList = new List(); diff --git a/WebWindowComplex/Compo/CardTree.razor b/WebWindowComplex/Compo/CardTree.razor index 077894d..3475f0a 100644 --- a/WebWindowComplex/Compo/CardTree.razor +++ b/WebWindowComplex/Compo/CardTree.razor @@ -59,10 +59,6 @@ - @* *@ } @*
@if(!baseUser && SplittedList != null && SplittedList.Count > 0) { - Splitted currSplitted = SplittedList.Where(x => x.AreaList.First().Equals(FillList[currFillIndex])).FirstOrDefault()?? new Splitted(null, null); - @if (currSplitted.ParentArea != null && currSplitted.ParentWindow != null){ - - + Splitted? currSplitted = SplittedList.Where(x => x.AreaList.First().Equals(FillList[currFillIndex])).FirstOrDefault(); + @if(currSplitted != null) + { + @if (currSplitted.ParentArea != null && currSplitted.ParentWindow != null){ + + + } } } } diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index ee45d3a..d812703 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -256,7 +256,10 @@ namespace WebWindowComplex if (FillList[i].Equals(node)) { nFill = FillList.Count == 1 ? "" : $"{i + 1}"; - ItemTableList.Add(new ItemTable(AreaTypes.FILL, "FL" + nFill, maxRow, col, i, 0)); + if(node.AreaList.Count == 0) + ItemTableList.Add(new ItemTable(AreaTypes.FILL, "FL" + nFill, maxRow, col, i, 0)); + else + ItemTableList.Add(new ItemTable(AreaTypes.FILL, "FL" + nFill, maxRow, col, i, node.AreaList.Count)); break; } } @@ -1133,7 +1136,7 @@ namespace WebWindowComplex RowCollapsed[item.Key] = Args[item.Key] ? true : false; if (m_ItemTableList.FirstOrDefault(x => x.Row == item.Key) != null) { - Child[item.Key] = m_ItemTableList.FirstOrDefault(x => x.Row == item.Key).NumChild; + Child[item.Key] = m_ItemTableList.FirstOrDefault(x => x.Row == item.Key)!.NumChild; } } } @@ -1374,10 +1377,13 @@ namespace WebWindowComplex if (newFill != null) { // cerco il record - var currRec = (Fill)SearchAreaFromGroupId(FrameWindow, newFill.GroupId); + var currRec = (Fill?)SearchAreaFromGroupId(FrameWindow, newFill.GroupId); // lo aggiorno - currRec = newFill; - await DoPreviewSvg(); + if(currRec != null) + { + currRec = newFill; + await DoPreviewSvg(); + } } } @@ -1622,7 +1628,7 @@ namespace WebWindowComplex bool noSvg = args.noSvg; if (svgNoHw) { - Sash item = (Sash)SearchAreaFromGroupId(FrameWindow, newSash.GroupId); + Sash? item = (Sash?)SearchAreaFromGroupId(FrameWindow, newSash.GroupId); if (newSash != null && item != null) { item = newSash; @@ -1631,7 +1637,7 @@ namespace WebWindowComplex } else { - Sash item = (Sash)SearchAreaFromGroupId(FrameWindow, newSash.GroupId); + Sash? item = (Sash?)SearchAreaFromGroupId(FrameWindow, newSash.GroupId); if (newSash != null && item != null) { item = newSash; diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index 746a1cb..c6418bb 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.2.1713 + 3.1.2.1715 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -168,6 +168,18 @@ + + + + + + + + + + + + diff --git a/WebWindowConfigurator/Json/JsonUtility.cs b/WebWindowConfigurator/Json/JsonUtility.cs index e9ffbce..d9057fa 100644 --- a/WebWindowConfigurator/Json/JsonUtility.cs +++ b/WebWindowConfigurator/Json/JsonUtility.cs @@ -47,7 +47,7 @@ namespace WebWindowConfigurator.Json { Window Window = new Window() { sProfilePath = m_sProfilePath }; foreach (var Area in AreaList) - Window.AreaList.Add((Frame)Area.Deserialize(null,Window)); + Window.AreaList.Add((Frame)Area.Deserialize(null,Window)!); return Window; } } diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 7c31a18..af25cd6 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.2.1713 + 3.1.2.1715 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -160,6 +160,10 @@ + + + +