- Gestione soglia quando viene eliminata anta

- Gestione spessore split in anta o meno
This commit is contained in:
Annamaria Sassi
2026-03-04 14:48:23 +01:00
parent 76b11e7ba1
commit 2aa207d0d7
9 changed files with 83 additions and 31 deletions
+39 -13
View File
@@ -90,20 +90,27 @@ namespace WebWindowComplex.Models
m_SelThreshold = newThreshold;
else
m_SelThreshold = new Threshold(3, "Bottom");
string profileName = "";
if (m_SelThreshold.Name.Equals("Threshold"))
profileName = "Frame_Sash_Threshold";
else
profileName = "Frame_Sash_Bottom";
ElementDimensionList.First().SetNameElement(profileName);
ElementDimensionList.First().SetMinDimension(Window.m_ParameterList.GetValueOrDefault(profileName + "_DimMin"));
ElementDimensionList.First().SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(profileName + "_DimMax"));
ElementDimensionList.First().SetDimension(Window.m_ParameterList.GetValueOrDefault(profileName + "_DimStd"));
string overlapName = "Sash_Bottom_Overlap";
ElementDimensionList.First().SetOverlapElement(Window.m_ParameterList.GetValueOrDefault(overlapName));
if (AreaList.Count > 0)
UpdateElemDimension();
}
}
public string SelThresholdFromName
{
get{
return m_SelThreshold.Name;
}
set
{
// verifica ci sia un valore...
if (!string.IsNullOrEmpty(value) && m_ThresholdList != null && m_ThresholdList.Count > 0)
{
SearchAreaList(this, AvailHeightArea(), "Height");
m_SelThreshold = m_ThresholdList.Where(x => x.Name.Equals(value)).First();
UpdateElemDimension();
}
else
{
m_SelThreshold = m_ThresholdList!.FirstOrDefault() ?? new Threshold(3, "Bottom");
UpdateElemDimension();
}
}
}
@@ -722,6 +729,25 @@ namespace WebWindowComplex.Models
}
}
internal void UpdateElemDimension()
{
string profileName = "";
if (m_SelThreshold.Name.Equals("Threshold"))
profileName = "Frame_Sash_Threshold";
else
profileName = "Frame_Sash_Bottom";
ElementDimensionList.First().SetNameElement(profileName);
ElementDimensionList.First().SetMinDimension(Window.m_ParameterList.GetValueOrDefault(profileName + "_DimMin"));
ElementDimensionList.First().SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(profileName + "_DimMax"));
ElementDimensionList.First().SetDimension(Window.m_ParameterList.GetValueOrDefault(profileName + "_DimStd"));
string overlapName = "Sash_Bottom_Overlap";
ElementDimensionList.First().SetOverlapElement(Window.m_ParameterList.GetValueOrDefault(overlapName));
if (AreaList.Count > 0)
{
SearchAreaList(this, AvailHeightArea(), "Height");
}
}
#endregion Internal Methods
#region Private Fields
+7 -4
View File
@@ -34,28 +34,31 @@ namespace WebWindowComplex.Models
m_bSplitStartVert = value;
m_ElemDimVertList.Clear();
m_ElemDimHorizList.Clear();
double thickness = 78;
if (ParentArea.ParentArea is Sash)
thickness = 60;
if (value)
{
for (int i = 0; i < nSplitQtyVert; i++)
{
m_ElemDimVertList.Add(new SplitElementDimension(this, i + 1, 78, 0));
m_ElemDimVertList.Add(new SplitElementDimension(this, i + 1, thickness, 0));
}
for (int subArea = 0; subArea < m_SplitVertList.Count; subArea++)
{
for (int index = 0; index < nSplitQtyHoriz; index++)
m_ElemDimHorizList.Add(new SplitElementDimension(this, index + 1, 78, subArea + 1));
m_ElemDimHorizList.Add(new SplitElementDimension(this, index + 1, thickness, subArea + 1));
}
}
else
{
for (int i = 0; i < nSplitQtyHoriz; i++)
{
m_ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, 78, 0));
m_ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, thickness, 0));
}
for (int subArea = 0; subArea < m_SplitHorizList.Count; subArea++)
{
for (int index = 0; index < nSplitQtyVert; index++)
m_ElemDimVertList.Add(new SplitElementDimension(this, index + 1, 78, subArea + 1));
m_ElemDimVertList.Add(new SplitElementDimension(this, index + 1, thickness, subArea + 1));
}
}
}
+16 -4
View File
@@ -289,13 +289,19 @@ namespace WebWindowComplex.Models
if (bIsVertListDim)
{
splitList = m_Parent.SplitVertList;
splitElemList = m_Parent.ElemDimVertList;
if (Parent.bSplitStartVert)
splitElemList = m_Parent.ElemDimVertList;
else
splitElemList = m_Parent.ElemDimVertList.Where(x => x.nSubArea == 1).ToList();
dimSplitGroup = CalculateWidthSplitGroup(frame, frame.AvailWidthArea(), new AreaFound(-1, false)).m_Dimension;
}
else
{
splitList = m_Parent.SplitHorizList;
splitElemList = m_Parent.ElemDimHorizList;
if (Parent.bSplitStartVert)
splitElemList = m_Parent.ElemDimHorizList.Where(x => x.nSubArea == 1).ToList();
else
splitElemList = m_Parent.ElemDimHorizList;
dimSplitGroup = (CalculateHeightSplitGroup(frame, frame.AvailHeightArea(), new AreaFound(-1, false))).m_Dimension;
}
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType, Parent);
@@ -606,13 +612,19 @@ namespace WebWindowComplex.Models
if (bIsVertListDim)
{
splitList = m_Parent.SplitVertList;
splitElemList = m_Parent.ElemDimVertList;
if (Parent.bSplitStartVert)
splitElemList = m_Parent.ElemDimVertList;
else
splitElemList = m_Parent.ElemDimVertList.Where(x => x.nSubArea == 1).ToList();
dimSplitGroup = CalculateWidthSplitGroup(frame, frame.AvailWidthArea(), new AreaFound(-1, false)).m_Dimension;
}
else
{
splitList = m_Parent.SplitHorizList;
splitElemList = m_Parent.ElemDimHorizList;
if (Parent.bSplitStartVert)
splitElemList = m_Parent.ElemDimHorizList;
else
splitElemList = m_Parent.ElemDimHorizList.Where(x => x.nSubArea == 1).ToList();
dimSplitGroup = (CalculateHeightSplitGroup(frame, frame.AvailHeightArea(), new AreaFound(-1, false))).m_Dimension;
}
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType, Parent);