From 73a338e5994a476bdaffa1aab57455837da102bb Mon Sep 17 00:00:00 2001 From: Annamaria Sassi Date: Tue, 23 Dec 2025 12:00:51 +0100 Subject: [PATCH] - Modificati nomi metodi sottocomponenti - Aggiornato readme --- README.md | 17 +- WebWindowComplex/Compo/AreaHwOption.razor.cs | 4 +- WebWindowComplex/Compo/AreaSash.razor | 170 ++++--- WebWindowComplex/Compo/AreaSash.razor.cs | 2 +- WebWindowComplex/Compo/CardFill.razor.cs | 4 +- WebWindowComplex/Compo/CardFrame.razor.cs | 26 +- WebWindowComplex/Compo/CardSashGroup.razor.cs | 35 +- WebWindowComplex/Compo/CardSplit.razor.cs | 36 +- .../Compo/EditSplitDimensions.razor.cs | 2 +- WebWindowComplex/Models/FrameDimension.cs | 178 ------- WebWindowComplex/Models/SashDimension.cs | 1 - WebWindowComplex/TableComp.razor | 457 +++++++++--------- WebWindowComplex/WebWindowComplex.csproj | 21 +- .../WebWindowConfigurator.csproj | 21 +- 14 files changed, 405 insertions(+), 569 deletions(-) diff --git a/README.md b/README.md index 6b6d784..9809ebd 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ I requisiti per utilizzare il componente sono: - Lista dei materiali; - Lista dei colori dei materiali; - Lista dei vetri ammessi; - - Lista dei profili gestiti. + - Lista dei profili gestiti; + - Lista delle soglie associate al profilo selezionato. ## Funzionalità componente @@ -36,7 +37,7 @@ Un serramento è composto da un determinato tipo di elementi: - Gruppo ante (facoltativo) - Riempimento (obbligatorio almeno un riempimento) -All'intero serramento sono associate le seguenti caratteristiche: +Al serramento sono associate le seguenti caratteristiche: - Profilo; - Materiale; - Vetro; @@ -89,7 +90,7 @@ Al gruppo di ante sono associate le seguenti caratteristiche: La singola anta ha associate le seguenti caratteristiche: - Tipologia di apertura; - Dimensione; - - Tipo di misura per la dimensione (assoluta, percentuale o proporzionale) + - Tipo di misura della dimensione (assoluta, percentuale o proporzionale); - Presenza maniglia; - Giunti. @@ -120,15 +121,9 @@ Vengono richieste nei seguenti casi: - Click sul pulsante per visualizzarle; - Cambiamento nel numero di ante; - Cambiamento nella selezione dell'hardware; - - Cambiamento nella selezione della famiglia hardware. + - Cambiamento nella selezione della famiglia hardware; + - Cambiamento di un valore delle opzioni hardware. ### Riempimento (Fill) Descrive il tipo di riempimento: vetro o pannello. - -## Roadmap - - -## License -For open source projects, say how it is licensed. - diff --git a/WebWindowComplex/Compo/AreaHwOption.razor.cs b/WebWindowComplex/Compo/AreaHwOption.razor.cs index e116b4c..ecdf397 100644 --- a/WebWindowComplex/Compo/AreaHwOption.razor.cs +++ b/WebWindowComplex/Compo/AreaHwOption.razor.cs @@ -92,7 +92,7 @@ namespace WebWindowComplex.Compo /// public class DataUpdateHwOption { - public AGBOptionText AGBOptText { get; set; } = null; - public AGBOptionCombo AGBOptCombo { get; set; } = null; + public AGBOptionText AGBOptText { get; set; } = null!; + public AGBOptionCombo AGBOptCombo { get; set; } = null!; } } \ No newline at end of file diff --git a/WebWindowComplex/Compo/AreaSash.razor b/WebWindowComplex/Compo/AreaSash.razor index 6549e5b..65f44cf 100644 --- a/WebWindowComplex/Compo/AreaSash.razor +++ b/WebWindowComplex/Compo/AreaSash.razor @@ -80,96 +80,94 @@ } else { - @*
*@ -
-
Sash @(CurrSashGroup.SashList.Count == 1 ? "" : (IndexSash + 1))
- @if (!(CurrAnta.AreaList[0] is Split)) - { -
- +
+
Sash @(CurrSashGroup.SashList.Count == 1 ? "" : (IndexSash + 1))
+ @if (!(CurrAnta.AreaList[0] is Split)) + { +
+ +
+
+ +
+ } + +
+
+
+
+ +
-
- +
+ Dimension + + @* *@ +
- } - -
-
-
-
- - +
+
+
-
- Dimension - - @* *@ - +
+
-
-
- -
-
- -
-
-
-
-
-
-
Joints
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
- @foreach (Joint joint in CurrSashDim.JointList) - { - - }
- @*
*@ +
+
+
+
Joints
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ @foreach (Joint joint in CurrSashDim.JointList) + { + + } +
+
} diff --git a/WebWindowComplex/Compo/AreaSash.razor.cs b/WebWindowComplex/Compo/AreaSash.razor.cs index 8a939ed..de761d2 100644 --- a/WebWindowComplex/Compo/AreaSash.razor.cs +++ b/WebWindowComplex/Compo/AreaSash.razor.cs @@ -170,7 +170,7 @@ namespace WebWindowComplex.Compo { if (CurrSashDim.dDimension != value) { - CurrSashDim.dDimension = value; + CurrSashDim.dDimension = (double)Math.Round((decimal)value, CssDecimals()); _ = EC_UpdateSashDim.InvokeAsync(CurrSashDim); } } diff --git a/WebWindowComplex/Compo/CardFill.razor.cs b/WebWindowComplex/Compo/CardFill.razor.cs index 7b5c001..049f5b9 100644 --- a/WebWindowComplex/Compo/CardFill.razor.cs +++ b/WebWindowComplex/Compo/CardFill.razor.cs @@ -24,7 +24,7 @@ namespace WebWindowComplex.Compo /// Evento per cambiare tutti i fill /// [Parameter] - public EventCallback EC_UpdatePreviewFill { get; set; } + public EventCallback EC_UpdateFill { get; set; } /// /// Evento per tornare nella pagine Tree @@ -44,7 +44,7 @@ namespace WebWindowComplex.Compo protected async Task ChangeOneFill(FillTypes reqFillType) { CurrFill.SetFillType(reqFillType); - await EC_UpdatePreviewFill.InvokeAsync(CurrFill); + await EC_UpdateFill.InvokeAsync(CurrFill); } #endregion Protected Methods diff --git a/WebWindowComplex/Compo/CardFrame.razor.cs b/WebWindowComplex/Compo/CardFrame.razor.cs index 4638656..fa9656c 100644 --- a/WebWindowComplex/Compo/CardFrame.razor.cs +++ b/WebWindowComplex/Compo/CardFrame.razor.cs @@ -18,7 +18,7 @@ namespace WebWindowComplex.Compo /// Evento per richiedere reset dizionario Shape /// [Parameter] - public EventCallback EC_ReqResetDictShape { get; set; } + public EventCallback EC_ReqResetDict { get; set; } /// /// Evento per richiedere opzioni hardware @@ -30,7 +30,7 @@ namespace WebWindowComplex.Compo /// Evento per richiesta calcolo preview /// [Parameter] - public EventCallback EC_UpdatePreview { get; set; } + public EventCallback EC_UpdateFrame { get; set; } /// /// Frame corrente @@ -66,7 +66,7 @@ namespace WebWindowComplex.Compo { CurrFrameWindow.SelShapeIndex = value; // richiesta reset dict shape - _ = EC_ReqResetDictShape.InvokeAsync(new DataUpdateRes { req = LayoutConst.DataAction.ResetDictShape}); + _ = EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = LayoutConst.DataAction.ResetDictShape}); foreach(var s in SashList) { s.SelHardwareFromId = "000000"; @@ -76,7 +76,7 @@ namespace WebWindowComplex.Compo currFrame = CurrFrameWindow, svgNoHw = true }; - _ = EC_UpdatePreview.InvokeAsync(args); + _ = EC_UpdateFrame.InvokeAsync(args); } } } @@ -97,7 +97,7 @@ namespace WebWindowComplex.Compo currFrame = CurrFrameWindow, svgNoHw = false }; - _ = EC_UpdatePreview.InvokeAsync(args); + _ = EC_UpdateFrame.InvokeAsync(args); } } } @@ -122,7 +122,7 @@ namespace WebWindowComplex.Compo currFrame = CurrFrameWindow, svgNoHw = false }; - _ = EC_UpdatePreview.InvokeAsync(args); + _ = EC_UpdateFrame.InvokeAsync(args); } } } @@ -143,7 +143,7 @@ namespace WebWindowComplex.Compo currFrame = CurrFrameWindow, svgNoHw = true }; - await EC_UpdatePreview.InvokeAsync(args); + await EC_UpdateFrame.InvokeAsync(args); } /// @@ -158,9 +158,9 @@ namespace WebWindowComplex.Compo currFrame = CurrFrameWindow, svgNoHw = true }; - await EC_ReqResetDictShape.InvokeAsync(new DataUpdateRes { req=LayoutConst.DataAction.ResetDictShape}); + await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req=LayoutConst.DataAction.ResetDictShape}); await EC_ReqOptionHw.InvokeAsync(CurrFrameWindow); - await EC_UpdatePreview.InvokeAsync(args); + await EC_UpdateFrame.InvokeAsync(args); } /// @@ -181,7 +181,7 @@ namespace WebWindowComplex.Compo currFrame = CurrFrameWindow, svgNoHw = false }; - await EC_UpdatePreview.InvokeAsync(args); + await EC_UpdateFrame.InvokeAsync(args); } /// @@ -209,8 +209,8 @@ namespace WebWindowComplex.Compo currFrame = CurrFrameWindow, svgNoHw = true }; - await EC_ReqResetDictShape.InvokeAsync(new DataUpdateRes { req = LayoutConst.DataAction.ResetDictShape }); - await EC_UpdatePreview.InvokeAsync(args); + await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = LayoutConst.DataAction.ResetDictShape }); + await EC_UpdateFrame.InvokeAsync(args); } } @@ -232,7 +232,7 @@ namespace WebWindowComplex.Compo currFrame = CurrFrameWindow, svgNoHw = false }; - await EC_UpdatePreview.InvokeAsync(args); + await EC_UpdateFrame.InvokeAsync(args); } } diff --git a/WebWindowComplex/Compo/CardSashGroup.razor.cs b/WebWindowComplex/Compo/CardSashGroup.razor.cs index 34ef42b..ef07d75 100644 --- a/WebWindowComplex/Compo/CardSashGroup.razor.cs +++ b/WebWindowComplex/Compo/CardSashGroup.razor.cs @@ -31,13 +31,7 @@ namespace WebWindowComplex.Compo /// Evento per richiedere reset dizionario Shape /// [Parameter] - public EventCallback EC_ReqResetDictShape { get; set; } - - /// - /// Evento per richiedere reset dizionario Hw option - /// - [Parameter] - public EventCallback EC_ReqResetDictHwOpt { get; set; } + public EventCallback EC_ReqResetDict { get; set; } /// /// Evento per richiedere opzioni hardware @@ -55,7 +49,7 @@ namespace WebWindowComplex.Compo /// Evento per segnalare aggiornamento /// [Parameter] - public EventCallback EC_UpdatePreview { get; set; } + public EventCallback EC_UpdateSashGroup { get; set; } /// /// Lista di sash @@ -89,8 +83,7 @@ namespace WebWindowComplex.Compo currSash = CurrSashGroup, svgNoHw = true }; - _ = EC_UpdatePreview.InvokeAsync(args); - //_ = EC_ReqResetDictShape.InvokeAsync(true); + _ = EC_UpdateSashGroup.InvokeAsync(args); _ = EC_ReqOptionHw.InvokeAsync(CurrSashGroup); } } @@ -115,7 +108,7 @@ namespace WebWindowComplex.Compo { currSash = CurrSashGroup }; - _ = EC_UpdatePreview.InvokeAsync(args); + _ = EC_UpdateSashGroup.InvokeAsync(args); } } } @@ -135,7 +128,7 @@ namespace WebWindowComplex.Compo { currSash = CurrSashGroup }; - _ = EC_UpdatePreview.InvokeAsync(args); + _ = EC_UpdateSashGroup.InvokeAsync(args); } } } @@ -156,8 +149,8 @@ namespace WebWindowComplex.Compo currSash = CurrSashGroup, svgNoHw = true }; - _ = EC_UpdatePreview.InvokeAsync(args); - _ = EC_ReqResetDictHwOpt.InvokeAsync(new DataUpdateRes { req = DataAction.ResetHwOpt}); + _ = EC_UpdateSashGroup.InvokeAsync(args); + _ = EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetHwOpt}); _ = EC_ReqOptionHw.InvokeAsync(CurrSashGroup); } } @@ -178,7 +171,7 @@ namespace WebWindowComplex.Compo { currSash = CurrSashGroup }; - _ = EC_UpdatePreview.InvokeAsync(args); + _ = EC_UpdateSashGroup.InvokeAsync(args); _ = EC_ReqOptionHw.InvokeAsync(CurrSashGroup); } } @@ -201,7 +194,7 @@ namespace WebWindowComplex.Compo currFrame = FrameWindow }; // richiesta reset dict shape - await EC_ReqResetDictShape.InvokeAsync(new DataUpdateRes { req=DataAction.ResetDictShape}); + await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req=DataAction.ResetDictShape}); await EC_UpdateFrame.InvokeAsync(args); await EC_ReqClose.InvokeAsync(true); } @@ -222,7 +215,7 @@ namespace WebWindowComplex.Compo { currSash = CurrSashGroup }; - await EC_UpdatePreview.InvokeAsync(args); + await EC_UpdateSashGroup.InvokeAsync(args); } /// @@ -240,7 +233,7 @@ namespace WebWindowComplex.Compo { currSash = CurrSashGroup }; - await EC_UpdatePreview.InvokeAsync(args); + await EC_UpdateSashGroup.InvokeAsync(args); } } @@ -258,7 +251,7 @@ namespace WebWindowComplex.Compo { currSash = CurrSashGroup }; - await EC_UpdatePreview.InvokeAsync(args); + await EC_UpdateSashGroup.InvokeAsync(args); } } @@ -306,7 +299,7 @@ namespace WebWindowComplex.Compo { currSash = CurrSashGroup }; - await EC_UpdatePreview.InvokeAsync(args); + await EC_UpdateSashGroup.InvokeAsync(args); await EC_ReqOptionHw.InvokeAsync(CurrSashGroup); } } @@ -322,7 +315,7 @@ namespace WebWindowComplex.Compo { currSash = CurrSashGroup }; - await EC_UpdatePreview.InvokeAsync(args); + await EC_UpdateSashGroup.InvokeAsync(args); await EC_ReqOptionHw.InvokeAsync(CurrSashGroup); } } diff --git a/WebWindowComplex/Compo/CardSplit.razor.cs b/WebWindowComplex/Compo/CardSplit.razor.cs index 6cf3404..0ccbd3f 100644 --- a/WebWindowComplex/Compo/CardSplit.razor.cs +++ b/WebWindowComplex/Compo/CardSplit.razor.cs @@ -34,22 +34,16 @@ namespace WebWindowComplex.Compo public Frame FrameWindow { get; set; } = null!; /// - /// Evento per richiedere reset dizionario Shape + /// Evento per richiedere reset dizionario /// [Parameter] - public EventCallback EC_ReqResetDictShape { get; set; } - - /// - /// Evento per richiedere reset dizionario opzioni hardware - /// - [Parameter] - public EventCallback EC_ReqResetDictHwOpt { get; set; } + public EventCallback EC_ReqResetDict { get; set; } /// /// Evento per aggiornare Split /// [Parameter] - public EventCallback EC_UpdatePreview { get; set; } + public EventCallback EC_UpdateSplit { get; set; } /// /// Evento per aggiornare Frame @@ -75,8 +69,8 @@ namespace WebWindowComplex.Compo currSplit = CurrSplit, svgNoHw = true }; - await EC_ReqResetDictShape.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape }); - await EC_UpdatePreview.InvokeAsync(args); + await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape }); + await EC_UpdateSplit.InvokeAsync(args); } /// @@ -92,7 +86,7 @@ namespace WebWindowComplex.Compo currFrame = FrameWindow }; // richiesta reset dict shape - await EC_ReqResetDictShape.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape }); + await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape }); await EC_UpdateFrame.InvokeAsync(args); await EC_ReqClose.InvokeAsync(true); } @@ -115,10 +109,10 @@ namespace WebWindowComplex.Compo }; if (SearchSash(CurrSplit)) { - _ = EC_ReqResetDictShape.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape }); - _ = EC_ReqResetDictHwOpt.InvokeAsync(new DataUpdateRes { req = DataAction.ResetHwOpt }); + _ = EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape }); + _ = EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetHwOpt }); } - _ = EC_UpdatePreview.InvokeAsync(args); + _ = EC_UpdateSplit.InvokeAsync(args); } } } @@ -148,7 +142,7 @@ namespace WebWindowComplex.Compo { currSplit = CurrSplit }; - _ = EC_UpdatePreview.InvokeAsync(args); + _ = EC_UpdateSplit.InvokeAsync(args); } } } @@ -169,7 +163,7 @@ namespace WebWindowComplex.Compo { currSplit = CurrSplit }; - _ = EC_UpdatePreview.InvokeAsync(args); + _ = EC_UpdateSplit.InvokeAsync(args); } } } @@ -196,8 +190,8 @@ namespace WebWindowComplex.Compo { currSplit = CurrSplit }; - await EC_ReqResetDictShape.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape }); - await EC_UpdatePreview.InvokeAsync(args); + await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape }); + await EC_UpdateSplit.InvokeAsync(args); } } @@ -219,7 +213,7 @@ namespace WebWindowComplex.Compo { currSplit = CurrSplit }; - await EC_UpdatePreview.InvokeAsync(args); + await EC_UpdateSplit.InvokeAsync(args); } /// @@ -289,7 +283,7 @@ namespace WebWindowComplex.Compo { currSplit = CurrSplit }; - await EC_UpdatePreview.InvokeAsync(args); + await EC_UpdateSplit.InvokeAsync(args); } } diff --git a/WebWindowComplex/Compo/EditSplitDimensions.razor.cs b/WebWindowComplex/Compo/EditSplitDimensions.razor.cs index 18114cd..8083619 100644 --- a/WebWindowComplex/Compo/EditSplitDimensions.razor.cs +++ b/WebWindowComplex/Compo/EditSplitDimensions.razor.cs @@ -42,7 +42,7 @@ namespace WebWindowComplex.Compo { if (CurrRec.dDimension != value) { - CurrRec.dDimension = value; + CurrRec.dDimension = (double)Math.Round((decimal)value, CssDecimals()); var args = new DataUpdateSplitDimension() { currSplit = CurrRec, diff --git a/WebWindowComplex/Models/FrameDimension.cs b/WebWindowComplex/Models/FrameDimension.cs index 2235cef..dbde1c9 100644 --- a/WebWindowComplex/Models/FrameDimension.cs +++ b/WebWindowComplex/Models/FrameDimension.cs @@ -159,190 +159,12 @@ namespace WebWindowComplex.Models #region Internal Methods - ///// - ///// Cerca nell'albero gli oggetti Sash e Split per associare la larghezza - ///// - ///// - //protected void SearchAreaList(Area node) - //{ - // if (node != null) - // { - // if (node.AreaType.Equals(AreaTypes.SASH)) - // UpdateDimSubArea((Sash)node); - // else if (node.AreaType.Equals(AreaTypes.SPLIT)) - // UpdateDimSubArea((Split)node); - // foreach (var item in node.AreaList) - // { - // SearchAreaList(item); - // } - // } - //} - - //protected void UpdateDimSubArea(Area area) - //{ - // if(area is Sash && sName.Equals("Width")) - // { - // Sash sash = (Sash)area; - // int countAbsolute = sash.SashList.Where(x => x.MeasureType.Equals(MeasureTypes.ABSOLUTE)).Count(); - // int countProportional = sash.SashList.Where(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL)).Count(); - // int countPercentage = sash.SashList.Where(x => x.MeasureType.Equals(MeasureTypes.PERCENTAGE)).Count(); - // double widthTot = 0; - // if (sash.ParentArea is Frame) - // { - // widthTot = ParentFrame.CalculateWidthArea(ParentFrame, ParentFrame.DimensionList.First(x => x.m_sName.Equals("Width")).dValue); - // } - // else - // { - // Split s = (Split)sash.ParentArea.ParentArea; - // int index = s.AreaList.First().AreaList.IndexOf(sash); - // widthTot = s.CalculateWidthArea(s, s.SplitVertList.ElementAt(index).dDimension); - // } - // if (countAbsolute == sash.SashList.Count) - // { - // double sum = sash.SashList.Sum(x => x.dDimension); - // double res = widthTot - sum; - // if (res > 0) - // { - // foreach (var sashDim in sash.SashList) - // { - // sashDim.SetDimension(sashDim.dDimension + res / countAbsolute); - // } - // } - // else - // { - // foreach (var sashDim in sash.SashList) - // { - // // Sommo perchè res è negativo - // sashDim.SetDimension(sashDim.dDimension + res / countAbsolute); - // } - // } - // } - // else if (countAbsolute < sash.SashList.Count) - // { - // if (countPercentage > 0 && countPercentage <= sash.SashList.Count && countProportional == 0) - // { - // double sumAbsolute = sash.SashList.Where(x => x.MeasureType.Equals(MeasureTypes.ABSOLUTE)).Sum(x => x.dDimension); - // var percentageList = sash.SashList.Where(x => x.MeasureType.Equals(MeasureTypes.PERCENTAGE)).ToList(); - // foreach(var i in percentageList) - // { - // i.SetDimension(ConvertIn((widthTot - sumAbsolute) / countPercentage, i.MeasureType, widthTot, sash)); - // } - // } - // } - // } - // else if(area is Split) - // { - // Split split = (Split)area; - // List splitList = null; - // if (sName.Equals("Width")) - // splitList = split.SplitVertList; - // else - // splitList = split.SplitHorizList; - // int countAbsolute = splitList.Where(x => x.MeasureType.Equals(MeasureTypes.ABSOLUTE)).Count(); - // double widthTot = 0; - // if (split.ParentArea is Frame) - // { - // widthTot = ParentFrame.CalculateWidthArea(ParentFrame, ParentFrame.DimensionList.First(x => x.m_sName.Equals("Width")).dValue); - // } - // else - // { - // Sash s = (Sash)split.ParentArea.ParentArea; - // int index = -1; - // if (s.AreaList.First().AreaList.IndexOf(split) != -1) - // index = s.AreaList.First().AreaList.IndexOf(split); - // else - // index = s.AreaList.Last().AreaList.IndexOf(split); - // widthTot = s.CalculateWidthArea(s, s.SashList.ElementAt(index).dDimension); - // } - // if (countAbsolute != 0 && countAbsolute == splitList.Count) - // { - // double sum = splitList.Sum(x => x.dDimension); - // double res = widthTot - sum; - // if (res > 0) - // { - // foreach (var sashDim in splitList) - // { - // sashDim.SetDimension(sashDim.dDimension + res / countAbsolute); - // } - // } - // else - // { - // foreach (var sashDim in splitList) - // { - // // Sommo perchè res è negativo - // sashDim.SetDimension(sashDim.dDimension + res / countAbsolute); - // } - // } - // } - // } - //} - - //internal void SetDimension(double dValue) - //{ - // m_dDimension = dValue; - //} - internal JsonFrameDimension Serialize() { JsonFrameDimension JsonFrameDimension = new JsonFrameDimension(m_nIndex, m_sName, m_dDimension); return JsonFrameDimension; } - /// - /// Metodo per convertire una dimensione da un valore assoluto al suo rispettivo tipo - /// - /// Valore assoluto - /// Tipo di misura della dimensione - /// Larghezza totale - /// - //internal double ConvertIn(double absoluteVal, MeasureTypes type, double widthTot, Sash sash) - //{ - // switch (type) - // { - // case MeasureTypes.ABSOLUTE: - // { - // return absoluteVal; - // } - // case MeasureTypes.PROPORTIONAL: - // { - // return ProportionalFromAbsoluteVal(absoluteVal, widthTot, sash); - // } - // case MeasureTypes.PERCENTAGE: - // { - // return (absoluteVal / widthTot) * 100; - // } - // } - // return -1; - //} - - /// - /// Metodo per trasformare il valore proporzionale in assoluto - /// - /// - //internal double ProportionalFromAbsoluteVal(double absoluteVal, double widthTot, Sash sash) - //{ - // double tot = widthTot; - // List adList = new List(); - // foreach (var it in sash.SashList) - // { - // adList.Add(new AreaDimension(it.m_dDimension, it.SelMeasureType)); - // } - // //Somma misura non proporzionali - // double sumNotProp = sash.SashList - // .Where(m => m.MeasureType != MeasureTypes.PROPORTIONAL) - // .Sum(m => m.CalculateAbsoluteValue(adList, tot)); - // //Calcolo residuo - // double res = tot - sumNotProp; - // if (res < 0) res = 0; - // //Misure proporzionali - // var proportionalList = sash.SashList - // .Where(m => m.SelMeasureType == MeasureTypes.PROPORTIONAL) - // .ToList(); - // double sumPesi = proportionalList.Sum(p => p.m_dDimension); - // if (sumPesi == 0) sumPesi = 1; - // return res / sumPesi * absoluteVal; - //} - #endregion Internal Methods #region Protected Fields diff --git a/WebWindowComplex/Models/SashDimension.cs b/WebWindowComplex/Models/SashDimension.cs index da3b283..5a4425e 100644 --- a/WebWindowComplex/Models/SashDimension.cs +++ b/WebWindowComplex/Models/SashDimension.cs @@ -138,7 +138,6 @@ namespace WebWindowComplex.Models } set { - //double widthTot = CalculateWidthSashGroup(m_Parent.ParentWindow.AreaList.FirstOrDefault(), m_Parent.ParentWindow.AreaList.FirstOrDefault().DimensionList.Where(x => x.sName == "Width").First().dValue); double widthTot = CalculateWidthSashGroup(m_Parent.ParentWindow.AreaList.FirstOrDefault(), m_Parent.ParentWindow.AreaList.FirstOrDefault().DimensionList.Where(x => x.sName == "Width").First().dDimension); double valMinAbsolute = 200; double valMaxAbsolute = widthTot - valMinAbsolute * (m_Parent.SashList.Count - 1); diff --git a/WebWindowComplex/TableComp.razor b/WebWindowComplex/TableComp.razor index ea69c70..b79d269 100644 --- a/WebWindowComplex/TableComp.razor +++ b/WebWindowComplex/TableComp.razor @@ -1,231 +1,228 @@ -@using static WebWindowComplex.LayoutConst -
- @if (isLoading) - { - - } - else - { - if (listErrPre != null && listErrPre.Count > 0) - { -
-
Errori validazione!
-
- -
    - @foreach (var item in listErrPre) - { -
  • @item.Value
  • - } -
-
-
- } - @* else if (listErrLink != null && listErrLink.Count > 0) - { -
-
Errore configurazione:
-
-
    - @foreach (var item in listErrLink) - { -
  • @item.Value
  • - } -
-
-
- } *@ - else - { -
-
-
-
-
- -
-
-
- -
-
- -
-
- -
-
-
-
-
- @if (currStep == CompileStep.Tree) - { - - - } - else if (currStep == CompileStep.Frame) - { - @if (m_CurrWindow != null) - { - m_PreviousWindow = m_CurrWindow; - } - - - - - - - - - } - else if (currStep == CompileStep.Split) - { - @if (currSplitIndex >= SplitList.Count || currSplitIndex == -1) - { - currStep = CompileStep.Tree; - } - else - { - - - } - } - else if (currStep == CompileStep.Sash) - { - @if (currSashIndex >= SashList.Count || currSashIndex == -1) - { - currStep = CompileStep.Tree; - } - else - { - - - - - - - - - } - } - else if (currStep == CompileStep.Fill) - { - @if (currFillIndex >= FillList.Count || currFillIndex == -1) - { - currStep = CompileStep.Tree; - } - else - { - - -
-
-
-
-
All fill
-
-
- -
-
- -
-
-
-
- Splitted currSplitted = SplittedList.Where(x => x.AreaList.First().Equals(FillList[currFillIndex])).FirstOrDefault(); - @if (currSplitted != null) { - - - } - @* @foreach (var currSplitted in m_SplittedList) - { - @if (currSplitted.AreaList.First().Equals(FillList[currFillIndex])) - { - - } - } *@ - } - } - else if (currStep == CompileStep.General) - { - - - } - @* else if (currStep == CompileStep.ArcElement) - { - - - } *@ -
-
-
-
- @outSvg -
- if (listWarnings != null && listWarnings.Count > 0) - { -
-
Mancata corrispondenza valori:
-
-
    - @foreach (var item in listWarnings) - { -
  • @item.Value
  • - } -
-
-
- } - } - } +@using static WebWindowComplex.LayoutConst +
+ @if (isLoading) + { + + } + else + { + if (listErrPre != null && listErrPre.Count > 0) + { +
+
Errori validazione!
+
+ +
    + @foreach (var item in listErrPre) + { +
  • @item.Value
  • + } +
+
+
+ } + @* else if (listErrLink != null && listErrLink.Count > 0) + { +
+
Errore configurazione:
+
+
    + @foreach (var item in listErrLink) + { +
  • @item.Value
  • + } +
+
+
+ } *@ + else + { +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+
+
+ @if (currStep == CompileStep.Tree) + { + + + } + else if (currStep == CompileStep.Frame) + { + @if (m_CurrWindow != null) + { + m_PreviousWindow = m_CurrWindow; + } + + + + + + + + + } + else if (currStep == CompileStep.Split) + { + @if (currSplitIndex >= SplitList.Count || currSplitIndex == -1) + { + currStep = CompileStep.Tree; + } + else + { + + + } + } + else if (currStep == CompileStep.Sash) + { + @if (currSashIndex >= SashList.Count || currSashIndex == -1) + { + currStep = CompileStep.Tree; + } + else + { + + + + + + + + + } + } + else if (currStep == CompileStep.Fill) + { + @if (currFillIndex >= FillList.Count || currFillIndex == -1) + { + currStep = CompileStep.Tree; + } + else + { + + +
+
+
+
+
All fill
+
+
+ +
+
+ +
+
+
+
+ Splitted currSplitted = SplittedList.Where(x => x.AreaList.First().Equals(FillList[currFillIndex])).FirstOrDefault(); + @if (currSplitted != null) { + + + } + @* @foreach (var currSplitted in m_SplittedList) + { + @if (currSplitted.AreaList.First().Equals(FillList[currFillIndex])) + { + + } + } *@ + } + } + else if (currStep == CompileStep.General) + { + + + } + @* else if (currStep == CompileStep.ArcElement) + { + + + } *@ +
+
+
+
+ @outSvg +
+ if (listWarnings != null && listWarnings.Count > 0) + { +
+
Mancata corrispondenza valori:
+
+
    + @foreach (var item in listWarnings) + { +
  • @item.Value
  • + } +
+
+
+ } + } + }
\ No newline at end of file diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index c325db4..9c097fd 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.7.12.2212 + 2.7.12.2311 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -394,6 +394,25 @@ + + + + + + + + + + + + + + + + + + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 4c4311f..54f2407 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.7.12.2212 + 2.7.12.2311 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -505,6 +505,25 @@ + + + + + + + + + + + + + + + + + + +