From 5afb1c8842a8d0a9a71abeede8306d99ff8f2de9 Mon Sep 17 00:00:00 2001 From: Annamaria Sassi Date: Wed, 4 Feb 2026 10:26:08 +0100 Subject: [PATCH] Aggiornata costruzione finestra con vetro fisso partendo da jwd vuoto --- Test.UI/Data/AntaDoppia.jwd | 4 +- WebWindowComplex/TableComp.razor.cs | 41 +++++++++++++++---- WebWindowComplex/WebWindowComplex.csproj | 22 +++++++++- .../WebWindowConfigurator.csproj | 16 +++++++- 4 files changed, 70 insertions(+), 13 deletions(-) diff --git a/Test.UI/Data/AntaDoppia.jwd b/Test.UI/Data/AntaDoppia.jwd index e8e995b..b462eba 100644 --- a/Test.UI/Data/AntaDoppia.jwd +++ b/Test.UI/Data/AntaDoppia.jwd @@ -192,11 +192,11 @@ "GroupId": 2, "AreaList": [ { - "GroupId": 4, + "GroupId": 3, "AreaList": [ { "FillType": "GLASS", - "GroupId": 3, + "GroupId": 4, "AreaList": [], "AreaType": "FILL" } diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index 57c2eb2..b7034e3 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -667,8 +667,21 @@ namespace WebWindowComplex private async Task BuildFrameDefault() { + // Costruisco window e setto i parametri Window window = new Window(); + window.sProfilePath = "Profilo78"; + window.sMaterial = "Pino"; + window.sGlass = "Vetro BE 2S 4T/16/4T"; + window.sColorMaterial = "Wood"; + // Costruisco frame e setto i parametri Frame frame = new Frame(null, window); + frame.SetGroupId(1); + frame.SetAreaType(AreaTypes.FRAME); + frame.SetSelShape(Shapes.RECTANGLE); + frame.SetSelThresholdFromName("Bottom"); + frame.SetBottomRail(false); + frame.SetBottomRailQty(0); + window.AreaList.Add(frame); List DimensionList = new List { new FrameDimension(frame, 1, "Width", 800, false), @@ -681,15 +694,25 @@ namespace WebWindowComplex new Joint(frame, 3, Joints.FULL_H), new Joint(frame, 4, Joints.FULL_H) }; - JsonWindow jsonWindow = new JsonWindow("Profilo78", "Pino", "Black", "Vetro BE 2S 4T/16/4T"); - JsonFrame jsonFrame = new JsonFrame(Shapes.RECTANGLE, "Bottom", false, 0, 1); - jsonWindow.AreaList.Add(jsonFrame); - //jsonFrame.ArcElement = ae.Serialize(); - foreach (var Dimension in DimensionList) - jsonFrame.DimensionList.Add(Dimension.Serialize()); - foreach (var Joint in JointList) - jsonFrame.JointList.Add(Joint.Serialize()); - jsonFrame.AreaList.Add(Fill.CreateFill(frame, FillTypes.GLASS).Serialize(true)); + frame.JointList = JointList; + frame.DimensionList = DimensionList; + // Costruisco fill e setto i parametri + Fill fill = new Fill(frame, window); + fill.AreaType = AreaTypes.FILL; + fill.SelFillType = FillTypes.GLASS; + fill.GroupId = 2; + frame.AreaList.Add(fill); + JsonWindow jsonWindow = window.Serialize(); + //JsonWindow jsonWindow = new JsonWindow("Profilo78", "Pino", "Black", "Vetro BE 2S 4T/16/4T"); + //jsonWindow.Deserialize(); + //JsonFrame jsonFrame = new JsonFrame(Shapes.RECTANGLE, "Bottom", false, 0, 1); + //jsonWindow.AreaList.Add(jsonFrame); + ////jsonFrame.ArcElement = ae.Serialize(); + //foreach (var Dimension in DimensionList) + // jsonFrame.DimensionList.Add(Dimension.Serialize()); + //foreach (var Joint in JointList) + // jsonFrame.JointList.Add(Joint.Serialize()); + //JsonFill jsonFill = new JsonFill(FillTypes.GLASS, 2); string jwd = JsonConvert.SerializeObject(jsonWindow); JsonWindow WindowFromJson = JsonConvert.DeserializeObject(jwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", ""); setCurrWindow(WindowFromJson); diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index a0e5fe8..d99b038 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.2.317 + 3.1.2.410 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -50,3 +50,23 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 98a57ec..dd59260 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.2.317 + 3.1.2.410 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -50,6 +50,20 @@ + + + + + + + + + + + + + +