From 46c4aa6f58c27ec6dbcd9bed7e4134d79afa0056 Mon Sep 17 00:00:00 2001 From: Annamaria Sassi Date: Fri, 8 Aug 2025 18:37:03 +0200 Subject: [PATCH] - Fix aggiunta anta - Modificata navigazione tra le tab --- .../WebWindowConfigurator.csproj | 20 +- WebWindowConfigurator/WebWindowMaker.razor | 581 +++++++++--------- WebWindowConfigurator/WebWindowMaker.razor.cs | 3 +- WebWindowConfigurator/Window.cs | 186 ++---- 4 files changed, 387 insertions(+), 403 deletions(-) diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 152cd0b..f698854 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 2.7.8.812 + 2.7.8.817 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -43,5 +43,23 @@ + + + + + + + + + + + + + + + + + + diff --git a/WebWindowConfigurator/WebWindowMaker.razor b/WebWindowConfigurator/WebWindowMaker.razor index abe762a..3934a64 100644 --- a/WebWindowConfigurator/WebWindowMaker.razor +++ b/WebWindowConfigurator/WebWindowMaker.razor @@ -1,254 +1,144 @@ 
-
-
-
-
-
- +
+
+ + + +
-
-
-
- @if (currStep == CompileStep.Template) - { - - - - - - - - - - @foreach (var item in IN_TemplateDTOList) - { - string colorClass = ""; - @if (SelTemplateDTO != null && item.Index == SelTemplateDTO.Index) - colorClass = "table-success"; - else - colorClass = ""; - - - - +
+
+ @* @if (currStep == CompileStep.Template) + { +
#ImageDescription
@item.Index@item.Description
+ + + + + - } - -
#ImageDescription
- @* *@ - } - else if (currStep == CompileStep.Frame) - { -
-
-
-
- - -
-
-
-
Dimension
- @foreach (FrameDimension dimension in m_Frame.DimensionList) - { -
- @dimension.nIndex - @dimension.sName - -
- } -
-
-
-
-
Joints frame
- @foreach (Joint joint in m_Frame.JointList) - { -
- - -
- } -
-
- @if (m_SashList.Count == 0) + + + @foreach (var item in IN_TemplateDTOList) { -
-
-
Bottom rail
-
- Quantity - -
-
-
+ string colorClass = ""; + @if (SelTemplateDTO != null && item.Index == SelTemplateDTO.Index) + colorClass = "table-success"; + else + colorClass = ""; + + @item.Index + + @item.Description + } -
-
-
- } - else if (currStep == CompileStep.Split) - { -
-
-
- @foreach (var item in SplitList) - { + + + } *@ + @if (currStep == CompileStep.Frame) + { +
+
+
+
+ + +
-
- Number - -
-
- - -
- @foreach (var dim in item.SplitPositionList) +
Dimension
+ @foreach (FrameDimension dimension in m_Frame.DimensionList) {
- Altezza area inferiore - + @dimension.nIndex + @dimension.sName +
}
- } - @* *@ -
-
-
- } - else if (currStep == CompileStep.Sash) - { -
-
-
- @foreach (var item in SashList) - { -
-
- Number - -
-
-
Orientation
-
- - -
-
-
- @foreach (SashDimension sash in item.SashList) - { -
-
- @if(item.SashList.Count == 1) - { -
Opening
- } - else - { -
Sash opening @(item.SashList.IndexOf(sash) + 1)
- } -
- - -
-
- Dimension - -
-
-
- -
-
- -
-
-
-
- } -
-
-
Sash joints
- @foreach (Joint joint in item.JointList) +
Joints frame
+ @foreach (Joint joint in m_Frame.JointList) {
@@ -261,60 +151,199 @@ }
-
-
-
Bottom rail
-
- Quantity - + @if (m_SashList.Count == 0) + { +
+
+
Bottom rail
+
+ Quantity + +
-
- } - - @* *@ -
-
-
- } - else if (currStep == CompileStep.Fill) - { -
-
-
- @foreach (var Fill in FillList) - { -
-
- @if(FillList.Count == 1) - { -
Fill
- } - else - { -
Fill @(FillList.IndexOf(Fill) + 1)
- } -
- -
-
-
- } + } +
-
- } + } + else if (currStep == CompileStep.Split) + { +
+
+
+ @foreach (var item in SplitList) + { +
+
+
+ Number + +
+
+ + +
+ @foreach (var dim in item.SplitPositionList) + { +
+ Altezza area inferiore + +
+ } +
+
+ } + @* *@ +
+
+
+ } + else if (currStep == CompileStep.Sash) + { +
+
+
+ @foreach (var item in SashList) + { +
+
+ Number + +
+
+
+
+
Orientation
+
+ + +
+
+
+ @foreach (SashDimension sash in item.SashList) + { +
+
+ @if(item.SashList.Count == 1) + { +
Opening
+ } + else + { +
Sash opening @(item.SashList.IndexOf(sash) + 1)
+ } +
+ + +
+
+ Dimension + +
+
+
+ +
+
+ +
+
+
+
+ } +
+
+
Sash joints
+ @foreach (Joint joint in item.JointList) + { +
+ + +
+ } +
+
+
+
+
Bottom rail
+
+ Quantity + +
+
+
+ } + + @* *@ +
+
+
+ } + else if (currStep == CompileStep.Fill) + { +
+
+
+ @foreach (var Fill in FillList) + { +
+
+ @if(FillList.Count == 1) + { +
Fill
+ } + else + { +
Fill @(FillList.IndexOf(Fill) + 1)
+ } +
+ +
+
+
+ } +
+
+
+ } +
-
- @if (SelTemplateDTO != null && currStep != CompileStep.Template) - { -
- @outSvg -
+ @if (SelTemplateDTO != null && currStep != CompileStep.Template) + { +
+ @outSvg +
+ } }
diff --git a/WebWindowConfigurator/WebWindowMaker.razor.cs b/WebWindowConfigurator/WebWindowMaker.razor.cs index 45cb7bd..e5612e6 100644 --- a/WebWindowConfigurator/WebWindowMaker.razor.cs +++ b/WebWindowConfigurator/WebWindowMaker.razor.cs @@ -170,6 +170,7 @@ namespace WebWindowConfigurator protected async void DoSelect(TemplateSelectDTO newSel) { SelTemplateDTO = newSel; + //DoSelectAndPreview(CompileStep.Frame); await EC_OnSelectedTemplate.InvokeAsync(newSel); } @@ -226,7 +227,7 @@ namespace WebWindowConfigurator #region Private Fields - private CompileStep currStep = CompileStep.Template; + private CompileStep currStep = CompileStep.Frame; private List m_FillList = new List(); diff --git a/WebWindowConfigurator/Window.cs b/WebWindowConfigurator/Window.cs index a38d720..872849e 100644 --- a/WebWindowConfigurator/Window.cs +++ b/WebWindowConfigurator/Window.cs @@ -594,8 +594,6 @@ namespace WebWindowConfigurator for (var SplitIndex = m_SashList.Count; SplitIndex <= value - 1; SplitIndex++) { SashList.Add(new SashDimension(dNewDimension, true, this)); - Fill f = (Fill)AreaList.Last(); - AreaList.Add(Fill.CreateFill(this, f.FillType)); } } else if (value < m_SashList.Count) @@ -605,11 +603,71 @@ namespace WebWindowConfigurator { dLastDimension += m_SashList[SplitIndex].dDimension; SashList.RemoveAt(SplitIndex); - AreaList.RemoveAt(SplitIndex); + //AreaList.RemoveAt(SplitIndex); } dLastDimension += m_SashList[SashList.Count - 1].dDimension; SashList[SashList.Count - 1].SetDimension(dLastDimension); } + if(m_SashList.Count == 1) + { + List ContentArea = new List(); + while(AreaList.Count > 0) + { + if(AreaList.Count == 1 & AreaList[0].AreaList.Count > 0) + { + foreach(Area selArea in AreaList[0].AreaList) + { + ContentArea.Add(selArea); + } + } + AreaList.Remove(AreaList[AreaList.Count - 1]); + } + if(ContentArea.Count > 0) + { + AreaList = ContentArea; + } + } + else + { + List ContentArea = new List(); + if (AreaList.Count == 1 & SashList.Count > AreaList.Count) + { + ContentArea.Add(AreaList.ElementAt(0)); + //foreach(Area selArea in AreaList) + //{ + // ContentArea.Add(selArea); + //} + AreaList.Clear(); + } + for (int SplitIndex = AreaList.Count; SplitIndex <= SashList.Count - 1; SplitIndex++) + { + AreaList.Add(Splitted.CreateSplitted(this)); + } + int DimAreaList = AreaList.Count(); + for (int SplitIndex = SashList.Count; SplitIndex <= DimAreaList - 1; SplitIndex++) + { + AreaList.Remove(AreaList[AreaList.Count - 1]); + } + //if(ContentArea.Count > 0) + //{ + // AreaList[0].AreaList = ContentArea; + //} + if (AreaList[AreaList.Count - 1].AreaList.Count == 0) + { + if (ContentArea.Count > 0) + { + foreach (Area SelArea in AreaList) + { + SelArea.AreaList = ContentArea; + } + } + else + { + AreaList[AreaList.Count - 1] = AreaList[AreaList.Count - 2]; + } + } + } + //RefreshHardwareList(); RefreshHardwareOptionList(); @@ -712,7 +770,6 @@ namespace WebWindowConfigurator set { m_bIsSashVertical = value; - m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized()); } } internal void SetIsSashVertical(bool IsSashVertical) @@ -984,72 +1041,6 @@ namespace WebWindowConfigurator return NewSash; } - //private string FindSashShape() - //{ - // // Return "R" - // // se non ancora creato, recupero area precedente - // int nAreaId = m_nAreaId; - // if (m_nAreaId == (int)GDB_ID.NULL) - // nAreaId = ParentArea.nAreaId; - // int nOutlineLayerId = EgtGetFirstNameInGroup(nAreaId, WIN_OUTLINE); - // List OutlineIdList = new List(); - // int nOutlineId = EgtGetFirstInGroup(nOutlineLayerId); - // while (nOutlineId != (int)GDB_ID.NULL) - // { - // OutlineIdList.Add(nOutlineId); - // nOutlineId = EgtGetNext(nOutlineId); - // } - // int nTempLayerId = EgtCreateGroup(nAreaId); - // int nCompoOutlineId = EgtCreateCurveCompo(nTempLayerId, OutlineIdList.ToArray(), false); - // Point3d ptP; - // Vector3d vtL1; - // Vector3d vtL2; - // Vector3d vtB1; - // Vector3d vtB2; - // Vector3d vtN; - // double dRad; - // bool bCCW; - // if (EgtCurveIsARectangle(nCompoOutlineId, 0.001, ptP, vtL1, vtL2)) - // return "R"; - // else if (EgtCurveIsACircle(nCompoOutlineId, ptP, vtN, dRad, bCCW)) - // return "C"; - // else if (EgtCurveIsATrapezoid(nCompoOutlineId, ptP, vtB1, vtL1, vtB2)) - // return "T"; - // else - // for (var nOutlineIndex = 0; nOutlineIndex <= OutlineIdList.Count - 1; nOutlineIndex++) - // { - // if (EgtGetType(OutlineIdList[nOutlineIndex]) == GDB_TY.CRV_ARC) - // { - // Vector3d vtStart; - // EgtStartVector(OutlineIdList[nOutlineIndex], GDB_ID.ROOT, vtStart); - // Vector3d vtEnd; - // EgtEndVector(OutlineIdList[nOutlineIndex], GDB_ID.ROOT, vtEnd); - // int nPrevOutlineId = nOutlineId > 0 ? OutlineIdList[nOutlineIndex - 1] : OutlineIdList[OutlineIdList.Count - 1]; - // int dPrevLen; - // EgtCurveLength(nPrevOutlineId, dPrevLen); - // Vector3d vtPrev; - // EgtStartVector(nPrevOutlineId, vtPrev); - // int nNextOutlineId = nOutlineId < OutlineIdList.Count - 1 ? OutlineIdList[nOutlineIndex + 1] : OutlineIdList[0]; - // int dNextLen; - // EgtCurveLength(nNextOutlineId, dNextLen); - // Vector3d vtNext; - // EgtEndVector(nNextOutlineId, vtNext); - // if (Math.Abs(dPrevLen - dNextLen) < 10 * EPS_SMALL) - // { - // if (AreSameVectorApprox(vtEnd, vtNext)) - // return "AS"; - // else - // return "AR"; - // } - // else if (AreSameVectorApprox(vtEnd, vtNext)) - // return "SS"; - // else - // return "SR"; - // } - // } - // return "R"; - //} - internal OpeningTypes GetOpeningType(Openings OpeningType) { switch (OpeningType) @@ -1436,61 +1427,6 @@ namespace WebWindowConfigurator } } - - //private FillTypes m_FillType; - //public FillTypes FillType - //{ - // get - // { - // return m_FillType; - // } - // set - // { - // m_FillType = value; - // } - //} - //internal void SetFillType(FillTypes FillType) - //{ - // switch (FillType) - // { - // case FillTypes.GLASS: - // { - // bGlass_IsChecked = true; - // break; - // } - - // case FillTypes.WOOD: - // { - // bWood_IsChecked = true; - // break; - // } - // } - // m_FillType = FillType; - //} - //private bool[] m_Fill_IsChecked = new[] { false, false }; - //public bool bGlass_IsChecked - //{ - // get - // { - // return m_Fill_IsChecked[0]; - // } - // set - // { - // m_Fill_IsChecked[0] = value; - // } - //} - //public bool bWood_IsChecked - //{ - // get - // { - // return m_Fill_IsChecked[1]; - // } - // set - // { - // m_Fill_IsChecked[1] = value; - // } - //} - public Fill(Area ParentArea, Window ParentWindow) : base(ParentArea, ParentWindow) { }