- Modificata gestione elementi split (su dimensione secondaria si specifica solo una larghezza per split)

- Aggiunta gestione profili bottom rail per sash e frame
- Iniziato a gestire dimensione solo luce per sash
This commit is contained in:
Annamaria Sassi
2026-02-06 17:48:03 +01:00
parent 5db36307da
commit 3d092b53fb
26 changed files with 450 additions and 239 deletions
+33 -48
View File
@@ -432,17 +432,6 @@ namespace WebWindowComplex.Models
m_ElemDimVertList = value;
}
}
public List<SplitDimension> SplitPositionList
{
get
{
return m_SplitPositionList;
}
set
{
m_SplitPositionList = value;
}
}
public List<IdNameStruct> SplitShapeList
{
@@ -531,34 +520,6 @@ namespace WebWindowComplex.Models
}
}
public bool OnlySashChild()
{
foreach (var areaSplitted in AreaList)
{
if (!(areaSplitted.AreaList.FirstOrDefault()?.AreaType is AreaTypes.SASH))
return false;
}
return true;
}
public bool MinOneSashChild()
{
foreach (var areaSplitted in AreaList)
{
if (areaSplitted.AreaList.FirstOrDefault()?.AreaType is AreaTypes.SASH)
return true;
}
return false;
}
public bool SashChildSxOrDx()
{
foreach (var areaSplitted in AreaList)
{
if (areaSplitted.AreaList.FirstOrDefault()?.AreaType is AreaTypes.SASH)
return true;
}
return false;
}
#endregion Public Methods
#region Internal Properties
@@ -597,10 +558,20 @@ namespace WebWindowComplex.Models
JsonSplit.SplitVertList.Add(SplitVert.Serialize());
foreach (var SplitHoriz in m_SplitHorizList)
JsonSplit.SplitHorizList.Add(SplitHoriz.Serialize());
foreach (var Elem in m_ElemDimHorizList)
JsonSplit.ElementDimHorizList.Add(Elem.Serialize());
foreach (var Elem in m_ElemDimVertList)
JsonSplit.ElementDimVertList.Add(Elem.Serialize());
if(m_ElemDimHorizList != null && m_ElemDimHorizList.Count > 0)
{
int subAreaMinHoriz = m_ElemDimHorizList.Min(x => x.nSubArea);
List<SplitElementDimension> horizList = m_ElemDimHorizList.Where(x => x.nSubArea == subAreaMinHoriz).ToList();
foreach (var Elem in horizList)
JsonSplit.ElementDimHorizList.Add(Elem.Serialize());
}
if (m_ElemDimVertList != null && m_ElemDimVertList.Count > 0)
{
int subAreaMinVert = m_ElemDimVertList.Min(x => x.nSubArea);
List<SplitElementDimension> vertList = m_ElemDimVertList.Where(x => x.nSubArea == subAreaMinVert).ToList();
foreach (var Elem in vertList.ToList())
JsonSplit.ElementDimVertList.Add(Elem.Serialize());
}
foreach (var Area in AreaList)
JsonSplit.AreaList.Add(Area.Serialize(hideHw));
return JsonSplit;
@@ -636,12 +607,19 @@ namespace WebWindowComplex.Models
}
else
{
// Un Elemento per ogni dimensione principale e secondaria
//int subArea = 1;
//if (!bSplitStartVert)
// subArea = 0;
//for (int i = 0; i < QtyHoriz; i++)
// ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, 78, subArea));
// Un Elemento per ogni dimensione principale e per ogni sotto dimensione
if (bSplitStartVert)
{
for(int subArea = 0; subArea <= QtyVert; subArea++)
for (int subArea = 0; subArea <= QtyVert; subArea++)
{
for (int i = 0; i < QtyHoriz; i++)
ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, 78, subArea+1));
ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, 78, subArea + 1));
}
}
else
@@ -682,6 +660,13 @@ namespace WebWindowComplex.Models
}
else
{
// Un Elemento per ogni dimensione principale e secondaria
//int subArea = 0;
//if (!bSplitStartVert)
// subArea = 1;
//for (int i = 0; i < QtyVert; i++)
// ElemDimVertList.Add(new SplitElementDimension(this, i + 1, 78, subArea));
// Un Elemento per ogni dimensione principale e per ogni sotto dimensione
if (bSplitStartVert)
{
for (int i = 0; i < QtyVert; i++)
@@ -689,12 +674,12 @@ namespace WebWindowComplex.Models
}
else
{
for(int subArea = 0; subArea <= QtyHoriz; subArea++)
for (int subArea = 0; subArea <= QtyHoriz; subArea++)
{
for (int i = 0; i < QtyVert; i++)
ElemDimVertList.Add(new SplitElementDimension(this, i+1, 78, subArea + 1));
ElemDimVertList.Add(new SplitElementDimension(this, i + 1, 78, subArea + 1));
}
}
}
}
}