- Correzione dimensione split
- Eliminazione commenti - Rinominato variabili
This commit is contained in:
@@ -180,51 +180,51 @@ namespace WebWindowComplex.Models
|
||||
AreaList[0] = AreaList[1];
|
||||
AreaList[1] = tempArea;
|
||||
}
|
||||
Frame f = ParentWindow.AreaList.First();
|
||||
switch (f.Shape)
|
||||
Frame frame = ParentWindow.AreaList.First();
|
||||
switch (frame.Shape)
|
||||
{
|
||||
case Shapes.RECTANGLE:
|
||||
case Shapes.ARC_FULL:
|
||||
case Shapes.TRIANGLE:
|
||||
{
|
||||
SearchAreaList(this, f.DimensionList.Where(x => x.sName.Equals("Width")).First().dDimension, "Width");
|
||||
SearchAreaList(this, f.DimensionList.Where(x => x.sName.Equals("Height")).First().dDimension, "Height");
|
||||
SearchAreaList(this, frame.DimensionList.Where(x => x.sName.Equals("Width")).First().dDimension, "Width");
|
||||
SearchAreaList(this, frame.DimensionList.Where(x => x.sName.Equals("Height")).First().dDimension, "Height");
|
||||
break;
|
||||
}
|
||||
|
||||
case Shapes.RIGHTCHAMFER:
|
||||
{
|
||||
SearchAreaList(this, f.DimensionList.Where(x => x.sName.Equals("Width")).First().dDimension, "Width");
|
||||
SearchAreaList(this, f.DimensionList.Where(x => x.sName.Equals("Left Height")).First().dDimension, "Left Height");
|
||||
SearchAreaList(this, frame.DimensionList.Where(x => x.sName.Equals("Width")).First().dDimension, "Width");
|
||||
SearchAreaList(this, frame.DimensionList.Where(x => x.sName.Equals("Left Height")).First().dDimension, "Left Height");
|
||||
break;
|
||||
}
|
||||
|
||||
case Shapes.LEFTCHAMFER:
|
||||
{
|
||||
SearchAreaList(this, f.DimensionList.Where(x => x.sName.Equals("Width")).First().dDimension, "Width");
|
||||
SearchAreaList(this, f.DimensionList.Where(x => x.sName.Equals("Right Height")).First().dDimension, "Right Height");
|
||||
SearchAreaList(this, frame.DimensionList.Where(x => x.sName.Equals("Width")).First().dDimension, "Width");
|
||||
SearchAreaList(this, frame.DimensionList.Where(x => x.sName.Equals("Right Height")).First().dDimension, "Right Height");
|
||||
break;
|
||||
}
|
||||
|
||||
case Shapes.DOUBLECHAMFER:
|
||||
case Shapes.ARC:
|
||||
{
|
||||
SearchAreaList(this, f.DimensionList.Where(x => x.sName.Equals("Width")).First().dDimension, "Width");
|
||||
SearchAreaList(this, f.DimensionList.Where(x => x.sName.Equals("Full Height")).First().dDimension, "Full Height");
|
||||
SearchAreaList(this, frame.DimensionList.Where(x => x.sName.Equals("Width")).First().dDimension, "Width");
|
||||
SearchAreaList(this, frame.DimensionList.Where(x => x.sName.Equals("Full Height")).First().dDimension, "Full Height");
|
||||
break;
|
||||
}
|
||||
|
||||
case Shapes.DOUBLEARC:
|
||||
{
|
||||
SearchAreaList(this, f.DimensionList.Where(x => x.sName.Equals("Width")).First().dDimension, "Width");
|
||||
SearchAreaList(this, f.DimensionList.Where(x => x.sName.Equals("Full Height")).First().dDimension, "Full Height");
|
||||
SearchAreaList(this, frame.DimensionList.Where(x => x.sName.Equals("Width")).First().dDimension, "Width");
|
||||
SearchAreaList(this, frame.DimensionList.Where(x => x.sName.Equals("Full Height")).First().dDimension, "Full Height");
|
||||
break;
|
||||
}
|
||||
|
||||
case Shapes.THREECENTERARC:
|
||||
{
|
||||
SearchAreaList(this, f.DimensionList.Where(x => x.sName.Equals("Width")).First().dDimension, "Width");
|
||||
SearchAreaList(this, f.DimensionList.Where(x => x.sName.Equals("Full Height")).First().dDimension, "Full Height");
|
||||
SearchAreaList(this, frame.DimensionList.Where(x => x.sName.Equals("Width")).First().dDimension, "Width");
|
||||
SearchAreaList(this, frame.DimensionList.Where(x => x.sName.Equals("Full Height")).First().dDimension, "Full Height");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -293,23 +293,23 @@ namespace WebWindowComplex.Models
|
||||
int countProportional = sash.SashList.Where(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL)).Count();
|
||||
int countPercentage = sash.SashList.Where(x => x.MeasureType.Equals(MeasureTypes.PERCENTAGE)).Count();
|
||||
List<AreaDimension> dimList = new List<AreaDimension>();
|
||||
Split temp = new Split(null, null);
|
||||
Split split = new Split(null, null);
|
||||
if (sash.ParentArea.ParentArea is Split)
|
||||
temp = (Split)sash.ParentArea.ParentArea;
|
||||
if (sash.ParentArea is Frame || (sash.ParentArea.ParentArea is Split && temp.SplitHorizList.Count > 0))
|
||||
split = (Split)sash.ParentArea.ParentArea;
|
||||
if (sash.ParentArea is Frame || (sash.ParentArea.ParentArea is Split && split.SplitHorizList.Count > 0))
|
||||
{
|
||||
Frame f = null;
|
||||
if(temp.SplitHorizList.Count > 0)
|
||||
f = (Frame)sash.ParentArea.ParentArea.ParentArea;
|
||||
Frame frame = new Frame(null, null);
|
||||
if(split.SplitHorizList.Count > 0)
|
||||
frame = (Frame)sash.ParentArea.ParentArea.ParentArea;
|
||||
else
|
||||
f = (Frame)sash.ParentArea;
|
||||
foreach (var i in f.DimensionList)
|
||||
frame = (Frame)sash.ParentArea;
|
||||
foreach (var i in frame.DimensionList)
|
||||
dimList.Add(new AreaDimension(i.dDimension, i.SelMeasureType));
|
||||
}
|
||||
else
|
||||
{
|
||||
Split s = (Split)sash.ParentArea.ParentArea;
|
||||
foreach (var i in s.SplitVertList)
|
||||
//Split s = (Split)sash.ParentArea.ParentArea;
|
||||
foreach (var i in split.SplitVertList)
|
||||
dimList.Add(new AreaDimension(i.dDimension, i.SelMeasureType));
|
||||
}
|
||||
if (countAbsolute == sash.SashList.Count)
|
||||
@@ -348,7 +348,7 @@ namespace WebWindowComplex.Models
|
||||
else if (area is Split)
|
||||
{
|
||||
Split split = (Split)area;
|
||||
List<SplitDimension> splitList = null;
|
||||
List<SplitDimension> splitList = new List<SplitDimension>();
|
||||
if (nameDim.Equals("Width"))
|
||||
splitList = split.SplitVertList;
|
||||
else
|
||||
|
||||
@@ -357,6 +357,32 @@ namespace WebWindowComplex.Models
|
||||
m_ThresholdList.Clear();
|
||||
m_ThresholdList = m_AllThresholdList.GetValueOrDefault(ParentWindow.sProfilePath);
|
||||
}
|
||||
|
||||
public double HeightFrame()
|
||||
{
|
||||
switch (SelShapeIndex)
|
||||
{
|
||||
case (int)Shapes.RECTANGLE:
|
||||
case (int)Shapes.TRIANGLE:
|
||||
case (int)Shapes.ARC_FULL:
|
||||
{
|
||||
return DimensionList.Where(x => x.sName == "Height").First().dDimension;
|
||||
}
|
||||
case (int)Shapes.RIGHTCHAMFER:
|
||||
{
|
||||
return DimensionList.Where(x => x.sName == "Left Height").First().dDimension;
|
||||
}
|
||||
case (int)Shapes.LEFTCHAMFER:
|
||||
{
|
||||
return DimensionList.Where(x => x.sName == "Right Height").First().dDimension;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return DimensionList.Where(x => x.sName == "Full Height").First().dDimension;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override Frame Copy(Area ParentArea)
|
||||
{
|
||||
return null;
|
||||
|
||||
@@ -34,18 +34,6 @@ namespace WebWindowComplex.Models
|
||||
|
||||
#region Public Properties
|
||||
|
||||
//public bool bIsMeasureGlass
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return m_bIsMeasureGlass;
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// m_bIsMeasureGlass = value;
|
||||
// }
|
||||
//}
|
||||
|
||||
public bool bIsSashVertical
|
||||
{
|
||||
get
|
||||
@@ -485,7 +473,6 @@ namespace WebWindowComplex.Models
|
||||
Fill newFill = Fill.CreateFill(ParentArea, FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
ParentArea.AreaList.Add(newFill);
|
||||
//m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
|
||||
public void SetSelFamilyHardware(string sFamilyHw)
|
||||
@@ -508,7 +495,6 @@ namespace WebWindowComplex.Models
|
||||
public void UpdateShape(string newShape)
|
||||
{
|
||||
m_CurrShape = newShape;
|
||||
bool noHwValid = false;
|
||||
// la famiglia hw è vuota seleziono il primo hardware valido e utilizzo la sua famiglia
|
||||
if(string.IsNullOrEmpty(m_SelFamilyHardware) || m_SelFamilyHardware == "")
|
||||
{
|
||||
@@ -519,7 +505,6 @@ namespace WebWindowComplex.Models
|
||||
);
|
||||
if(listHwValid == null)
|
||||
{
|
||||
noHwValid = true;
|
||||
var familyHwValid = Sash.m_HardwareCompleteList
|
||||
.Select(x => x.FamilyName)
|
||||
.First();
|
||||
@@ -815,8 +800,6 @@ namespace WebWindowComplex.Models
|
||||
for (var SplitIndex = m_SashList.Count; SplitIndex <= Qty - 1; SplitIndex++)
|
||||
{
|
||||
SashDimension newSashDim = new SashDimension(dNewDimension, MeasureTypes.PERCENTAGE, this, SplitIndex + 1);
|
||||
//for (var JointIndex = 0; JointIndex <= 3; JointIndex++)
|
||||
// newSashDim.JointList.Add(new Joint(this, JointIndex + 1, Joints.FULL_H));
|
||||
SashList.Add(newSashDim);
|
||||
}
|
||||
}
|
||||
@@ -883,8 +866,6 @@ namespace WebWindowComplex.Models
|
||||
private List<AGBOption> m_HwOptionList = new List<AGBOption>();
|
||||
private Dictionary<string, string> m_SelHwOptionList = new Dictionary<string, string>();
|
||||
|
||||
//private List<Joint> m_JointList = new List<Joint>();
|
||||
|
||||
private int m_nSashBottomRailQty;
|
||||
|
||||
private List<IdNameStruct> m_OrientationSashTypeList = new List<IdNameStruct>
|
||||
|
||||
@@ -186,14 +186,23 @@ namespace WebWindowComplex.Models
|
||||
// Ricalcolo dimensioni rimuovendo split
|
||||
else
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
for (var SplitIndex = m_SplitVertList.Count - 1; SplitIndex >= value + 1; SplitIndex += -1)
|
||||
int countProportional = m_SplitVertList.Count(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL));
|
||||
if(m_SplitVertList.Last().MeasureType.Equals(MeasureTypes.PROPORTIONAL) && countProportional - 1 == 1)
|
||||
{
|
||||
dLastDimension += m_SplitVertList[SplitIndex].dDimension;
|
||||
m_SplitVertList.RemoveAt(SplitIndex);
|
||||
m_SplitVertList.RemoveAt(m_SplitVertList.Count() - 1);
|
||||
m_SplitVertList.Where(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL)).FirstOrDefault().SetDimension(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
for (var SplitIndex = m_SplitVertList.Count - 1; SplitIndex >= value + 1; SplitIndex += -1)
|
||||
{
|
||||
dLastDimension += m_SplitVertList[SplitIndex].dDimension;
|
||||
m_SplitVertList.RemoveAt(SplitIndex);
|
||||
}
|
||||
dLastDimension += m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].SetDimension(dLastDimension);
|
||||
}
|
||||
dLastDimension += m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].SetDimension(dLastDimension);
|
||||
}
|
||||
// Controllo quanti split orizzontali ci sono
|
||||
int nHoriz = m_SplitHorizList.Count > 0 ? m_SplitHorizList.Count : 1;
|
||||
@@ -251,9 +260,9 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
set
|
||||
{
|
||||
SplitShapes OldSelShapeSplit = m_SelSplitShape;
|
||||
m_SelSplitShape = (SplitShapes)value;
|
||||
// Cancello elementi nello split e azzero quantità orizzontale e verticale
|
||||
AreaList.Clear();
|
||||
// Azzero quantità orizzontale e verticale
|
||||
SetSplitQtyVert(0);
|
||||
SetSplitQtyHoriz(0);
|
||||
if (m_SelSplitShape == SplitShapes.VERTICAL)
|
||||
@@ -275,15 +284,20 @@ namespace WebWindowComplex.Models
|
||||
SetSplitQtyHoriz(1);
|
||||
SetSplitStartVert(true);
|
||||
}
|
||||
// Aggiungo area Splitted e vetro
|
||||
int nVert = m_SplitVertList.Count > 0 ? m_SplitVertList.Count : 1;
|
||||
int nHoriz = m_SplitHorizList.Count > 0 ? m_SplitHorizList.Count : 1;
|
||||
for (var SplitIndex = 0; SplitIndex <= (nVert * nHoriz) - 1; SplitIndex++)
|
||||
if(OldSelShapeSplit == SplitShapes.GRID || m_SelSplitShape == SplitShapes.GRID)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
Fill newFill = Fill.CreateFill(AreaList[SplitIndex], FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[SplitIndex].AreaList.Add(newFill);
|
||||
// Cancello vecchio contenuto dello split
|
||||
AreaList.Clear();
|
||||
// Aggiungo area Splitted e vetro
|
||||
int nVert = m_SplitVertList.Count > 0 ? m_SplitVertList.Count : 1;
|
||||
int nHoriz = m_SplitHorizList.Count > 0 ? m_SplitHorizList.Count : 1;
|
||||
for (var SplitIndex = 0; SplitIndex <= (nVert * nHoriz) - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
Fill newFill = Fill.CreateFill(AreaList[SplitIndex], FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[SplitIndex].AreaList.Add(newFill);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,16 +51,17 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
double dimensionTot = 0;
|
||||
List<SplitDimension> dimensions = null;
|
||||
List<Frame> frames = m_Parent.ParentWindow.AreaList;
|
||||
Frame frame = m_Parent.ParentWindow.AreaList.FirstOrDefault();
|
||||
if (bIsVertListDim)
|
||||
{
|
||||
dimensions = m_Parent.SplitVertList;
|
||||
dimensionTot = CalculateWidthSplitGroup(frames.FirstOrDefault(), frames.FirstOrDefault().DimensionList.Where(x => x.sName == "Width").First().dDimension, new AreaFound(-1, false)).m_Dimension;
|
||||
dimensionTot = CalculateWidthSplitGroup(frame, frame.DimensionList.Where(x => x.sName == "Width").First().dDimension, new AreaFound(-1, false)).m_Dimension;
|
||||
}
|
||||
else
|
||||
{
|
||||
dimensions = m_Parent.SplitHorizList;
|
||||
dimensionTot = (CalculateHeightSplitGroup(m_Parent, HeightTot(), new AreaFound(-1, false))).m_Dimension;
|
||||
//dimensionTot = (CalculateHeightSplitGroup(m_Parent, HeightTot(), new AreaFound(-1, false))).m_Dimension;
|
||||
dimensionTot = (CalculateHeightSplitGroup(frame, frame.HeightFrame(), new AreaFound(-1, false))).m_Dimension;
|
||||
}
|
||||
double valMinAbsolute = 100;
|
||||
double valMaxAbsolute = dimensionTot - valMinAbsolute * (dimensions.Count - 1);
|
||||
@@ -214,7 +215,6 @@ namespace WebWindowComplex.Models
|
||||
for (int i = 0; i < absoluteValList.Count; i++)
|
||||
{
|
||||
var item = dimensions.ElementAt(i);
|
||||
//item.SetDimension(ConvertIn(absoluteValList[i], (MeasureTypes)item.SelMeasureTypeIndex, dimensionTot, dimensions));
|
||||
item.SetDimension(ad.ConvertIn(adList, absoluteValList[i], (MeasureTypes)item.SelMeasureTypeIndex, dimensionTot));
|
||||
}
|
||||
}
|
||||
@@ -281,17 +281,17 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
MeasureTypes newType = (MeasureTypes)value;
|
||||
List<SplitDimension> splitList = null;
|
||||
List<Frame> frameList = m_Parent.ParentWindow.AreaList;
|
||||
Frame frame = m_Parent.ParentWindow.AreaList.FirstOrDefault();
|
||||
double tot = 0;
|
||||
if (bIsVertListDim)
|
||||
{
|
||||
splitList = m_Parent.SplitVertList;
|
||||
tot = CalculateWidthSplitGroup(frameList.FirstOrDefault(), frameList.FirstOrDefault().DimensionList.Where(x => x.sName == "Width").First().dDimension, new AreaFound(-1, false)).m_Dimension;
|
||||
tot = CalculateWidthSplitGroup(frame, frame.DimensionList.Where(x => x.sName == "Width").First().dDimension, new AreaFound(-1, false)).m_Dimension;
|
||||
}
|
||||
else
|
||||
{
|
||||
splitList = m_Parent.SplitHorizList;
|
||||
tot = (CalculateHeightSplitGroup(frameList.FirstOrDefault(), HeightTot(), new AreaFound(-1, false))).m_Dimension;
|
||||
tot = (CalculateHeightSplitGroup(frame, frame.HeightFrame(), new AreaFound(-1, false))).m_Dimension;
|
||||
}
|
||||
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType);
|
||||
List<AreaDimension> adList = new List<AreaDimension>();
|
||||
@@ -301,7 +301,6 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
m_dDimension = ad.ConvertDimension(adList, m_SelMeasureType, newType, tot, splitList.IndexOf(this));
|
||||
m_SelMeasureType = (MeasureTypes)value;
|
||||
//m_Parent.ParentWindow.OnUpdatePreview(m_Parent.ParentWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -376,6 +375,7 @@ namespace WebWindowComplex.Models
|
||||
/// </summary>
|
||||
/// <param name="area"> area di partenza </param>
|
||||
/// <param name="width"> larghezza di partenza </param>
|
||||
/// <param name="res"> area di ritorno </param>
|
||||
/// <returns></returns>
|
||||
internal AreaFound CalculateWidthSplitGroup(Area area, double width, AreaFound res)
|
||||
{
|
||||
@@ -422,8 +422,6 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
if (res.m_Dimension != -1 && res.m_Found)
|
||||
return res;
|
||||
//if (risultato != -1)
|
||||
// return risultato;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -477,6 +475,7 @@ namespace WebWindowComplex.Models
|
||||
/// </summary>
|
||||
/// <param name="area"> area di partenza </param>
|
||||
/// <param name="height"> altezza di partenza </param>
|
||||
/// <param name="res"> area di ritorno </param>
|
||||
/// <returns></returns>
|
||||
internal AreaFound CalculateHeightSplitGroup(Area area, double height, AreaFound res)
|
||||
{
|
||||
@@ -501,7 +500,8 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
res = CalculateHeightSplitGroup(item, split.SplitHorizList.ElementAt(index).dDimension, res);
|
||||
double heightItemGroup = split.SplitHorizList.ElementAt(index).dDimension;
|
||||
res = CalculateHeightSplitGroup(item, heightItemGroup, res);
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
@@ -512,19 +512,19 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
adList.Add(new AreaDimension(it.dDimension, it.SelMeasureType));
|
||||
}
|
||||
res = CalculateHeightSplitGroup(item, ad.ConvertFromPropVal(adList, MeasureTypes.ABSOLUTE, height), res);
|
||||
double heightItemGroup = ad.ConvertFromPropVal(adList, MeasureTypes.ABSOLUTE, height);
|
||||
res = CalculateHeightSplitGroup(item, heightItemGroup, res);
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
res = CalculateHeightSplitGroup(item, split.SplitHorizList.ElementAt(index).dDimension * height / 100, res);
|
||||
double heightItemGroup = split.SplitHorizList.ElementAt(index).dDimension * height / 100;
|
||||
res = CalculateHeightSplitGroup(item, heightItemGroup, res);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (res.m_Dimension != -1 && res.m_Found)
|
||||
return res;
|
||||
//if (risultato != -1 && foundObj)
|
||||
// return risultato;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -741,18 +741,18 @@ namespace WebWindowComplex.Models
|
||||
if (m_SelMeasureType != (MeasureTypes)value)
|
||||
{
|
||||
MeasureTypes newType = (MeasureTypes)value;
|
||||
List<Frame> frames = m_Parent.ParentWindow.AreaList;
|
||||
double tot = 0;
|
||||
Frame frame = m_Parent.ParentWindow.AreaList.FirstOrDefault();
|
||||
double dimSplitGroup = 0;
|
||||
if (bIsVertListDim)
|
||||
{
|
||||
tot = (CalculateWidthSplitGroup(frames.FirstOrDefault(), frames.FirstOrDefault().DimensionList.Where(x => x.sName == "Width").First().dDimension, new AreaFound(-1, false))).m_Dimension;
|
||||
dimSplitGroup = (CalculateWidthSplitGroup(frame, frame.DimensionList.Where(x => x.sName == "Width").First().dDimension, new AreaFound(-1, false))).m_Dimension;
|
||||
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType);
|
||||
List<AreaDimension> newDimensions = new List<AreaDimension>();
|
||||
foreach (var item in m_Parent.SplitVertList)
|
||||
{
|
||||
newDimensions.Add(new AreaDimension(item.dDimension, item.SelMeasureType));
|
||||
}
|
||||
m_dDimension = ad.ConvertDimension(newDimensions, m_SelMeasureType, newType, tot, m_Parent.SplitVertList.IndexOf(this));
|
||||
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++)
|
||||
@@ -762,14 +762,15 @@ namespace WebWindowComplex.Models
|
||||
} }
|
||||
else
|
||||
{
|
||||
tot = (CalculateHeightSplitGroup(m_Parent, HeightTot(), new AreaFound(-1, false))).m_Dimension;
|
||||
//tot = (CalculateHeightSplitGroup(m_Parent, HeightTot(), new AreaFound(-1, false))).m_Dimension;
|
||||
dimSplitGroup = (CalculateHeightSplitGroup(frame, frame.HeightFrame(), new AreaFound(-1, false))).m_Dimension;
|
||||
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType);
|
||||
List<AreaDimension> newDimensions = new List<AreaDimension>();
|
||||
foreach (var item in m_Parent.SplitHorizList)
|
||||
{
|
||||
newDimensions.Add(new AreaDimension(item.dDimension, item.SelMeasureType));
|
||||
}
|
||||
m_dDimension = ad.ConvertDimension(newDimensions, m_SelMeasureType, newType, tot, m_Parent.SplitHorizList.IndexOf(this));
|
||||
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++)
|
||||
@@ -782,32 +783,6 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
|
||||
internal double HeightTot()
|
||||
{
|
||||
List<Frame> frames = m_Parent.ParentWindow.AreaList;
|
||||
switch (frames.First().SelShapeIndex)
|
||||
{
|
||||
case (int)Shapes.RECTANGLE:
|
||||
case (int)Shapes.TRIANGLE:
|
||||
case (int)Shapes.ARC_FULL:
|
||||
{
|
||||
return (CalculateHeightSplitGroup(frames.FirstOrDefault(), frames.FirstOrDefault().DimensionList.Where(x => x.sName == "Height").First().dDimension, new AreaFound(-1, false))).m_Dimension;
|
||||
}
|
||||
case (int)Shapes.RIGHTCHAMFER:
|
||||
{
|
||||
return (CalculateHeightSplitGroup(frames.FirstOrDefault(), frames.FirstOrDefault().DimensionList.Where(x => x.sName == "Left Height").First().dDimension, new AreaFound(-1, false))).m_Dimension;
|
||||
}
|
||||
case (int)Shapes.LEFTCHAMFER:
|
||||
{
|
||||
return (CalculateHeightSplitGroup(frames.FirstOrDefault(), frames.FirstOrDefault().DimensionList.Where(x => x.sName == "Right Height").First().dDimension, new AreaFound(-1, false))).m_Dimension;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return (CalculateHeightSplitGroup(frames.FirstOrDefault(), frames.FirstOrDefault().DimensionList.Where(x => x.sName == "Full Height").First().dDimension, new AreaFound(-1, false))).m_Dimension;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Internal Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
Reference in New Issue
Block a user