- Modificata gestione overlap

- Modificato aggiornamento dimensioni a cascata
This commit is contained in:
Annamaria Sassi
2026-03-02 17:04:11 +01:00
parent 96b6deda20
commit 522625710e
19 changed files with 593 additions and 272 deletions
+72 -29
View File
@@ -171,6 +171,12 @@ namespace WebWindowComplex.Models
// All'area Split aggiunto le due aree Splitted
for (int i = 0; i < 2; i++)
AreaList[0].AreaList.Add(newSplittedList[i]);
Frame frame = ParentWindow.AreaList.First();
if(frame != null)
{
frame.SearchAreaList(frame, frame.AvailWidthArea(), "Width");
frame.SearchAreaList(frame, frame.AvailHeightArea(), "Height");
}
}
public void AddInglesina()
@@ -271,10 +277,31 @@ namespace WebWindowComplex.Models
List<AreaDimension> dimList = new List<AreaDimension>();
foreach (var item in s.SashList)
dimList.Add(new AreaDimension(item.dDimension, item.MeasureType, item.Parent));
if(nameDim.Equals("Width"))
SearchAreaList(node.AreaList.ElementAt(i), s.SashList.ElementAt(i).CalculateAbsoluteValue(dimList, dim), nameDim);
else
if (nameDim.Equals("Width") && s.SashList.First().ElementDimensionList.Count > 0)
{
double widthSash = dim + s.SashList.First().ElementDimensionList.Last().dOverlap
+ s.SashList.Last().ElementDimensionList.ElementAt(1).dOverlap;
double widthAnta = s.SashList.ElementAt(i).CalculateAbsoluteValue(dimList, widthSash);
if(s.bIsDimensionLight || s.AreaList.ElementAt(i) is Split)
widthAnta = widthAnta - s.SashList.ElementAt(i).ElementDimensionList.ElementAt(1).dDimension
- s.SashList.ElementAt(i).ElementDimensionList.Last().dDimension;
SearchAreaList(node.AreaList.ElementAt(i), widthAnta, nameDim);
}
else if(s.SashList.First().ElementDimensionList.Count > 0)
{
if(s.ParentArea is Split split && split.SplitHorizList.Count > 0)
dim = dim + s.SashList.ElementAt(i).ElementDimensionList.First().dOverlap
+ s.SashList.ElementAt(i).ElementDimensionList.ElementAt(s.SashList.ElementAt(i).ElementDimensionList.Count() - 2).dOverlap;
if(s.SashBottomRailQty > 0)
{
foreach (var bottomRail in s.BottomRailElemDimList)
dim = dim - bottomRail.dDimension
+ bottomRail.dOverlap;
}
dim = dim - s.SashList.ElementAt(i).ElementDimensionList.First().dDimension
- s.SashList.ElementAt(i).ElementDimensionList.ElementAt(s.SashList.ElementAt(i).ElementDimensionList.Count() - 2).dDimension;
SearchAreaList(node.AreaList.ElementAt(i), dim, nameDim);
}
}
else if (node.AreaType.Equals(AreaTypes.SPLIT))
{
@@ -284,8 +311,14 @@ namespace WebWindowComplex.Models
{
foreach (var item in s.SplitHorizList)
dimList.Add(new AreaDimension(item.dDimension, item.MeasureType, item.Parent));
if(nameDim.Equals("Width"))
SearchAreaList(node.AreaList.ElementAt(i), dim, nameDim);
if (nameDim.Equals("Width"))
{
double widthTot = dim;
if(s.AreaList.ElementAt(i).AreaList.First() is Sash sash && sash != null)
widthTot = widthTot + sash.SashList.Last().ElementDimensionList.ElementAt(1).dOverlap
+ sash.SashList.First().ElementDimensionList.Last().dOverlap;
SearchAreaList(node.AreaList.ElementAt(i), widthTot, nameDim);
}
else
SearchAreaList(node.AreaList.ElementAt(i), s.SplitHorizList.ElementAt(i).CalculateAbsoluteValue(dimList, dim), nameDim);
}
@@ -293,8 +326,13 @@ namespace WebWindowComplex.Models
{
foreach (var item in s.SplitVertList)
dimList.Add(new AreaDimension(item.dDimension, item.MeasureType, item.Parent));
if(nameDim.Equals("Width"))
SearchAreaList(node.AreaList.ElementAt(i), s.SplitVertList.ElementAt(i).CalculateAbsoluteValue(dimList, dim), nameDim);
if (nameDim.Equals("Width"))
{
double width = dim;
foreach (var elem in s.ElemDimVertList)
width = width - elem.dDimension;
SearchAreaList(node.AreaList.ElementAt(i), s.SplitVertList.ElementAt(i).CalculateAbsoluteValue(dimList, width), nameDim);
}
else
SearchAreaList(node.AreaList.ElementAt(i), dim, nameDim);
}
@@ -335,31 +373,21 @@ namespace WebWindowComplex.Models
if (countAbsolute == sash.SashList.Count)
{
double sum = sash.SashList.Sum(x => x.dDimension);
if (sash.ParentArea is Frame || (sash.ParentArea.ParentArea is Split && split.SplitHorizList.Count > 0))
if ((sash.ParentArea.ParentArea is Split && split.SplitHorizList.Count > 0))
{
//Frame? frame = sash.m_ParentWindow.AreaList.FirstOrDefault();
//if (frame != null)
// dim = dim + frame.ElementDimensionList.ElementAt(1).dOverlap
// + frame.ElementDimensionList.Last().dOverlap;
if(sash.SashList.Count == 1)
dim = dim + sash.SashList.First().ElementDimensionList.ElementAt(1).dOverlap;
//if(sash.SashList.Count == 1)
// dim = dim + sash.SashList.First().ElementDimensionList.ElementAt(1).dOverlap;
for (int i = 1; i < sash.SashList.Count; i++)
dim = dim + sash.SashList.ElementAt(i).ElementDimensionList.Last().dOverlap;
}
else if (sash.ParentArea.ParentArea is Split && split.SplitVertList.Count > 0)
{
Frame? frame = sash.m_ParentWindow.AreaList.FirstOrDefault();
int indexSplit = sash.ParentArea.ParentArea.AreaList.IndexOf(sash.ParentArea) == 0 ? 0 : sash.ParentArea.ParentArea.AreaList.IndexOf(sash.ParentArea) - 1;
string nameProfile = "";
if (split.ElemDimVertList.ElementAt(indexSplit).sName == "" ||
string.Join("_", split.ElemDimVertList.ElementAt(indexSplit).sName.Split('_').Skip(1)).Equals("Mixed_Split"))
nameProfile = "Mixed_Split_Top";
else
nameProfile = string.Join("_", split.ElemDimVertList.ElementAt(indexSplit).sName.Split('_').Skip(1));
string overlapName = nameProfile + "_Overlap";
if (frame != null)
dim = dim + Window.m_ParameterList.GetValueOrDefault(overlapName)
+ frame.ElementDimensionList.Last().dOverlap;
dim = dim + sash.SashList.First().ElementDimensionList.ElementAt(1).dOverlap
+ sash.SashList.First().ElementDimensionList.Last().dOverlap;
}
if (sash.bIsDimensionLight)
{
@@ -372,6 +400,13 @@ namespace WebWindowComplex.Models
+ sash.SashList[i].ElementDimensionList.Last().dOverlap;
}
}
else if (sash.SashList.Count > 1 && dim > sum)
{
for (int i = 1; i < sash.SashList.Count; i++)
{
dim = dim + sash.SashList[i].ElementDimensionList.Last().dOverlap;
}
}
double res = dim - sum;
foreach (var sashDim in sash.SashList)
{
@@ -394,28 +429,36 @@ namespace WebWindowComplex.Models
else if (area is Split split)
{
List<SplitDimension> splitList = new List<SplitDimension>();
List<SplitElementDimension> elemList = new List<SplitElementDimension>();
double sum = 0;
if (nameDim.Equals("Width"))
{
splitList = split.SplitVertList;
foreach (var item in split.ElemDimVertList)
sum = sum + item.dDimension;
elemList = split.ElemDimVertList;
//foreach (var item in split.ElemDimVertList)
// sum = sum + item.dDimension;
}
else
{
splitList = split.SplitHorizList;
foreach (var item in split.ElemDimHorizList)
sum = sum + item.dDimension;
elemList = split.ElemDimHorizList;
//foreach (var item in split.ElemDimHorizList)
// sum = sum + item.dDimension;
}
int countAbsolute = splitList.Where(x => x.MeasureType.Equals(MeasureTypes.ABSOLUTE)).Count();
if (countAbsolute != 0 && countAbsolute == splitList.Count)
{
sum = sum + splitList.Sum(x => x.dDimension);
double res = 0;
res = dim - sum;
List<AreaDimension> dimensionList = new List<AreaDimension>();
foreach (var i in splitList)
dimensionList.Add(new AreaDimension(i.dDimension, i.MeasureType, i.Parent));
double widthGlass = dim;
foreach (var item in elemList)
widthGlass = widthGlass - item.dDimension;
foreach (var item in splitList)
{
item.SetDimension(item.dDimension + res / countAbsolute);
double widthPerc = item.ConvertDimension(dimensionList, item.MeasureType, MeasureTypes.PERCENTAGE, sum, splitList.IndexOf(item));
item.SetDimension(widthGlass * widthPerc / 100);
}
}
}
+13 -8
View File
@@ -122,7 +122,7 @@ namespace WebWindowComplex.Models
/// <param name="oldType"> Vecchio tipo </param>
/// <param name="newType"> Nuovo tipo </param>
/// <returns></returns>
public double ConvertDimension(List<AreaDimension> itemList, MeasureTypes oldType, MeasureTypes newType, double widthTot, int indexSash, double overlap)
public double ConvertDimension(List<AreaDimension> itemList, MeasureTypes oldType, MeasureTypes newType, double dimTot, int indexSash)
{
switch (oldType)
{
@@ -131,11 +131,11 @@ namespace WebWindowComplex.Models
if (newType.Equals(MeasureTypes.PERCENTAGE))
{
//return Double.Round((m_dDimension / m_Parent.Width) * 100, 1);
return (dDimension / widthTot) * 100;
return (dDimension / dimTot) * 100;
}
else
{
return Double.Round(CalculatePropVal(itemList, indexSash, widthTot));
return Double.Round(CalculatePropVal(itemList, indexSash, dimTot));
}
}
case MeasureTypes.PROPORTIONAL:
@@ -143,12 +143,12 @@ namespace WebWindowComplex.Models
if (newType.Equals(MeasureTypes.ABSOLUTE))
{
//return Double.Round(ConvertFromPropVal(newType), 2);
return ConvertFromPropVal(itemList, newType, widthTot);
return ConvertFromPropVal(itemList, newType, dimTot);
}
else
{
//return Double.Round(ConvertFromPropVal(newType), 1);
return ConvertFromPropVal(itemList, newType, widthTot);
return ConvertFromPropVal(itemList, newType, dimTot);
}
}
case MeasureTypes.PERCENTAGE:
@@ -156,11 +156,11 @@ namespace WebWindowComplex.Models
if (newType.Equals(MeasureTypes.ABSOLUTE))
{
//return Double.Round((m_dDimension * m_Parent.Width) / 100, 2);
return (dDimension * widthTot) / 100;
return (dDimension * dimTot) / 100;
}
else
{
return Double.Round(CalculatePropVal(itemList, indexSash, widthTot));
return Double.Round(CalculatePropVal(itemList, indexSash, dimTot));
}
}
}
@@ -263,7 +263,12 @@ namespace WebWindowComplex.Models
indexSash = itemList.IndexOf(this);
int indElem = indexSash == 0 ? 1 : s.SashList.ElementAt(indexSash).ElementDimensionList.Count - 1;
if (!s.bIsDimensionLight && s.SashList.ElementAt(indexSash).ElementDimensionList.Count > 0)
overlapElem = s.SashList.ElementAt(indexSash).ElementDimensionList.ElementAt(indElem).dOverlap / 2;
{
if(s.SashList.Count > 0)
overlapElem = s.SashList.ElementAt(indexSash).ElementDimensionList.ElementAt(indElem).dOverlap / 2;
else
overlapElem = s.SashList.ElementAt(indexSash).ElementDimensionList.ElementAt(indElem).dOverlap;
}
}
return dDimension;
}
+50 -13
View File
@@ -54,15 +54,15 @@ namespace WebWindowComplex.Models
if(elemList.ElementAt(m_nIndex).MeasureType is MeasureTypes.ABSOLUTE ||
elemList.ElementAt(m_nIndex - 1).MeasureType is MeasureTypes.ABSOLUTE)
{
if (value > dimensioneOld)
if (m_dDimension > dimensioneOld)
{
dimTot = dimTot - (value - dimensioneOld);
dimTot = dimTot - (m_dDimension - dimensioneOld);
}
else
{
dimTot = dimTot + (dimensioneOld - value);
dimTot = dimTot + (dimensioneOld - m_dDimension);
}
double diff = (dimensioneOld - value)/2;
double diff = (dimensioneOld - m_dDimension) /2;
if(elemList.ElementAt(m_nIndex - 1).MeasureType is MeasureTypes.ABSOLUTE)
elemList.ElementAt(m_nIndex - 1).SetDimension(elemList.ElementAt(m_nIndex - 1).dDimension + diff);
if(elemList.ElementAt(m_nIndex).MeasureType is MeasureTypes.ABSOLUTE)
@@ -74,6 +74,9 @@ namespace WebWindowComplex.Models
foreach (var itemDim in split.SplitHorizList)
dimList.Add(new AreaDimension(itemDim.dDimension, itemDim.MeasureType, itemDim.Parent));
double height = ParentArea.CalculateWidthArea(ParentArea.ParentWindow.AreaList[0], ParentArea.ParentWindow.AreaList[0].AvailHeightArea());
List<SplitElementDimension> horizElemList = split.ElemDimHorizList.Where(x=>x.m_nIndex== 1).ToList();
foreach (var elem in horizElemList)
height = height - elem.dDimension;
for (int i = 0; i < split.AreaList.Count; i++)
{
if (i < split.SplitHorizList.Count)
@@ -81,7 +84,7 @@ namespace WebWindowComplex.Models
SplitDimension currSplitDim = split.SplitHorizList[i];
double dim = currSplitDim.dDimension;
if (!(currSplitDim.MeasureType.Equals(MeasureTypes.ABSOLUTE)))
dim = currSplitDim.ConvertDimension(dimList, currSplitDim.MeasureType, MeasureTypes.ABSOLUTE, height, -1, 0);
dim = currSplitDim.ConvertDimension(dimList, currSplitDim.MeasureType, MeasureTypes.ABSOLUTE, height, -1);
split.AreaList.ElementAt(i).SearchAreaList(split.AreaList.ElementAt(i), dim, "Height");
}
}
@@ -92,6 +95,9 @@ namespace WebWindowComplex.Models
foreach (var itemDim in split.SplitVertList)
dimList.Add(new AreaDimension(itemDim.dDimension, itemDim.MeasureType, itemDim.Parent));
double width = ParentArea.CalculateWidthArea(ParentArea.ParentWindow.AreaList[0], ParentArea.ParentWindow.AreaList[0].AvailWidthArea());
List<SplitElementDimension> vertElemList = split.ElemDimVertList.Where(x => x.m_nIndex == 1).ToList();
foreach (var elem in vertElemList)
width = width - elem.dDimension;
for (int i = 0; i < split.AreaList.Count; i++)
{
if (i < split.SplitVertList.Count)
@@ -99,7 +105,7 @@ namespace WebWindowComplex.Models
SplitDimension currSplitDim = split.SplitVertList[i];
double dim = currSplitDim.dDimension;
if (!(currSplitDim.MeasureType.Equals(MeasureTypes.ABSOLUTE)))
dim = currSplitDim.ConvertDimension(dimList, currSplitDim.MeasureType, MeasureTypes.ABSOLUTE, width, -1, 0);
dim = currSplitDim.ConvertDimension(dimList, currSplitDim.MeasureType, MeasureTypes.ABSOLUTE, width, -1);
split.AreaList.ElementAt(i).SearchAreaList(split.AreaList.ElementAt(i), dim, "Width");
}
}
@@ -122,18 +128,18 @@ namespace WebWindowComplex.Models
}
if(sash.SashList.ElementAt(indSash).MeasureType is MeasureTypes.ABSOLUTE)
{
if (value > dimensioneOld)
if (m_dDimension > dimensioneOld)
{
double diff = (value - dimensioneOld);
double diff = (m_dDimension - dimensioneOld);
sash.SashList.ElementAt(indSash).SetDimension(sash.SashList.ElementAt(indSash).dDimension - diff);
}
else
{
double diff = dimensioneOld - value;
double diff = dimensioneOld - m_dDimension;
sash.SashList.ElementAt(indSash).SetDimension(sash.SashList.ElementAt(indSash).dDimension + diff);
}
for (int i = 0; i < sash.AreaList.Count; i++)
sash.AreaList.ElementAt(i).SearchAreaList(sash.AreaList.ElementAt(i), sash.SashList.ElementAt(i).dDimension, "Width");
for (int i = 0; i < sash.AreaList.Count; i++)
sash.AreaList.ElementAt(i).SearchAreaList(sash.AreaList.ElementAt(i), sash.SashList.ElementAt(i).dDimension, "Width");
}
}
}
@@ -193,7 +199,6 @@ namespace WebWindowComplex.Models
return m_dOverlap;
}
}
public double dMaxDim
{
get
@@ -201,7 +206,6 @@ namespace WebWindowComplex.Models
return m_dMax;
}
}
public double dMinDim
{
get
@@ -250,6 +254,39 @@ namespace WebWindowComplex.Models
return newElementDimension;
}
public override bool Equals(object obj)
{
return Equals(obj as ElementDimension);
}
public bool Equals(ElementDimension other)
{
if (other is null)
return false;
if (dDimension != other.dDimension)
return false;
if (dOverlap != other.dOverlap)
return false;
if (ParentArea != other.ParentArea)
return false;
if (nIndex != other.nIndex)
return false;
if (sName != other.sName)
return false;
if (dMaxDim != other.dMaxDim)
return false;
if (dMinDim != other.dMinDim)
return false;
if (ReferenceEquals(this, other))
return true;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
#endregion Public Methods
#region Internal Methods
+21 -16
View File
@@ -90,22 +90,22 @@ namespace WebWindowComplex.Models
m_SelThreshold = newThreshold;
else
m_SelThreshold = new Threshold(3, "Bottom");
string profileName = "";
if (m_SelThreshold.Name.Equals("Threshold"))
{
ElementDimensionList.First().SetNameElement("Frame_Sash_Threshold");
ElementDimensionList.First().SetMinDimension(Window.m_ParameterList.GetValueOrDefault(ElementDimensionList.First().sName + "_DimMin"));
ElementDimensionList.First().SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(ElementDimensionList.First().sName + "_DimMax"));
ElementDimensionList.First().SetDimension(Window.m_ParameterList.GetValueOrDefault(ElementDimensionList.First().sName + "_DimStd"));
string overlapName = "Sash_Bottom_Overlap";
ElementDimensionList.First().SetOverlapElement(Window.m_ParameterList.GetValueOrDefault(overlapName));
}
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, AvailWidthArea(), "Width");
SearchAreaList(this, AvailHeightArea(), "Height");
}
//ElementDimensionList.Clear();
}
}
@@ -453,6 +453,11 @@ namespace WebWindowComplex.Models
if (AreaList.First() is Sash)
overlap = ElementDimensionList.First().dOverlap +
ElementDimensionList.ElementAt(ElementDimensionList.Count() - 2).dOverlap;
if(BottomRailQty > 0)
{
foreach (var bottomRail in BottomRailElemDimList)
dim = dim - bottomRail.dDimension;
}
return dim - ElementDimensionList.First().dDimension -
ElementDimensionList.ElementAt(ElementDimensionList.Count() - 2).dDimension +
overlap;
@@ -476,12 +481,12 @@ namespace WebWindowComplex.Models
if(AreaList.First() is Sash)
overlap = ElementDimensionList.ElementAt(1).dOverlap +
ElementDimensionList.Last().dOverlap;
if (AreaList.First() is Split split)
{
if(split.SplitHorizList.Count > 0)
overlap = ElementDimensionList.ElementAt(1).dOverlap +
ElementDimensionList.Last().dOverlap;
}
//if (AreaList.First() is Split split)
//{
// if(split.SplitHorizList.Count > 0)
// overlap = ElementDimensionList.ElementAt(1).dOverlap +
// ElementDimensionList.Last().dOverlap;
//}
return dim - ElementDimensionList.ElementAt(1).dDimension -
ElementDimensionList.Last().dDimension +
overlap;
+27 -33
View File
@@ -345,14 +345,17 @@ namespace WebWindowComplex.Models
{
adList.Add(new AreaDimension(it.dDimension, it.SelMeasureType, it.Parent));
}
deleteDim = ad.ConvertDimension(adList, itemDelete.SelMeasureType, m_SashList[SashList.Count - 1].SelMeasureType, widthTot, m_SashList.IndexOf(itemDelete), SashList.Last().ElementDimensionList.Last().dOverlap);
deleteDim = ad.ConvertDimension(adList, itemDelete.SelMeasureType, m_SashList[SashList.Count - 1].SelMeasureType, widthTot, m_SashList.IndexOf(itemDelete));
}
else
{
deleteDim = itemDelete.dDimension;
}
dLastDimension = deleteDim + m_SashList[SashList.Count - 1].dDimension + splitDelete;
SashList[SashList.Count - 1].SetDimension(dLastDimension);
if(SashList[SashList.Count - 1].SelMeasureType is MeasureTypes.PROPORTIONAL && SashList.Count == 1)
SashList[SashList.Count - 1].SetDimension(1);
else
SashList[SashList.Count - 1].SetDimension(dLastDimension);
if (value == 1)
SashList.First().SetHasHandle(true);
}
@@ -430,7 +433,13 @@ namespace WebWindowComplex.Models
}
}
for (int i = 0; i < AreaList.Count; i++)
AreaList.ElementAt(i).SearchAreaList(AreaList.ElementAt(i), SashList.ElementAt(i).dDimension, "Width");
{
double width = SashList.ElementAt(i).dDimension;
if(SashList.ElementAt(i).ElementDimensionList.Count > 0)
width = width - SashList.ElementAt(i).ElementDimensionList.ElementAt(1).dDimension
- SashList.ElementAt(i).ElementDimensionList.Last().dDimension;
AreaList.ElementAt(i).SearchAreaList(AreaList.ElementAt(i), width, "Width");
}
}
RefreshHardwareList();
ClearHardwareOptionList();
@@ -484,6 +493,7 @@ namespace WebWindowComplex.Models
BottomRailElemDimList.Last().SetMinDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimMin"));
BottomRailElemDimList.Last().SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimMax"));
BottomRailElemDimList.Last().SetDimension(Window.m_ParameterList.GetValueOrDefault(BottomRailElemDimList.Last().sName + "_DimStd"));
BottomRailElemDimList.Last().SetOverlapElement(Window.m_ParameterList.GetValueOrDefault("Sash_BottomRail_Overlap"));
if (value > 1 && BottomRailElemDimList.Count - 2 >= 0)
{
BottomRailElemDimList.ElementAt(BottomRailElemDimList.Count - 2).SetNameElement("Sash_Rail");
@@ -514,6 +524,10 @@ namespace WebWindowComplex.Models
{
m_bSashBottomRail = false;
}
Frame frame = ParentWindow.AreaList.First();
if (frame.AreaList.Count > 0 && frame != null)
frame.SearchAreaList(frame, frame.AvailHeightArea(), "Height");
//ParentWindow.AreaList.First().SearchAreaList(ParentWindow.AreaList.First(), ParentWindow.AreaList.First().AvailHeightArea(), "Height");
}
}
}
@@ -1135,36 +1149,22 @@ namespace WebWindowComplex.Models
break;
}
}
if (split.ParentArea is Frame frame && split.AreaList.ElementAt(i).AreaList.First() is Sash)
{
string overlapName = string.Join("_", split.ElemDimVertList.First().sName.Split('_').Skip(1));
if (overlapName.Equals("Mixed_Split"))
overlapName = overlapName + "_Top_Overlap";
else
overlapName = overlapName + "_Overlap";
if (i == 0)
{
dim = dim + frame.ElementDimensionList.Last().dOverlap
+ Window.m_ParameterList.GetValueOrDefault(overlapName);
}
else if (i == split.SplitVertList.Count - 1)
{
dim = dim + frame.ElementDimensionList.ElementAt(1).dOverlap
+ Window.m_ParameterList.GetValueOrDefault(overlapName);
}
else
{
dim = dim + Window.m_ParameterList.GetValueOrDefault(overlapName)
+ Window.m_ParameterList.GetValueOrDefault(overlapName);
}
}
if (split.ParentArea is Frame frame && split.AreaList.ElementAt(i).AreaList.First() is Sash sash)
dim = dim + sash.SashList.First().ElementDimensionList.Last().dOverlap
+ sash.SashList.Last().ElementDimensionList.ElementAt(1).dOverlap;
res = CalculateWidthSashGroup(item, dim, res);
if (res.m_Dimension != -1 && res.m_Found)
return res;
}
else
{
res = CalculateWidthSashGroup(item, width, res);
double dim = width;
if(split.SplitHorizList.Count > 0 && split.AreaList.First().AreaList.First() is Sash sash)
{
dim = dim + sash.SashList.First().ElementDimensionList.Last().dOverlap
+ sash.SashList.Last().ElementDimensionList.ElementAt(1).dOverlap;
}
res = CalculateWidthSashGroup(item, dim, res);
if (res.m_Dimension != -1 && res.m_Found)
return res;
}
@@ -1199,12 +1199,6 @@ namespace WebWindowComplex.Models
if (res.m_Dimension != -1 && res.m_Found)
return res;
}
else if (area is Frame frame)
{
res = CalculateWidthSashGroup(item, frame.AvailWidthArea(), res);
if (res.m_Dimension != -1 && res.m_Found)
return res;
}
else
{
res = CalculateWidthSashGroup(item, width, res);
+23 -39
View File
@@ -289,12 +289,6 @@ namespace WebWindowComplex.Models
break;
}
}
double overlapCurrSash = 0;
if (!Parent.bIsDimensionLight)
{
int j = nIndex == 0 ? 1 : Parent.SashList.ElementAt(nIndex).ElementDimensionList.Count - 1;
overlapCurrSash = Parent.SashList.ElementAt(nIndex).ElementDimensionList.ElementAt(j).dOverlap / 2;
}
int indexDimChange = 0;
// L'anta modificata non è l'ultima
if (nIndex < absoluteValList.Count - 1)
@@ -302,20 +296,14 @@ namespace WebWindowComplex.Models
// L'anta modificata è l'ultima
else if (dimensions.Count > 1)
indexDimChange = nIndex - 1;
double overlap = 0;
if (!Parent.bIsDimensionLight)
{
int j = indexDimChange == 0 ? 1 : Parent.SashList.ElementAt(nIndex + 1).ElementDimensionList.Count - 1;
overlap = Parent.SashList.ElementAt(indexDimChange).ElementDimensionList.ElementAt(j).dOverlap / 2;
}
if (value < m_dDimension)
{
absoluteValList[indexDimChange] = absoluteValList[indexDimChange] + (absoluteValList[nIndex] - (valueInAbsolute - overlapCurrSash)) + overlap;
absoluteValList[indexDimChange] = absoluteValList[indexDimChange] + (absoluteValList[nIndex] - valueInAbsolute);
absoluteValList[nIndex] = valueInAbsolute;
}
else
{
absoluteValList[indexDimChange] = absoluteValList[indexDimChange] - ((valueInAbsolute - overlapCurrSash) - absoluteValList[nIndex]) + overlap;
absoluteValList[indexDimChange] = absoluteValList[indexDimChange] - (valueInAbsolute - absoluteValList[nIndex]);
absoluteValList[nIndex] = valueInAbsolute;
}
if (MeasureType.Equals(MeasureTypes.PROPORTIONAL))
@@ -335,7 +323,7 @@ namespace WebWindowComplex.Models
if (!(MeasureType.Equals(MeasureTypes.ABSOLUTE)))
{
double width = Parent.CalculateWidthArea(frame, frame.AvailWidthArea());
dim = ConvertDimension(dimList, MeasureType, MeasureTypes.ABSOLUTE, width, -1, 0);
dim = ConvertDimension(dimList, MeasureType, MeasureTypes.ABSOLUTE, width, -1);
}
if (item.AreaList.First() is Split s)
{
@@ -449,15 +437,15 @@ namespace WebWindowComplex.Models
adList.Add(new AreaDimension(it.m_dDimension, it.SelMeasureType, it.Parent));
}
double overlap = 0;
if (!Parent.bIsDimensionLight)
{
int index = m_Parent.SashList.IndexOf(this);
if (index == 0)
overlap = m_Parent.SashList.ElementAt(index).ElementDimensionList.ElementAt(1).dOverlap;
else
overlap = m_Parent.SashList.ElementAt(index).ElementDimensionList.Last().dOverlap;
}
m_dDimension = ad.ConvertDimension(adList, SelMeasureType, newType, widthTot, nSashId - 1, overlap);
//if (!Parent.bIsDimensionLight)
//{
// int index = m_Parent.SashList.IndexOf(this);
// if (index == 0)
// overlap = m_Parent.SashList.ElementAt(index).ElementDimensionList.ElementAt(1).dOverlap;
// else
// overlap = m_Parent.SashList.ElementAt(index).ElementDimensionList.Last().dOverlap;
//}
m_dDimension = ad.ConvertDimension(adList, SelMeasureType, newType, widthTot, nSashId - 1);
SelMeasureType = (MeasureTypes)value;
}
}
@@ -560,27 +548,23 @@ namespace WebWindowComplex.Models
}
}
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType, Parent);
//if(SelMeasureType is MeasureTypes.ABSOLUTE)
// ad = new AreaDimension(dDimension - ElementDimensionList.ElementAt(1).dOverlap, SelMeasureType);
//else
// ad = new AreaDimension(dDimension, SelMeasureType);
List<AreaDimension> newDimensions = new List<AreaDimension>();
foreach(var item in m_Parent.SashList)
{
newDimensions.Add(new AreaDimension(item.dDimension, item.SelMeasureType, item.Parent));
}
int index = m_Parent.SashList.IndexOf(this);
double overlap = 0;
if (index == 0)
overlap = m_Parent.SashList.ElementAt(index).ElementDimensionList.ElementAt(1).dOverlap;
else
overlap = m_Parent.SashList.ElementAt(index).ElementDimensionList.Last().dOverlap;
m_dDimension = ad.ConvertDimension(newDimensions, SelMeasureType, newType, widthTot, indexSash, overlap);
if (newType is MeasureTypes.PROPORTIONAL)
{
for (int i = 0; i < newDimensions.Count; i++)
m_Parent.SashList.ElementAt(i).SetDimension(newDimensions.ElementAt(i).dDimension);
}
//double overlap = 0;
//if (index == 0)
// overlap = m_Parent.SashList.ElementAt(index).ElementDimensionList.ElementAt(1).dOverlap;
//else
// overlap = m_Parent.SashList.ElementAt(index).ElementDimensionList.Last().dOverlap;
m_dDimension = ad.ConvertDimension(newDimensions, SelMeasureType, newType, widthTot, indexSash);
//if (newType is MeasureTypes.PROPORTIONAL)
//{
// for (int i = 0; i < newDimensions.Count; i++)
// m_Parent.SashList.ElementAt(i).SetDimension(newDimensions.ElementAt(i).dDimension);
//}
SelMeasureType = (MeasureTypes)value;
}
}
+2 -2
View File
@@ -753,7 +753,7 @@ namespace WebWindowComplex.Models
double height = ParentArea.CalculateHeightArea(ParentArea.ParentWindow.AreaList[0], ParentArea.ParentWindow.AreaList[0].AvailHeightArea());
foreach (var elem in ElemDimHorizList)
height = height - elem.dDimension;
dim = currSplitDim.ConvertDimension(dimList, currSplitDim.MeasureType, MeasureTypes.ABSOLUTE, height, -1, 0);
dim = currSplitDim.ConvertDimension(dimList, currSplitDim.MeasureType, MeasureTypes.ABSOLUTE, height, -1);
}
AreaList.ElementAt(i).SearchAreaList(AreaList.ElementAt(i), dim, "Height");
}
@@ -775,7 +775,7 @@ namespace WebWindowComplex.Models
double width = ParentArea.CalculateWidthArea(ParentArea.ParentWindow.AreaList[0], ParentArea.ParentWindow.AreaList[0].AvailWidthArea());
foreach (var elem in ElemDimVertList)
width = width - elem.dDimension;
dim = currSplitDim.ConvertDimension(dimList, currSplitDim.MeasureType, MeasureTypes.ABSOLUTE, width, -1, 0);
dim = currSplitDim.ConvertDimension(dimList, currSplitDim.MeasureType, MeasureTypes.ABSOLUTE, width, -1);
}
AreaList.ElementAt(i).SearchAreaList(AreaList.ElementAt(i), dim, "Width");
}
+77 -96
View File
@@ -238,7 +238,7 @@ namespace WebWindowComplex.Models
SplitDimension currSplitDim = m_Parent.SplitHorizList[i];
double dim = currSplitDim.dDimension;
if (!(currSplitDim.MeasureType.Equals(MeasureTypes.ABSOLUTE)))
dim = currSplitDim.ConvertDimension(dimList, currSplitDim.MeasureType, MeasureTypes.ABSOLUTE, height, -1, 0);
dim = currSplitDim.ConvertDimension(dimList, currSplitDim.MeasureType, MeasureTypes.ABSOLUTE, height, -1);
m_Parent.AreaList.ElementAt(i).SearchAreaList(m_Parent.AreaList.ElementAt(i), dim, "Height");
}
if (m_Parent.SplitVertList.Count > 0 && i < m_Parent.SplitVertList.Count)
@@ -249,7 +249,7 @@ namespace WebWindowComplex.Models
SplitDimension currSplitDim = m_Parent.SplitVertList[i];
double dim = currSplitDim.dDimension;
if (!(currSplitDim.MeasureType.Equals(MeasureTypes.ABSOLUTE)))
dim = currSplitDim.ConvertDimension(dimList, currSplitDim.MeasureType, MeasureTypes.ABSOLUTE, width, -1, 0);
dim = currSplitDim.ConvertDimension(dimList, currSplitDim.MeasureType, MeasureTypes.ABSOLUTE, width, -1);
m_Parent.AreaList.ElementAt(i).SearchAreaList(m_Parent.AreaList.ElementAt(i), dim, "Width");
}
}
@@ -310,7 +310,7 @@ namespace WebWindowComplex.Models
{
adList.Add(new AreaDimension(it.dDimension, it.SelMeasureType, it.Parent));
}
m_dDimension = ad.ConvertDimension(adList, m_SelMeasureType, newType, tot, splitList.IndexOf(this), 0);
m_dDimension = ad.ConvertDimension(adList, m_SelMeasureType, newType, tot, splitList.IndexOf(this));
m_SelMeasureType = (MeasureTypes)value;
}
}
@@ -354,6 +354,9 @@ namespace WebWindowComplex.Models
if(split.SplitVertList.Count > 0)
{
int index = i;
double widthGlass = width;
foreach (var elem in split.ElemDimVertList)
widthGlass = widthGlass - elem.dDimension;
if (split.SelSplitShape is SplitShapes.GRID)
index = i % split.SplitHorizList.Count;
switch (split.SplitVertList.ElementAt(index).SelMeasureType)
@@ -371,12 +374,12 @@ namespace WebWindowComplex.Models
{
adList.Add(new AreaDimension(it.dDimension, it.SelMeasureType, it.Parent));
}
res = CalculateWidthSplitGroup(item, ad.ConvertFromPropVal(adList, MeasureTypes.ABSOLUTE, width), res);
res = CalculateWidthSplitGroup(item, ad.ConvertFromPropVal(adList, MeasureTypes.ABSOLUTE, widthGlass), res);
break;
}
case MeasureTypes.PERCENTAGE:
{
res = CalculateWidthSplitGroup(item, split.SplitVertList.ElementAt(index).dDimension * width / 100, res);
res = CalculateWidthSplitGroup(item, split.SplitVertList.ElementAt(index).dDimension * widthGlass / 100, res);
break;
}
}
@@ -392,16 +395,34 @@ namespace WebWindowComplex.Models
}
else if (area is Sash sash)
{
double widthTot = width;
double dim = 0;
if (sash.ParentArea.ParentArea is Split)
widthTot = widthTot + sash.SashList.ElementAt(i).ElementDimensionList.ElementAt(1).dOverlap
+ sash.SashList.ElementAt(i).ElementDimensionList.Last().dOverlap;
if (sash.bIsDimensionLight)
{
widthTot = widthTot - sash.SashList.First().ElementDimensionList.ElementAt(1).dDimension
- sash.SashList.First().ElementDimensionList.Last().dDimension;
for (int anta = 1; anta < sash.SashList.Count; anta++)
{
widthTot = widthTot - sash.SashList.ElementAt(anta).ElementDimensionList.ElementAt(1).dDimension
- sash.SashList.ElementAt(anta).ElementDimensionList.Last().dDimension
+ sash.SashList.ElementAt(anta).ElementDimensionList.Last().dOverlap;
}
}
else
{
for (int anta = 1; anta < sash.SashList.Count; anta++)
{
widthTot = widthTot + sash.SashList.ElementAt(anta).ElementDimensionList.Last().dOverlap;
}
}
switch (sash.SashList.ElementAt(i).SelMeasureType)
{
case MeasureTypes.ABSOLUTE:
{
double dim = sash.SashList.ElementAt(i).dDimension;
if (!sash.bIsDimensionLight)
dim = dim -
sash.SashList.ElementAt(i).ElementDimensionList.ElementAt(1).dDimension -
sash.SashList.ElementAt(i).ElementDimensionList.Last().dDimension;
res = CalculateWidthSplitGroup(item, dim, res);
dim = sash.SashList.ElementAt(i).dDimension;
break;
}
case MeasureTypes.PROPORTIONAL:
@@ -409,50 +430,20 @@ namespace WebWindowComplex.Models
AreaDimension ad = new AreaDimension(sash.SashList.ElementAt(i).dDimension, sash.SashList.ElementAt(i).SelMeasureType, sash.SashList.ElementAt(i).Parent);
List<AreaDimension> adList = new List<AreaDimension>();
foreach (var it in sash.SashList)
{
adList.Add(new AreaDimension(it.dDimension, it.SelMeasureType, it.Parent));
}
double widthTot = width;
int index = adList.IndexOf(ad) == 0 ? 1 : adList.Count - 1; ;
double dim = 0;
if (sash.bIsDimensionLight)
{
for (int anta = 0; anta < sash.SashList.Count; anta++)
{
if (anta == 0)
widthTot = widthTot - sash.SashList.ElementAt(anta).ElementDimensionList.ElementAt(1).dDimension
- sash.SashList.ElementAt(anta).ElementDimensionList.Last().dDimension;
else
widthTot = widthTot - sash.SashList.ElementAt(anta).ElementDimensionList.ElementAt(1).dDimension
- sash.SashList.ElementAt(anta).ElementDimensionList.Last().dDimension
+ sash.SashList.ElementAt(anta).ElementDimensionList.Last().dOverlap;
}
dim = ad.ConvertFromPropVal(adList, MeasureTypes.ABSOLUTE, widthTot);
}
else
{
dim = ad.ConvertFromPropVal(adList, MeasureTypes.ABSOLUTE, widthTot)
+ sash.SashList.ElementAt(i).ElementDimensionList.ElementAt(index).dOverlap / 2;
dim = dim -
sash.SashList.ElementAt(i).ElementDimensionList.ElementAt(1).dDimension -
sash.SashList.ElementAt(i).ElementDimensionList.Last().dDimension;
}
res = CalculateWidthSplitGroup(item, dim, res);
dim = ad.ConvertFromPropVal(adList, MeasureTypes.ABSOLUTE, widthTot);
break;
}
case MeasureTypes.PERCENTAGE:
{
double overlapElem = 0;
int indElem = i == 0 ? 1 : sash.SashList.ElementAt(i).ElementDimensionList.Count - 1;
if (!sash.bIsDimensionLight)
overlapElem = sash.SashList.ElementAt(i).ElementDimensionList.ElementAt(indElem).dOverlap / 2;
double dim = sash.SashList.ElementAt(i).dDimension * width / 100 + overlapElem -
sash.SashList.ElementAt(i).ElementDimensionList.ElementAt(1).dDimension -
sash.SashList.ElementAt(i).ElementDimensionList.Last().dDimension;
res = CalculateWidthSplitGroup(item, dim, res);
dim = sash.SashList.ElementAt(i).dDimension * widthTot / 100;
break;
}
}
if (!sash.bIsDimensionLight)
dim = dim - sash.SashList.ElementAt(i).ElementDimensionList.ElementAt(1).dDimension
- sash.SashList.ElementAt(i).ElementDimensionList.Last().dDimension;
res = CalculateWidthSplitGroup(item, dim, res);
if (res.m_Dimension != -1 && res.m_Found)
return res;
}
@@ -497,7 +488,6 @@ namespace WebWindowComplex.Models
case MeasureTypes.ABSOLUTE:
{
dim = split.SplitHorizList.ElementAt(index).dDimension;
//res = CalculateHeightSplitGroup(item, heightItemGroup, res);
break;
}
case MeasureTypes.PROPORTIONAL:
@@ -506,15 +496,10 @@ namespace WebWindowComplex.Models
AreaDimension ad = new AreaDimension(split.SplitHorizList.ElementAt(index).dDimension, split.SplitHorizList.ElementAt(index).SelMeasureType, split.SplitHorizList.ElementAt(index).Parent);
List<AreaDimension> adList = new List<AreaDimension>();
foreach (var it in split.SplitHorizList)
{
adList.Add(new AreaDimension(it.dDimension, it.SelMeasureType, it.Parent));
}
foreach (var elem in split.ElemDimHorizList)
{
heigthGlass = heigthGlass - elem.dDimension;
}
dim = ad.ConvertFromPropVal(adList, MeasureTypes.ABSOLUTE, heigthGlass);
//res = CalculateHeightSplitGroup(item, heightItemGroup, res);
break;
}
case MeasureTypes.PERCENTAGE:
@@ -522,29 +507,13 @@ namespace WebWindowComplex.Models
foreach(var elem in split.ElemDimHorizList)
dim = dim - elem.dDimension;
dim = split.SplitHorizList.ElementAt(index).dDimension * dim / 100;
//res = CalculateHeightSplitGroup(item, heightItemGroup, res);
break;
}
}
if (split.ParentArea is Frame frame && split.AreaList.ElementAt(i).AreaList.First() is Sash)
if (split.ParentArea is Frame frame && split.AreaList.ElementAt(i).AreaList.First() is Sash sash)
{
string pos = i == 0 ? "_Top_Overlap" : "_Bottom_Overlap";
string overlapName = string.Join("_", split.ElemDimHorizList.First().sName.Split('_').Skip(1));
if (i == 0)
{
dim = dim + frame.ElementDimensionList.First().dOverlap
+ Window.m_ParameterList.GetValueOrDefault(overlapName + "_Bottom_Overlap");
}
else if (i == split.SplitHorizList.Count - 1)
{
dim = dim + frame.ElementDimensionList.ElementAt(frame.ElementDimensionList.Count - 2).dOverlap
+ Window.m_ParameterList.GetValueOrDefault(overlapName + "_Top_Overlap");
}
else
{
dim = dim + Window.m_ParameterList.GetValueOrDefault(overlapName + "_Top_Overlap")
+ Window.m_ParameterList.GetValueOrDefault(overlapName + "_Bottom_Overlap");
}
dim = dim + sash.SashList.First().ElementDimensionList.First().dOverlap
+ sash.SashList.First().ElementDimensionList.ElementAt(sash.SashList.First().ElementDimensionList.Count - 2).dOverlap;
}
res = CalculateHeightSplitGroup(item, dim, res);
if (res.m_Dimension != -1 && res.m_Found)
@@ -559,8 +528,23 @@ namespace WebWindowComplex.Models
}
else if (area is Sash sash)
{
double overlap = 0;
double bottomRail = 0;
//if (sash.ParentArea is Split)
// overlap = sash.SashList.First().ElementDimensionList.First().dOverlap
// + sash.SashList.First().ElementDimensionList.ElementAt(sash.SashList.First().ElementDimensionList.Count - 2).dOverlap;
//if (sash.ParentArea.ParentArea is Split)
// overlap = sash.SashList.First().ElementDimensionList.First().dOverlap
// + sash.SashList.First().ElementDimensionList.ElementAt(sash.SashList.First().ElementDimensionList.Count - 2).dOverlap;
if(sash.SashBottomRailQty > 0)
{
foreach (var bottom in sash.BottomRailElemDimList)
bottomRail = bottomRail + bottom.dDimension
- bottom.dOverlap;
}
double dim = height - sash.SashList.First().ElementDimensionList.First().dDimension
- sash.SashList.First().ElementDimensionList.ElementAt(sash.SashList.First().ElementDimensionList.Count - 2).dDimension;
- sash.SashList.First().ElementDimensionList.ElementAt(sash.SashList.First().ElementDimensionList.Count - 2).dDimension
- bottomRail;
res = CalculateHeightSplitGroup(item, dim, res);
if (res.m_Dimension != -1 && res.m_Found)
return res;
@@ -618,28 +602,25 @@ namespace WebWindowComplex.Models
{
newDimensions.Add(new AreaDimension(item.dDimension, item.SelMeasureType, item.Parent));
}
m_dDimension = ad.ConvertDimension(newDimensions, m_SelMeasureType, newType, dimSplitGroup, m_Parent.SplitVertList.IndexOf(this), 0);
if (newType is MeasureTypes.PROPORTIONAL)
{
for (int i = 0; i < m_Parent.SplitVertList.Count; i++)
{
m_Parent.SplitVertList.ElementAt(i).SetDimension(newDimensions.ElementAt(i).dDimension);
}
}
m_dDimension = ad.ConvertDimension(newDimensions, m_SelMeasureType, newType, dimSplitGroup, m_Parent.SplitVertList.IndexOf(this));
//if (newType is MeasureTypes.PROPORTIONAL)
//{
// for (int i = 0; i < m_Parent.SplitVertList.Count; i++)
// {
// m_Parent.SplitVertList.ElementAt(i).SetDimension(newDimensions.ElementAt(i).dDimension);
// }
//}
}
else
{
//tot = (CalculateHeightSplitGroup(m_Parent, HeightTot(), new AreaFound(-1, false))).m_Dimension;
dimSplitGroup = (CalculateHeightSplitGroup(frame, frame.AvailHeightArea(), new AreaFound(-1, false))).m_Dimension;
List<SplitElementDimension> elemList = new List<SplitElementDimension>();
if (Parent.bSplitStartVert || Parent.nSplitQtyVert == 0)
if (Parent.bSplitStartVert)
{
for (int i = 0; i < m_Parent.ElemDimHorizList.Count; i++)
{
if( i == i + m_Parent.ElemDimVertList.Count * i && m_Parent.ElemDimHorizList.ElementAtOrDefault(i) != null)
elemList.Add(m_Parent.ElemDimHorizList.ElementAtOrDefault(i)!);
}
elemList = m_Parent.ElemDimHorizList.Where(x => x.nSubArea == 1).ToList();
}
else
elemList = m_Parent.ElemDimHorizList;
foreach (var item in elemList)
{
dimSplitGroup = dimSplitGroup - item.dDimension;
@@ -650,14 +631,14 @@ namespace WebWindowComplex.Models
{
newDimensions.Add(new AreaDimension(item.dDimension, item.SelMeasureType, item.Parent));
}
m_dDimension = ad.ConvertDimension(newDimensions, m_SelMeasureType, newType, dimSplitGroup, m_Parent.SplitHorizList.IndexOf(this), 0);
if(newType is MeasureTypes.PROPORTIONAL)
{
for(int i = 0; i < m_Parent.SplitHorizList.Count; i++)
{
m_Parent.SplitHorizList.ElementAt(i).SetDimension(newDimensions.ElementAt(i).dDimension);
}
}
m_dDimension = ad.ConvertDimension(newDimensions, m_SelMeasureType, newType, dimSplitGroup, m_Parent.SplitHorizList.IndexOf(this));
//if(newType is MeasureTypes.PROPORTIONAL)
//{
// for(int i = 0; i < m_Parent.SplitHorizList.Count; i++)
// {
// m_Parent.SplitHorizList.ElementAt(i).SetDimension(newDimensions.ElementAt(i).dDimension);
// }
//}
}
m_SelMeasureType = (MeasureTypes)value;
}