From 5e3e535139ba208a85b7aeaa4892106020369c07 Mon Sep 17 00:00:00 2001 From: Annamaria Sassi Date: Thu, 4 Dec 2025 16:19:51 +0100 Subject: [PATCH] - Corretto conversione misure dimensioni - Aggiornato tipi misure negli split (sia verticale sia orizzontale) - Aggiornati commenti --- Test.UI/Components/Pages/EditJWD.razor.cs | 4 +- WebWindowComplex/Compo/AreaFrame.razor.cs | 13 +- WebWindowComplex/Compo/AreaFrameArcElem.razor | 8 +- .../Compo/AreaFrameArcElem.razor.cs | 59 +++-- WebWindowComplex/Compo/AreaHwOption.razor.cs | 6 +- WebWindowComplex/Compo/AreaSash.razor | 8 +- WebWindowComplex/Compo/AreaSash.razor.cs | 20 +- WebWindowComplex/Compo/AreaSashArcElem.razor | 6 +- .../Compo/AreaSashArcElem.razor.cs | 49 ++-- WebWindowComplex/Compo/AreaSplit.razor.cs | 4 +- .../Compo/CardArcElement.razor.cs | 2 +- WebWindowComplex/Compo/CardFill.razor.cs | 4 +- WebWindowComplex/Compo/CardFrame.razor.cs | 20 +- WebWindowComplex/Compo/CardSashGroup.razor | 2 +- WebWindowComplex/Compo/CardSashGroup.razor.cs | 23 +- WebWindowComplex/Compo/CardSplit.razor | 10 +- WebWindowComplex/Compo/CardSplit.razor.cs | 19 +- WebWindowComplex/Compo/CardTree.razor.cs | 24 +- .../Compo/EditFrameDimensions.razor.cs | 6 + WebWindowComplex/Compo/EditJoint.razor.cs | 7 + .../Compo/EditOptionCombo.razor.cs | 6 + .../Compo/EditOptionText.razor.cs | 6 + .../Compo/EditSplitDimensions.razor | 2 +- .../Compo/EditSplitDimensions.razor.cs | 18 ++ WebWindowComplex/Compo/General.razor.cs | 16 ++ WebWindowComplex/ItemTable.cs | 12 + WebWindowComplex/Json/JsonUtility.cs | 244 +++++++++--------- WebWindowComplex/Models/AGBOptionText.cs | 4 +- WebWindowComplex/Models/Area.cs | 172 +++++++++++- WebWindowComplex/Models/Frame.cs | 105 +++++--- WebWindowComplex/Models/FrameArcElement.cs | 10 +- WebWindowComplex/Models/FrameDimension.cs | 70 ++++- .../{ => Models}/ParametriOpzioni.cs | 68 ++--- WebWindowComplex/Models/Sash.cs | 242 ++++++++--------- WebWindowComplex/Models/SashArcElement.cs | 10 +- WebWindowComplex/Models/SashDimension.cs | 94 ++++--- WebWindowComplex/Models/Split.cs | 44 +++- WebWindowComplex/Models/SplitDimension.cs | 130 ++++++---- WebWindowComplex/Models/Window.cs | 2 +- WebWindowComplex/TableComp.razor | 8 +- WebWindowComplex/TableComp.razor.cs | 19 +- WebWindowComplex/WebWindowComplex.csproj | 34 ++- .../WebWindowConfigurator.csproj | 53 +++- WebWindowConfigurator/Window.cs | 110 +------- WebWindowTest/Models/Sash.cs | 16 +- 45 files changed, 1107 insertions(+), 682 deletions(-) rename WebWindowComplex/{ => Models}/ParametriOpzioni.cs (54%) diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs index 50f69ca..9995aad 100644 --- a/Test.UI/Components/Pages/EditJWD.razor.cs +++ b/Test.UI/Components/Pages/EditJWD.razor.cs @@ -127,8 +127,8 @@ namespace Test.UI.Components.Pages { ConfInit(); //InitialJwd = File.ReadAllText("Data\\FinestraSplitVert.jwd"); - //InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd"); - InitialJwd = File.ReadAllText("Data\\ArcoAntaDoppia.jwd"); + InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd"); + //InitialJwd = File.ReadAllText("Data\\ArcoAntaDoppia.jwd"); currJwd = InitialJwd; // rileggo altri dati await ReloadData(); diff --git a/WebWindowComplex/Compo/AreaFrame.razor.cs b/WebWindowComplex/Compo/AreaFrame.razor.cs index b9d1b94..b4c30d0 100644 --- a/WebWindowComplex/Compo/AreaFrame.razor.cs +++ b/WebWindowComplex/Compo/AreaFrame.razor.cs @@ -7,12 +7,21 @@ namespace WebWindowComplex.Compo { #region Public Properties + /// + /// Frame corrente + /// [CascadingParameter(Name = "CurrFrameWindow")] public Frame CurrFrameWindow { get; set; } = null!; + /// + /// Lista sash + /// [CascadingParameter(Name = "SashList")] public List SashList { get; set; } = null!; + /// + /// Lista split + /// [CascadingParameter(Name = "SplitList")] public List SplitList { get; set; } = null!; @@ -27,7 +36,7 @@ namespace WebWindowComplex.Compo #region Private Methods /// - /// Sollevo evento richiesta aggiunta sash + /// Sollevo evento richiesta aggiunta sash su frame /// /// private async Task RaiseAddSash() @@ -36,7 +45,7 @@ namespace WebWindowComplex.Compo } /// - /// Sollevo evento richiesta aggiunta window + /// Sollevo evento richiesta aggiunta split su frame /// /// private async Task RaiseAddSplit() diff --git a/WebWindowComplex/Compo/AreaFrameArcElem.razor b/WebWindowComplex/Compo/AreaFrameArcElem.razor index 0cdc13c..c167194 100644 --- a/WebWindowComplex/Compo/AreaFrameArcElem.razor +++ b/WebWindowComplex/Compo/AreaFrameArcElem.razor @@ -16,7 +16,7 @@ Qty element @if (insertQty) { - + @* *@ } else { @@ -27,7 +27,7 @@
- + @* *@
@@ -44,7 +44,7 @@ Section @if (!insertQty) { - + @* *@ } else { @@ -55,7 +55,7 @@
- + @* *@
diff --git a/WebWindowComplex/Compo/AreaFrameArcElem.razor.cs b/WebWindowComplex/Compo/AreaFrameArcElem.razor.cs index 5cc8d19..656101f 100644 --- a/WebWindowComplex/Compo/AreaFrameArcElem.razor.cs +++ b/WebWindowComplex/Compo/AreaFrameArcElem.razor.cs @@ -9,6 +9,9 @@ namespace WebWindowComplex.Compo { #region Public Properties + /// + /// Frame corrente + /// [Parameter] public Frame CurrFrame { get; set; } = null!; @@ -19,25 +22,25 @@ namespace WebWindowComplex.Compo #region Protected Properties - protected int ArcElementQty - { - get => CurrFrame.FrameArcElem.nQty; - set - { - CurrFrame.FrameArcElem.nQty = value; - _ = EC_UpdatePreview.InvokeAsync(CurrFrame); - } - } + //protected int ArcElementQty + //{ + // get => CurrFrame.FrameArcElem.nQty; + // set + // { + // CurrFrame.FrameArcElem.nQty = value; + // _ = EC_UpdatePreview.InvokeAsync(CurrFrame); + // } + //} - protected double ArcSection - { - get => CurrFrame.FrameArcElem.nSection; - set - { - CurrFrame.FrameArcElem.nSection = value; - _ = EC_UpdatePreview.InvokeAsync(CurrFrame); - } - } + //protected double ArcSection + //{ + // get => CurrFrame.FrameArcElem.nSection; + // set + // { + // CurrFrame.FrameArcElem.nSection = value; + // _ = EC_UpdatePreview.InvokeAsync(CurrFrame); + // } + //} #endregion Protected Properties @@ -48,17 +51,17 @@ namespace WebWindowComplex.Compo insertQty = !insertQty; } - protected void IsCheckCutEdge() - { - CurrFrame.FrameArcElem.bCutEdge = !CurrFrame.FrameArcElem.bCutEdge; - _ = EC_UpdatePreview.InvokeAsync(CurrFrame); - } + //protected void IsCheckCutEdge() + //{ + // CurrFrame.FrameArcElem.bCutEdge = !CurrFrame.FrameArcElem.bCutEdge; + // _ = EC_UpdatePreview.InvokeAsync(CurrFrame); + //} - protected void IsCheckAlign() - { - CurrFrame.FrameArcElem.bIsAlign = !CurrFrame.FrameArcElem.bIsAlign; - _ = EC_UpdatePreview.InvokeAsync(CurrFrame); - } + //protected void IsCheckAlign() + //{ + // CurrFrame.FrameArcElem.bIsAlign = !CurrFrame.FrameArcElem.bIsAlign; + // _ = EC_UpdatePreview.InvokeAsync(CurrFrame); + //} protected string IsUsedQty() { diff --git a/WebWindowComplex/Compo/AreaHwOption.razor.cs b/WebWindowComplex/Compo/AreaHwOption.razor.cs index ae1f6ff..c455ca6 100644 --- a/WebWindowComplex/Compo/AreaHwOption.razor.cs +++ b/WebWindowComplex/Compo/AreaHwOption.razor.cs @@ -15,7 +15,7 @@ namespace WebWindowComplex.Compo public Sash CurrSashGroup { get; set; } = null!; /// - /// Evento per aggiornare gli hardware option di tipo text + /// Evento per aggiornare gli hardware option /// [Parameter] public EventCallback EC_UpdateHwOpt { get; set; } @@ -80,12 +80,16 @@ namespace WebWindowComplex.Compo }; await EC_UpdateHwOpt.InvokeAsync(args); } + private bool IsLoadingHwOpt { get => IsLoading != null && IsLoading.Count > 0 && IsLoading.Contains("LoadHwOpt"); } } + /// + /// Classe per oggetto di aggiornamento delle opzioni + /// public class DataUpdateHwOption { public AGBOptionText AGBOptText { get; set; } = null; diff --git a/WebWindowComplex/Compo/AreaSash.razor b/WebWindowComplex/Compo/AreaSash.razor index 3ddd227..5474ae7 100644 --- a/WebWindowComplex/Compo/AreaSash.razor +++ b/WebWindowComplex/Compo/AreaSash.razor @@ -48,7 +48,7 @@
*@ } diff --git a/WebWindowComplex/Compo/AreaSash.razor.cs b/WebWindowComplex/Compo/AreaSash.razor.cs index c3cff0e..0719022 100644 --- a/WebWindowComplex/Compo/AreaSash.razor.cs +++ b/WebWindowComplex/Compo/AreaSash.razor.cs @@ -22,13 +22,13 @@ namespace WebWindowComplex.Compo public SashDimension CurrSashDim { get; set; } = null!; /// - /// Sash group corrente + /// Lista delle sash /// [CascadingParameter(Name = "SashList")] public List SashList { get; set; } = null!; /// - /// Sash dimension corrente + /// Modalità di visualizzazione (view /edit) /// [Parameter] public bool EditMode { get; set; } = false; @@ -80,6 +80,10 @@ namespace WebWindowComplex.Compo } } + /// + /// Metodo per avere il numero di decimali da usare nella form-input + /// + /// public int CssDecimals() { switch (CurrSashDim.MeasureType) @@ -133,7 +137,7 @@ namespace WebWindowComplex.Compo } /// - /// Selezione tipo di apertura anta + /// Inserimento dimensione anta /// protected double Dimension { @@ -160,7 +164,7 @@ namespace WebWindowComplex.Compo } /// - /// Report aggiornamento joint + /// Aggiornamento joint /// /// /// @@ -177,7 +181,7 @@ namespace WebWindowComplex.Compo } /// - /// Sollevo evento per cambiare l'anta su cui � presente la maniglia + /// Metodo per cambiare l'anta su cui è presente la maniglia /// /// private async Task ChangeHandle() @@ -253,11 +257,17 @@ namespace WebWindowComplex.Compo } private bool isOpen = false; + private void ToggleDropdown() { isOpen = !isOpen; } + /// + /// Metodo per determinare la visualizzazione dei pulsanti dei joint + /// + /// + /// private string ButtonJointCss(WebWindowComplex.Json.WindowConst.Joints type) { foreach (var item in CurrSashDim.JointList) diff --git a/WebWindowComplex/Compo/AreaSashArcElem.razor b/WebWindowComplex/Compo/AreaSashArcElem.razor index b68d1f9..4c0f3ae 100644 --- a/WebWindowComplex/Compo/AreaSashArcElem.razor +++ b/WebWindowComplex/Compo/AreaSashArcElem.razor @@ -16,7 +16,7 @@ Qty element @if (insertQty) { - + @* *@ } else { @@ -27,7 +27,7 @@
- + @* *@
@@ -44,7 +44,7 @@ Section @if (!insertQty) { - + @* *@ } else { diff --git a/WebWindowComplex/Compo/AreaSashArcElem.razor.cs b/WebWindowComplex/Compo/AreaSashArcElem.razor.cs index eff80f7..07e06d7 100644 --- a/WebWindowComplex/Compo/AreaSashArcElem.razor.cs +++ b/WebWindowComplex/Compo/AreaSashArcElem.razor.cs @@ -9,6 +9,9 @@ namespace WebWindowComplex.Compo { #region Public Properties + /// + /// Sash corrente + /// [Parameter] public Sash CurrSashGroup { get; set; } = null!; @@ -19,25 +22,25 @@ namespace WebWindowComplex.Compo #region Protected Properties - protected int ArcElementQty - { - get => CurrSashGroup.SashArcElem.nQty; - set - { - CurrSashGroup.SashArcElem.nQty = value; - _ = EC_UpdatePreview.InvokeAsync(CurrSashGroup); - } - } + //protected int ArcElementQty + //{ + // get => CurrSashGroup.SashArcElem.nQty; + // set + // { + // CurrSashGroup.SashArcElem.nQty = value; + // _ = EC_UpdatePreview.InvokeAsync(CurrSashGroup); + // } + //} - protected double ArcSection - { - get => CurrSashGroup.SashArcElem.nSection; - set - { - CurrSashGroup.SashArcElem.nSection = value; - _ = EC_UpdatePreview.InvokeAsync(CurrSashGroup); - } - } + //protected double ArcSection + //{ + // get => CurrSashGroup.SashArcElem.nSection; + // set + // { + // CurrSashGroup.SashArcElem.nSection = value; + // _ = EC_UpdatePreview.InvokeAsync(CurrSashGroup); + // } + //} #endregion Protected Properties @@ -48,11 +51,11 @@ namespace WebWindowComplex.Compo insertQty = !insertQty; } - protected void IsCheckCutEdge() - { - CurrSashGroup.SashArcElem.bCutEdge = !CurrSashGroup.SashArcElem.bCutEdge; - _ = EC_UpdatePreview.InvokeAsync(CurrSashGroup); - } + //protected void IsCheckCutEdge() + //{ + // CurrSashGroup.SashArcElem.bCutEdge = !CurrSashGroup.SashArcElem.bCutEdge; + // _ = EC_UpdatePreview.InvokeAsync(CurrSashGroup); + //} protected string IsUsedQty() { diff --git a/WebWindowComplex/Compo/AreaSplit.razor.cs b/WebWindowComplex/Compo/AreaSplit.razor.cs index a2d43a2..aba53c8 100644 --- a/WebWindowComplex/Compo/AreaSplit.razor.cs +++ b/WebWindowComplex/Compo/AreaSplit.razor.cs @@ -37,7 +37,7 @@ namespace WebWindowComplex.Compo #region Private Methods /// - /// Sollevo evento richiesta copia sash + /// Metodo per copiare sash /// /// private async Task RaiseCopySash(int indexCurrSash) @@ -53,7 +53,7 @@ namespace WebWindowComplex.Compo } /// - /// Sollevo evento richiesta aggiunta sash + /// Metodo per aggiungere prima sash /// /// private async Task RaiseAddSash() diff --git a/WebWindowComplex/Compo/CardArcElement.razor.cs b/WebWindowComplex/Compo/CardArcElement.razor.cs index 19bc564..6d9646a 100644 --- a/WebWindowComplex/Compo/CardArcElement.razor.cs +++ b/WebWindowComplex/Compo/CardArcElement.razor.cs @@ -9,7 +9,7 @@ namespace WebWindowComplex.Compo #region Public Properties /// - /// Finestra corrente + /// Frame corrente /// [Parameter] public Frame CurrFrame { get; set; } = null!; diff --git a/WebWindowComplex/Compo/CardFill.razor.cs b/WebWindowComplex/Compo/CardFill.razor.cs index 5ee1ddc..7b5c001 100644 --- a/WebWindowComplex/Compo/CardFill.razor.cs +++ b/WebWindowComplex/Compo/CardFill.razor.cs @@ -37,7 +37,7 @@ namespace WebWindowComplex.Compo #region Protected Methods /// - /// Sollevo evento per cambiare solo il Fill corrente + /// Metodo per cambiare solo il Fill corrente /// /// tipo di fill richiesto /// @@ -52,7 +52,7 @@ namespace WebWindowComplex.Compo #region Private Methods /// - /// Sollevo evento per tornare alla pagina Tree + /// Metodo per tornare alla pagina Tree /// private void ReqClose() { diff --git a/WebWindowComplex/Compo/CardFrame.razor.cs b/WebWindowComplex/Compo/CardFrame.razor.cs index e49e527..f0b3b16 100644 --- a/WebWindowComplex/Compo/CardFrame.razor.cs +++ b/WebWindowComplex/Compo/CardFrame.razor.cs @@ -53,6 +53,9 @@ namespace WebWindowComplex.Compo #region Protected Properties + /// + /// Metodo per selezionare shape + /// protected int SelShapeIndex { get => CurrFrameWindow.SelShapeIndex; @@ -79,6 +82,9 @@ namespace WebWindowComplex.Compo } } + /// + /// Selezione quantità bottom rail + /// protected int FrameBottomRailQty { get => CurrFrameWindow.BottomRailQty; @@ -106,7 +112,7 @@ namespace WebWindowComplex.Compo #region Private Methods /// - /// Sollevo evento richiesta aggiunta sash + /// Metodo per aggiungere sash /// /// private async Task AddSash() @@ -121,7 +127,7 @@ namespace WebWindowComplex.Compo } /// - /// Sollevo evento richiesta aggiunta window + /// Metodo per aggiungere window /// /// private async Task AddSplit() @@ -133,11 +139,12 @@ namespace WebWindowComplex.Compo svgNoHw = true }; await EC_ReqResetDictShape.InvokeAsync(); + await EC_ReqOptionHw.InvokeAsync(CurrFrameWindow); await EC_UpdatePreview.InvokeAsync(args); } /// - /// Sollevo evento richiesta copia sash + /// Metodo per cambiare tutti i joint /// /// private async Task ChangeAllJoints(Json.WindowConst.Joints JointType, Area a) @@ -188,7 +195,7 @@ namespace WebWindowComplex.Compo } /// - /// Report aggiornamento joint + /// Aggiornamento joint /// /// /// @@ -209,6 +216,11 @@ namespace WebWindowComplex.Compo } } + /// + /// Metodo per la visualizzazione dei pulsanti joint + /// + /// + /// private string ButtonJointCss(WebWindowComplex.Json.WindowConst.Joints type) { foreach (var item in CurrFrameWindow.JointList) diff --git a/WebWindowComplex/Compo/CardSashGroup.razor b/WebWindowComplex/Compo/CardSashGroup.razor index 9689706..aa9f8d7 100644 --- a/WebWindowComplex/Compo/CardSashGroup.razor +++ b/WebWindowComplex/Compo/CardSashGroup.razor @@ -115,7 +115,7 @@
  • -
  • diff --git a/WebWindowComplex/Compo/CardSashGroup.razor.cs b/WebWindowComplex/Compo/CardSashGroup.razor.cs index 8e4f4a2..37dbb4c 100644 --- a/WebWindowComplex/Compo/CardSashGroup.razor.cs +++ b/WebWindowComplex/Compo/CardSashGroup.razor.cs @@ -51,7 +51,7 @@ namespace WebWindowComplex.Compo public EventCallback EC_ReqFirstOptionHw { get; set; } /// - /// Evento per segnalare cambio hw e richiesta calcolo + /// Evento per segnalare aggiornamento /// [Parameter] public EventCallback EC_UpdatePreview { get; set; } @@ -63,7 +63,7 @@ namespace WebWindowComplex.Compo public List SashList { get; set; } = null!; /// - /// Lista di sash + /// Frame corrente /// [Parameter] public Frame FrameWindow { get; set; } = null!; @@ -188,7 +188,7 @@ namespace WebWindowComplex.Compo #region Protected Methods /// - /// Sollevo evento per rimuovere area + /// Metodo per rimuovere area /// /// area da rimuovere /// @@ -204,6 +204,11 @@ namespace WebWindowComplex.Compo await EC_UpdateFrame.InvokeAsync(args); } + /// + /// Metodo per scegliere tipo di misura + /// + /// + /// protected async Task SetMeasureType(MeasureTypes type) { isOpen = !isOpen; @@ -218,6 +223,11 @@ namespace WebWindowComplex.Compo await EC_UpdatePreview.InvokeAsync(args); } + /// + /// Metodo per aggiornare la sash dimension + /// + /// + /// protected async Task UpdateSashDimension(SashDimension updateSD) { var currRec = CurrSashGroup.SashList.First(x => x.nSashId == updateSD.nSashId); @@ -232,6 +242,11 @@ namespace WebWindowComplex.Compo } } + /// + /// Metodo per aggiornare sash + /// + /// + /// protected async Task UpdateSash(Sash updateS) { if (updateS != null) @@ -269,7 +284,7 @@ namespace WebWindowComplex.Compo } /// - /// Report aggiornamento Option Combo + /// Aggiornamento opzioni hardware /// /// /// diff --git a/WebWindowComplex/Compo/CardSplit.razor b/WebWindowComplex/Compo/CardSplit.razor index bffee85..bc3cb28 100644 --- a/WebWindowComplex/Compo/CardSplit.razor +++ b/WebWindowComplex/Compo/CardSplit.razor @@ -34,7 +34,7 @@
  • -
  • @@ -99,7 +99,7 @@
    @@ -197,14 +197,14 @@ EC_ReqClose="ReturnTree"> } - else if (currStep == CompileStep.ArcElement) + @* else if (currStep == CompileStep.ArcElement) { - } + } *@
    diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index 16fbfb4..e5232b2 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -117,9 +117,6 @@ namespace WebWindowComplex { if (m_CurrWindow != null) { - //m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview; - //m_CurrWindow.OnReqHwOption -= M_CurrWindow_OnHwOption; - //m_CurrWindow.OnReqShape -= M_CurrWindow_OnShape; m_CurrWindow = null; } } @@ -601,11 +598,11 @@ namespace WebWindowComplex new Joint(frame, 3, Joints.FULL_H), new Joint(frame, 4, Joints.FULL_H) }; - FrameArcElement ae = new FrameArcElement(frame, window, 10, true, true); + //FrameArcElement ae = new FrameArcElement(frame, window, 10, true, true); JsonWindow jsonWindow = new JsonWindow("Profilo78", "Pino", "Black", "Vetro BE 2S 4T/16/4T"); JsonFrame jsonFrame = new JsonFrame(Shapes.RECTANGLE, false, 0, 1); jsonWindow.AreaList.Add(jsonFrame); - jsonFrame.ArcElement = ae.Serialize(); + //jsonFrame.ArcElement = ae.Serialize(); foreach (var Dimension in DimensionList) jsonFrame.DimensionList.Add(Dimension.Serialize()); foreach (var Joint in JointList) @@ -684,8 +681,16 @@ namespace WebWindowComplex { for (int i = 0; i < 2; i++) m_CurrWindow.AreaList.First().DimensionList[i].dValue = m_PreviousWindow.AreaList.First().DimensionList[i].dValue; - for (int i = 0; i < 4; i++) - m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType); + if(m_CurrWindow.AreaList.First().Shape == Shapes.TRIANGLE) + { + for (int i = 0; i < 2; i++) + m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType); + } + else + { + for (int i = 0; i < 4; i++) + m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType); + } } if (m_CurrWindow != null) { diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index 27b6fa2..fde8c42 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.7.12.218 + 2.7.12.416 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -193,6 +193,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index ec2f12c..709fe2f 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.7.12.218 + 2.7.12.416 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -289,6 +289,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebWindowConfigurator/Window.cs b/WebWindowConfigurator/Window.cs index 223bd9b..c35b778 100644 --- a/WebWindowConfigurator/Window.cs +++ b/WebWindowConfigurator/Window.cs @@ -1011,114 +1011,12 @@ namespace WebWindowConfigurator } } - //private Hardware m_SelHardware; - //public Hardware SelHardware - //{ - // get - // { - // return m_SelHardware; - // } - // set - // { - // m_SelHardware = value; - // if (m_SelHardware != null && m_SelHardware.sId != "000000") - // { - // string sHwdOptPath = ""; - // var gf = EgtLuaCreateGlobTable("WDG"); - // var tft = EgtLuaSetGlobIntVar("WDG.AREAID", m_nAreaId); - // var tfy = EgtLuaSetGlobStringVar("WDG.HDWFAVOURITE", value.sId); - // SashDimension HandleSash = m_SashList.FirstOrDefault(x => x.bHasHandle); - // string sHandle = "Dx"; - // switch (GetOpeningSide(HandleSash.OpeningType)) - // { - // case object _ when OpeningSides.LEFT: - // { - // sHandle = "Sx"; - // break; - // } - - // case object _ when OpeningSides.RIGHT: - // { - // sHandle = "Dx"; - // break; - // } - // } - // var tfd = EgtLuaSetGlobStringVar("WDG.HDWHANDLE", sHandle); - // var tlt = EgtLuaCallFunction("WinCreate_GetHardwareOptionPath"); - // var tltf = EgtLuaGetGlobStringVar("WDG.HWDOPTPATH", sHwdOptPath); - // if (!string.IsNullOrWhiteSpace(sHwdOptPath)) - // { - // XmlSerializer serializer = new XmlSerializer(typeof(ParametriOpzioni)); - // ParametriOpzioni HwdOptions = null/* TODO Change to default(_) if this is not a reference type */; - // string sHdwOptPath = Path.ChangeExtension(sHwdOptPath, ".opt"); - // bool bHdwOptFound = false; - // for (var WaitIndex = 0; WaitIndex <= 100; WaitIndex++) - // { - // if (File.Exists(sHdwOptPath)) - // { - // bHdwOptFound = true; - // break; - // } - // System.Threading.Thread.Sleep(100); - // } - // if (bHdwOptFound) - // { - // string sHwdOptText = ""; - // try - // { - // sHwdOptText = File.ReadAllText(sHdwOptPath); - // } - // catch (Exception ex) - // { - // EgtOutLog("Hardware file opt not found or read!"); - // } - // if (!string.IsNullOrWhiteSpace(sHwdOptText)) - // { - // using (TextReader reader = new StringReader(sHwdOptText)) - // { - // HwdOptions = serializer.Deserialize(reader); - // } - // if (!IsNothing(HwdOptions)) - // { - // m_HwdOptionList.Clear(); - // foreach (var HdwOption in HwdOptions.Items) - // m_HwdOptionList.Add(new AGBOption(HdwOption)); - // NotifyPropertyChanged(nameof(HwdOptionList)); - // } - // } - // } - // var ud = EgtLuaResetGlobVar("WDG"); - // } - // } - // } - //} - - //internal void SetSelHardware(Hardware value) - //{ - // m_SelHardware = value; - //} - - //internal void SetSelHardwareFromId(string sId) - //{ - // m_SelHardware = m_HardwareList.FirstOrDefault(x => x.sId == sId); - // if (IsNothing(m_SelHardware)) - // m_SelHardware = m_HardwareList(0); - //} - - //internal void SetFirstHardware() - //{ - // if (m_HardwareList.Count > 0) - // { - // m_SelHardware = m_HardwareList(0); - // } - //} - - private ObservableCollection m_HwdOptionList = new ObservableCollection(); - public ObservableCollection HwdOptionList + private ObservableCollection m_HwOptionList = new ObservableCollection(); + public ObservableCollection HwOptionList { get { - return m_HwdOptionList; + return m_HwOptionList; } } @@ -1248,7 +1146,7 @@ namespace WebWindowConfigurator internal void RefreshHardwareOptionList() { - m_HwdOptionList.Clear(); + m_HwOptionList.Clear(); } internal OpeningSides GetOpeningSide(Openings OpeningType) diff --git a/WebWindowTest/Models/Sash.cs b/WebWindowTest/Models/Sash.cs index aaa2f6e..2ecb53d 100644 --- a/WebWindowTest/Models/Sash.cs +++ b/WebWindowTest/Models/Sash.cs @@ -78,7 +78,7 @@ namespace WebWindowTest.Models { get { - return m_HwdOptionList; + return m_HwOptionList; } } @@ -86,7 +86,7 @@ namespace WebWindowTest.Models { get { - return m_SelHwdOptionList; + return m_SelHwOptionList; } } @@ -652,7 +652,7 @@ namespace WebWindowTest.Models internal void RefreshHardwareOptionList() { - m_HwdOptionList.Clear(); + m_HwOptionList.Clear(); //ReqRefreshHwOption(); } @@ -718,19 +718,19 @@ namespace WebWindowTest.Models HwOptions = (ParametriOpzioni)serializer.Deserialize(reader); if (HwOptions.Items != null) { - m_HwdOptionList.Clear(); + m_HwOptionList.Clear(); foreach (var HwOption in HwOptions.Items) { switch (HwOption.Tipo) { case "Text": { - m_HwdOptionList.Add(new AGBOptionText(HwOption)); + m_HwOptionList.Add(new AGBOptionText(HwOption)); break; } case "List": { - m_HwdOptionList.Add(new AGBOptionCombo(HwOption)); + m_HwOptionList.Add(new AGBOptionCombo(HwOption)); break; } } @@ -873,8 +873,8 @@ namespace WebWindowTest.Models private string m_CurrShape = ""; private List m_HardwareList = new List(); - private List m_HwdOptionList = new List(); - private Dictionary m_SelHwdOptionList = new Dictionary(); + private List m_HwOptionList = new List(); + private Dictionary m_SelHwOptionList = new Dictionary(); private List m_JointList = new List();