diff --git a/WebWindowComplex/Compo/AreaFrame.razor b/WebWindowComplex/Compo/AreaFrame.razor index 38788d6..2d24c3b 100644 --- a/WebWindowComplex/Compo/AreaFrame.razor +++ b/WebWindowComplex/Compo/AreaFrame.razor @@ -20,6 +20,14 @@ } +
+ @if (!(CurrFrameWindow.AreaList[0] is Inglesina)) + { +
+ +
+ } +
\ No newline at end of file diff --git a/WebWindowComplex/Compo/AreaFrame.razor.cs b/WebWindowComplex/Compo/AreaFrame.razor.cs index 5e39ecf..a2db2f1 100644 --- a/WebWindowComplex/Compo/AreaFrame.razor.cs +++ b/WebWindowComplex/Compo/AreaFrame.razor.cs @@ -31,6 +31,9 @@ namespace WebWindowComplex.Compo [Parameter] public EventCallback EC_AddSplit { get; set; } + [Parameter] + public EventCallback EC_AddInglesina { get; set; } + #endregion Public Properties #region Private Methods @@ -53,6 +56,15 @@ namespace WebWindowComplex.Compo return EC_AddSplit.InvokeAsync(true); } + /// + /// Sollevo evento richiesta aggiunta inglesina su frame + /// + /// + private Task RaiseAddInglesina() + { + return EC_AddInglesina.InvokeAsync(true); + } + #endregion Private Methods } } \ No newline at end of file diff --git a/WebWindowComplex/Compo/CardFrame.razor b/WebWindowComplex/Compo/CardFrame.razor index fc89036..bbec106 100644 --- a/WebWindowComplex/Compo/CardFrame.razor +++ b/WebWindowComplex/Compo/CardFrame.razor @@ -155,7 +155,8 @@ @if (!(CurrFrameWindow.AreaList[0] is Split) || (SashGroupList.Count == 0 && SplitList.Count == 0)) { + EC_AddSplit="AddSplit" + EC_AddInglesina="AddInglesina"> } } diff --git a/WebWindowComplex/Compo/CardFrame.razor.cs b/WebWindowComplex/Compo/CardFrame.razor.cs index add2afe..451ca38 100644 --- a/WebWindowComplex/Compo/CardFrame.razor.cs +++ b/WebWindowComplex/Compo/CardFrame.razor.cs @@ -182,7 +182,7 @@ namespace WebWindowComplex.Compo #region Private Methods /// - /// Metodo per aggiungere sash + /// Metodo per aggiungere sash nel frame /// /// private async Task AddSash() @@ -199,7 +199,7 @@ namespace WebWindowComplex.Compo } /// - /// Metodo per aggiungere window + /// Metodo per aggiungere split nel frame /// /// private async Task AddSplit() @@ -218,6 +218,23 @@ namespace WebWindowComplex.Compo await EC_UpdateFrame.InvokeAsync(args); } + /// + /// Metodo per aggiungere inglesina nel frame + /// + /// + private async Task AddInglesina() + { + CurrFrameWindow.AddInglesina(); + _ = EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = LayoutConst.DataAction.ResetDimElem }); + var args = new DataUpdateFrame() + { + currFrame = CurrFrameWindow, + svgNoHw = true + }; + await EC_ReqElement.InvokeAsync(CurrFrameWindow); + await EC_UpdateFrame.InvokeAsync(args); + } + /// /// Metodo per cambiare tutti i joint /// diff --git a/WebWindowComplex/Compo/CardInglesina.razor b/WebWindowComplex/Compo/CardInglesina.razor index 7da9fe2..b9c72ac 100644 --- a/WebWindowComplex/Compo/CardInglesina.razor +++ b/WebWindowComplex/Compo/CardInglesina.razor @@ -4,7 +4,7 @@
-
@(descParentSplit())
+
@(descParentInglesina())
@@ -45,12 +45,12 @@ @if (User) { Shape - + } else { - @foreach (var shapeType in CurrInglesina.SplitShapeList) { @@ -87,11 +87,11 @@ QtyVert @if (User) { - + } else { - + }
@@ -103,11 +103,11 @@ QtyHoriz @if (User) { - + } else { - + }
diff --git a/WebWindowComplex/Compo/CardInglesina.razor.cs b/WebWindowComplex/Compo/CardInglesina.razor.cs index 739e74c..eeee1ee 100644 --- a/WebWindowComplex/Compo/CardInglesina.razor.cs +++ b/WebWindowComplex/Compo/CardInglesina.razor.cs @@ -10,7 +10,7 @@ namespace WebWindowComplex.Compo { /// - /// Inglesina corrente rispetto alla lista inglesine + /// Inglesina corrente /// [Parameter] public Inglesina CurrInglesina { get; set; } = null!; @@ -61,7 +61,7 @@ namespace WebWindowComplex.Compo /// Evento per richiesta profili degli Element /// [Parameter] - public EventCallback EC_ReqElement { get; set; } + public EventCallback EC_ReqElement { get; set; } /// /// Evento per tornare nella pagine Tree @@ -70,9 +70,9 @@ namespace WebWindowComplex.Compo public EventCallback EC_ReqClose { get; set; } /// - /// Metodo per rimuovere split + /// Metodo per rimuovere Inglesina /// - /// split corrente + /// Inglesina corrente /// protected async Task RemoveArea() { @@ -89,10 +89,10 @@ namespace WebWindowComplex.Compo } /// - /// Proprietà per selezionare shape split + /// Proprietà per selezionare shape Inglesina /// /// - protected int SplitShapeIndex + protected int InglesinaShapeIndex { get => CurrInglesina.SelSplitShapeIndex; set @@ -120,7 +120,7 @@ namespace WebWindowComplex.Compo } /// - /// Proprietà per selezionare shape split + /// Proprietà per selezionare shape Inglesina /// /// protected int SideIndex @@ -152,10 +152,10 @@ namespace WebWindowComplex.Compo } /// - /// Proprietà per selezionare numero di split verticali + /// Proprietà per selezionare numero di Inglesina verticali /// /// - protected int SplitQtyVert + protected int InglesinaQtyVert { get => CurrInglesina.nSplitQtyVert; set @@ -175,10 +175,10 @@ namespace WebWindowComplex.Compo } /// - /// Proprietà per selezionare numero di split verticali + /// Proprietà per selezionare numero di Inglesina verticali /// /// - protected int SplitQtyHoriz + protected int InglesinaQtyHoriz { get => CurrInglesina.nSplitQtyHoriz; set @@ -234,15 +234,14 @@ namespace WebWindowComplex.Compo } var args = new DataUpdateInglesina() { - currInglesina = CurrInglesina, - svgNoHw = true + currInglesina = CurrInglesina }; await EC_UpdateInglesina.InvokeAsync(args); } } /// - /// Metodo per aggiornare la dimensione dello split + /// Metodo per aggiornare la dimensione dell'3Inglesina /// /// /// @@ -269,21 +268,6 @@ namespace WebWindowComplex.Compo } } - protected async Task UpdateInglesina(DataUpdateInglesina updRec) - { - if (updRec.currInglesina != null) - { - CurrInglesina = updRec.currInglesina; - var args = new DataUpdateInglesina() - { - currInglesina = CurrInglesina, - noSvg = updRec.noSvg - }; - //await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape }); - await EC_UpdateInglesina.InvokeAsync(args); - } - } - /// /// Metodo per cambiare la dimensione principale /// @@ -309,10 +293,10 @@ namespace WebWindowComplex.Compo } /// - /// Metodo per determinare la descrizione del parent dello split corrente + /// Metodo per determinare la descrizione del parent dello Inglesina corrente /// /// - protected string descParentSplit() + protected string descParentInglesina() { if ((CurrInglesina.ParentArea.ParentArea is Splitted || CurrInglesina.ParentArea.ParentArea.ParentArea is Sash) && SashGroupList.Count > 0) { @@ -452,7 +436,7 @@ namespace WebWindowComplex.Compo } /// - /// Classe per raggruppare oggetti che servono per aggiornare split + /// Classe per raggruppare oggetti che servono per aggiornare Inglesina /// public class DataUpdateInglesina { diff --git a/WebWindowComplex/Models/Area.cs b/WebWindowComplex/Models/Area.cs index 27bdd8d..d3ddf7a 100644 --- a/WebWindowComplex/Models/Area.cs +++ b/WebWindowComplex/Models/Area.cs @@ -202,12 +202,10 @@ namespace WebWindowComplex.Models public void AddInglesina() { // Creo l'inglesina - //Split InglesinaArea = Split.CreateSplit(this, SplitShapes.HORIZONTAL); Inglesina InglesinaArea = Inglesina.CreateInglesina(this.AreaList[0], SplitShapes.HORIZONTAL); // imposto i parametri di default InglesinaArea.SetSplitStartVert(false); InglesinaArea.SetSplitQtyHoriz(1, 0); - InglesinaArea.ElemDimHorizList.FirstOrDefault().SetDimension(60); // Aggiungo l'inglesina nell'AreaList del Fill Fill fill = (Fill)AreaList.First(); fill.AreaList.Add(InglesinaArea); diff --git a/WebWindowComplex/Models/Inglesina.cs b/WebWindowComplex/Models/Inglesina.cs index 37dbd54..fd22d9c 100644 --- a/WebWindowComplex/Models/Inglesina.cs +++ b/WebWindowComplex/Models/Inglesina.cs @@ -106,6 +106,354 @@ namespace WebWindowComplex.Models } } + public override int nSplitQtyHoriz + { + get + { + return SplitHorizList.Count > 0 ? SplitHorizList.Count - 1 : 0; + } + set + { + if (value >= 0 && value < 6) + { + if (value == 0) + { + for (var SplitIndex = SplitHorizList.Count - 1; SplitIndex >= value; SplitIndex += -1) + SplitHorizList.RemoveAt(SplitIndex); + if (nSplitQtyVert == 0) + { + ParentArea.AreaList.Remove(this); + Fill newFill = Fill.CreateFill(ParentArea, FillTypes.GLASS); + newFill.SetAreaType(AreaTypes.FILL); + ParentArea.AreaList.Add(newFill); + } + else + { + ElemDimHorizList.RemoveAt(0); + SetSplitShape(SplitShapes.VERTICAL); + SetSplitStartVert(true); + // Controllo quanti split orizzontali ci sono + int nVert = SplitVertList.Count > 0 ? SplitVertList.Count : 1; + // Cancello aree di troppo + for (var SplitIndex = nVert; SplitIndex <= AreaList.Count; SplitIndex++) + AreaList.RemoveAt(AreaList.Count - 1); + } + } + else + { + Frame? frame = ParentWindow.AreaList.FirstOrDefault(); + if (frame != null) + { + double heightTot = CalculateHeightSplitGroup(frame, frame.AvailHeightArea(), new AreaFound(-1, false)).m_Dimension; + // Ricalcolo dimensioni aggiungendo split + if (value > SplitHorizList.Count - 1) + { + // recupero larghezza ultimo + double dLastDimension = heightTot; + double dNewDimension = heightTot; + if (SplitHorizList.Count > 0) + { + dLastDimension = SplitHorizList[SplitHorizList.Count - 1].dDimension; + if (SplitHorizList.Last().MeasureType is MeasureTypes.ABSOLUTE) + dNewDimension = (dLastDimension - ElemDimHorizList.Last().dDimension) / (value + 1 - nSplitQtyHoriz); + else + dNewDimension = dLastDimension / (value + 1 - nSplitQtyHoriz); + if (SplitHorizList[SplitHorizList.Count - 1].MeasureType.Equals(MeasureTypes.PROPORTIONAL)) + dNewDimension = 1; + SplitHorizList[SplitHorizList.Count - 1].SetDimension(dNewDimension); + } + else + dNewDimension = dLastDimension / (value + 1 - nSplitQtyHoriz); + // aggiungo area Split di default + for (var SplitIndex = SplitHorizList.Count; SplitIndex <= value; SplitIndex++) + SplitHorizList.Add(new SplitDimension(dNewDimension, SplitHorizList[SplitHorizList.Count - 1].MeasureType, true, this, false)); + double thickness = SetThickness(); + if (!bSplitStartVert) + { + //Aggiungo un elemento alla sottoarea principale + SplitElementDimension newElemDim = ElemDimHorizList.First().Copy(); + newElemDim.SetElement(ElemDimHorizList.Max(x => x.nIndex) + 1, thickness, 0); + ElemDimHorizList.Add(newElemDim); + if (nSplitQtyVert > 0) + { + // Aggiungo a tutte le sottoaree degli element + int subArea = ElemDimVertList.Max(x => x.nSubArea) + 1; + for (int i = 1; i <= ElemDimVertList.Max(x => x.nIndex); i++) + { + newElemDim = ElemDimVertList.First().Copy(); + newElemDim.SetElement(i, thickness, subArea); + ElemDimVertList.Add(newElemDim); + } + } + } + else + { + // Aggiungo a tutte le sottoaree degli element + for (int i = 1; i <= ElemDimHorizList.Max(x => x.nSubArea); i++) + { + int index = ElemDimHorizList.Where(x => x.nSubArea == i).Max(x => x.nIndex); + SplitElementDimension newElemDim = ElemDimVertList.First().Copy(); + newElemDim.SetElement(index + 1, thickness, i); + ElemDimHorizList.Insert(index * i + (i - 1), newElemDim); + } + } + } + // Ricalcolo dimensioni rimuovendo split + else + { + int countProportional = SplitHorizList.Count(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL)); + if (SplitHorizList.Last().MeasureType.Equals(MeasureTypes.PROPORTIONAL) && countProportional - 1 == 1) + { + SplitHorizList.RemoveAt(SplitVertList.Count() - 1); + SplitHorizList.Where(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL)).FirstOrDefault()?.SetDimension(1); + } + else + { + double dLastDimension = 0; + for (var SplitIndex = SplitHorizList.Count - 1; SplitIndex >= value + 1; SplitIndex += -1) + { + dLastDimension += SplitHorizList[SplitIndex].dDimension; + if (SplitHorizList.Last().MeasureType.Equals(MeasureTypes.ABSOLUTE)) + dLastDimension += ElemDimHorizList[SplitIndex - 1].dDimension; + SplitHorizList.RemoveAt(SplitIndex); + } + dLastDimension += SplitHorizList[SplitHorizList.Count - 1].dDimension; + SplitHorizList[SplitHorizList.Count - 1].SetDimension(dLastDimension); + } + if (bSplitStartVert) + { + // Rimuovo da tutte le sottoaree degli element l'ultimo elemento + 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); + } + } + else + { + int deleteSubArea = ElemDimHorizList.Count + 1; + ElemDimHorizList.RemoveAt(ElemDimHorizList.Count - 1); + if (nSplitQtyVert > 0) + ElemDimVertList.RemoveAll(x => x.nSubArea == deleteSubArea); + } + } + } + } + } + } + } + + public override int nSplitQtyVert + { + get + { + return SplitVertList.Count > 0 ? SplitVertList.Count - 1 : 0; + } + set + { + if (value >= 0 && value < 6) + { + if (value == 0) + { + for (var SplitIndex = SplitVertList.Count - 1; SplitIndex >= value; SplitIndex += -1) + SplitVertList.RemoveAt(SplitIndex); + if (nSplitQtyHoriz == 0) + { + ParentArea.AreaList.Remove(this); + Fill newFill = Fill.CreateFill(ParentArea, FillTypes.GLASS); + newFill.SetAreaType(AreaTypes.FILL); + ParentArea.AreaList.Add(newFill); + } + else + { + ElemDimVertList.RemoveAt(0); + SetSplitShape(SplitShapes.HORIZONTAL); + SetSplitStartVert(false); + // Controllo quanti split orizzontali ci sono + int nHoriz = SplitHorizList.Count > 0 ? SplitHorizList.Count : 1; + // Cancello aree di troppo + for (var SplitIndex = nHoriz; SplitIndex <= AreaList.Count; SplitIndex++) + AreaList.RemoveAt(AreaList.Count - 1); + } + } + else + { + Frame? frame = ParentWindow.AreaList.FirstOrDefault(); + if (frame != null) + { + double widthTot = CalculateWidthSplitGroup(frame, frame.AvailWidthArea(), new AreaFound(-1, false)).m_Dimension; + // Ricalcolo dimensioni aggiungendo split + if (value > SplitVertList.Count - 1) + { + // recupero larghezza ultimo + double dLastDimension = widthTot; + double dNewDimension = widthTot; + if (SplitVertList.Count > 0) + { + dLastDimension = SplitVertList[SplitVertList.Count - 1].dDimension; + if (SplitVertList.Last().MeasureType is MeasureTypes.ABSOLUTE) + dNewDimension = (dLastDimension - ElemDimVertList.Last().dDimension) / (value + 1 - nSplitQtyVert); + else + dNewDimension = dLastDimension / (value + 1 - nSplitQtyVert); + if (SplitVertList[SplitVertList.Count - 1].MeasureType.Equals(MeasureTypes.PROPORTIONAL)) + dNewDimension = 1; + SplitVertList[SplitVertList.Count - 1].SetDimension(dNewDimension); + } + else + dNewDimension = dLastDimension / (value + 1 - nSplitQtyVert); + // aggiungo area Split di default + for (var SplitIndex = SplitVertList.Count; SplitIndex <= value; SplitIndex++) + SplitVertList.Add(new SplitDimension(dNewDimension, SplitVertList[SplitVertList.Count - 1].MeasureType, true, this, true)); + double thickness = SetThickness(); + if (bSplitStartVert) + { + //Aggiungo un elemento alla sottoarea principale + SplitElementDimension newElemDim = ElemDimVertList.First().Copy(); + newElemDim.SetElement(ElemDimVertList.Max(x => x.nIndex) + 1, thickness, 0); + ElemDimVertList.Add(newElemDim); + if (nSplitQtyHoriz > 0) + { + // Aggiungo a tutte le sottoaree degli element + int subArea = ElemDimHorizList.Max(x => x.nSubArea) + 1; + for (int i = 1; i <= ElemDimHorizList.Max(x => x.nIndex); i++) + { + newElemDim = ElemDimHorizList.First().Copy(); + newElemDim.SetElement(i, thickness, subArea); + ElemDimHorizList.Add(newElemDim); + } + } + } + else + { + // Aggiungo a tutte le sottoaree un elemento + for (int i = 1; i <= ElemDimVertList.Max(x => x.nSubArea); i++) + { + int index = ElemDimVertList.Where(x => x.nSubArea == i).Max(x => x.nIndex); + SplitElementDimension newElemDim = ElemDimVertList.First().Copy(); + newElemDim.SetElement(index + 1, thickness, i); + ElemDimVertList.Insert(index * i + (i - 1), newElemDim); + } + } + } + else if (value == 0) + { + SplitVertList.RemoveAt(1); + SplitVertList.RemoveAt(0); + } + // Ricalcolo dimensioni rimuovendo split + else + { + int countProportional = SplitVertList.Count(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL)); + if (SplitVertList.Last().MeasureType.Equals(MeasureTypes.PROPORTIONAL) && countProportional - 1 == 1) + { + SplitVertList.RemoveAt(SplitVertList.Count() - 1); + SplitVertList.Where(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL)).FirstOrDefault()?.SetDimension(1); + } + else + { + double dLastDimension = 0; + for (var SplitIndex = SplitVertList.Count - 1; SplitIndex >= value + 1; SplitIndex += -1) + { + dLastDimension += SplitVertList[SplitIndex].dDimension; + if (SplitVertList.Last().MeasureType.Equals(MeasureTypes.ABSOLUTE)) + dLastDimension += ElemDimVertList[SplitIndex - 1].dDimension; + SplitVertList.RemoveAt(SplitIndex); + } + dLastDimension += SplitVertList[SplitVertList.Count - 1].dDimension; + SplitVertList[SplitVertList.Count - 1].SetDimension(dLastDimension); + } + if (bSplitStartVert) + { + int deleteSubArea = ElemDimVertList.Count + 1; + ElemDimVertList.RemoveAt(ElemDimVertList.Count - 1); + if (nSplitQtyHoriz > 0) + ElemDimHorizList.RemoveAll(x => x.nSubArea == deleteSubArea); + } + else + { + // Rimuovo da tutte le sottoaree degli element l'ultimo elemento + for (int subArea = 1; subArea <= ElemDimVertList.Max(x => x.nSubArea); subArea++) + { + SplitElementDimension removeElem = ElemDimVertList.Where(x => x.nSubArea == subArea).OrderByDescending(x => x.nIndex).FirstOrDefault(); + ElemDimVertList.Remove(removeElem); + } + } + } + } + } + } + } + } + + public override int SelSplitShapeIndex + { + get + { + return (int)SelSplitShape; + } + set + { + SplitShapes OldSelShapeSplit = SelSplitShape; + SelSplitShape = (SplitShapes)value; + // Azzero quantità orizzontale e verticale + SetSplitQtyVert(0, 0); + SetSplitQtyHoriz(0, 0); + if (SelSplitShape == SplitShapes.VERTICAL) + { + // Inserisco valori di default + SetSplitStartVert(true); + SetSplitQtyVert(1, 0); + } + else if (SelSplitShape == SplitShapes.HORIZONTAL) + { + // Inserisco valori di default + SetSplitStartVert(false); + SetSplitQtyHoriz(1, 0); + } + else + { + // Inserisco valori di default + SetSplitStartVert(true); + SetSplitQtyVert(1, 1); + SetSplitQtyHoriz(1, 1); + } + UpdateSubAreaSplit(); + } + } + + internal override double SetThickness() + { + double thickness = Window.m_ParameterList.GetValueOrDefault("Fill_Fill_Split_In_DimStd"); + if (ParentArea.ParentArea.ParentArea is Sash sash) + { + SashDimension anta = sash.SashList[0]; + if (anta.SelOpeningType is Openings.COMPLANARSLIDE_LEFT || + anta.SelOpeningType is Openings.COMPLANARSLIDE_RIGHT || + anta.SelOpeningType is Openings.LIFTSLIDE_LEFT || + anta.SelOpeningType is Openings.COMPLANARSLIDE_RIGHT) + { + if (m_SelSide is SideInglesina.INTERNAL) + thickness = Window.m_ParameterList.GetValueOrDefault("Fill_Slide_Fill_Split_In_DimStd"); + else + thickness = Window.m_ParameterList.GetValueOrDefault("Fill_Slide_Fill_Split_Out_DimStd"); + } + else + { + if (m_SelSide is SideInglesina.INTERNAL) + thickness = Window.m_ParameterList.GetValueOrDefault("Fill_Fill_Split_In_DimStd"); + else + thickness = Window.m_ParameterList.GetValueOrDefault("Fill_Fill_Split_Out_DimStd"); + } + } + else + { + if (m_SelSide is SideInglesina.EXTERNAL) + thickness = Window.m_ParameterList.GetValueOrDefault("Fill_Fill_Split_Out_DimStd"); + } + return thickness; + } + private List m_SideList = new List { new IdNameStruct((int)SideInglesina.INTERNAL, "Internal"), diff --git a/WebWindowComplex/Models/Split.cs b/WebWindowComplex/Models/Split.cs index d9b5fc8..845d29c 100644 --- a/WebWindowComplex/Models/Split.cs +++ b/WebWindowComplex/Models/Split.cs @@ -30,9 +30,7 @@ namespace WebWindowComplex.Models List elemHorizListOld = new List(m_ElemDimHorizList); m_ElemDimVertList.Clear(); m_ElemDimHorizList.Clear(); - double thickness = 78; - if (ParentArea is Sash || ParentArea.ParentArea is Sash) - thickness = Window.m_ParameterList.GetValueOrDefault("Sash_Sash_Split_DimStd"); + double thickness = SetThickness(); if (value) { for (int i = 0; i < nSplitQtyVert; i++) @@ -77,7 +75,7 @@ namespace WebWindowComplex.Models } } - public int nSplitQtyHoriz + public virtual int nSplitQtyHoriz { get { @@ -139,9 +137,7 @@ namespace WebWindowComplex.Models // aggiungo area Split di default for (var SplitIndex = m_SplitHorizList.Count; SplitIndex <= value; SplitIndex++) m_SplitHorizList.Add(new SplitDimension(dNewDimension, m_SplitHorizList[m_SplitHorizList.Count - 1].MeasureType, true, this, false)); - double thickness = 78; - if (ParentArea is Sash || ParentArea.ParentArea is Sash) - thickness = Window.m_ParameterList.GetValueOrDefault("Sash_Sash_Split_DimStd"); + double thickness = SetThickness(); if (!m_bSplitStartVert) { //Aggiungo un elemento alla sottoarea principale @@ -249,7 +245,7 @@ namespace WebWindowComplex.Models } } - public int nSplitQtyVert + public virtual int nSplitQtyVert { get { @@ -311,9 +307,7 @@ namespace WebWindowComplex.Models // aggiungo area Split di default for (var SplitIndex = m_SplitVertList.Count; SplitIndex <= value; SplitIndex++) m_SplitVertList.Add(new SplitDimension(dNewDimension, m_SplitVertList[m_SplitVertList.Count - 1].MeasureType, true, this, true)); - double thickness = 78; - if (ParentArea is Sash || ParentArea.ParentArea is Sash) - thickness = Window.m_ParameterList.GetValueOrDefault("Sash_Sash_Split_DimStd"); + double thickness = SetThickness(); if (m_bSplitStartVert) { //Aggiungo un elemento alla sottoarea principale @@ -425,7 +419,7 @@ namespace WebWindowComplex.Models } } - public int SelSplitShapeIndex + public virtual int SelSplitShapeIndex { get { @@ -605,6 +599,10 @@ namespace WebWindowComplex.Models { return m_SelSplitShape; } + set + { + m_SelSplitShape = value; + } } #endregion Internal Properties @@ -905,9 +903,7 @@ namespace WebWindowComplex.Models } else { - double thickness = 78; - if (ParentArea is Sash || ParentArea.ParentArea is Sash) - thickness = Window.m_ParameterList.GetValueOrDefault("Sash_Sash_Split_DimStd"); + double thickness = SetThickness(); // Un Elemento per ogni dimensione principale e per ogni sotto dimensione if (bSplitStartVert) { @@ -955,9 +951,7 @@ namespace WebWindowComplex.Models } else { - double thickness = 78; - if (ParentArea is Sash || ParentArea.ParentArea is Sash) - thickness = Window.m_ParameterList.GetValueOrDefault("Sash_Sash_Split_DimStd"); + double thickness = SetThickness(); // Un Elemento per ogni dimensione principale e per ogni sotto dimensione if (bSplitStartVert) { @@ -975,6 +969,14 @@ namespace WebWindowComplex.Models } } + internal virtual double SetThickness() + { + double thickness = 78; + if (ParentArea is Sash || ParentArea.ParentArea is Sash) + thickness = Window.m_ParameterList.GetValueOrDefault("Sash_Sash_Split_DimStd"); + return thickness; + } + internal void SetSplitShape(SplitShapes Value) { m_SelSplitShape = Value; diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index c433cee..2ba54dd 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.4.1415 + 3.1.4.1511 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -141,6 +141,8 @@ + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 9c796dd..c7760ba 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.4.1415 + 3.1.4.1511 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -238,6 +238,9 @@ + + +