- Gestita dimensione standard e solo luce per i cambi di tipologie di misure per sash e split
- Aggiornato metodo per cambiare numero di split - Aggiornato metodo che calcola larghezza sashGroup e splitGroup
This commit is contained in:
@@ -402,29 +402,41 @@ namespace WebWindowComplex.Models
|
||||
m_ThresholdList = m_AllThresholdList;
|
||||
}
|
||||
|
||||
public double HeightFrame()
|
||||
public double AvailHeightFrame()
|
||||
{
|
||||
double dim = 0;
|
||||
switch (SelShapeIndex)
|
||||
{
|
||||
case (int)Shapes.RECTANGLE:
|
||||
case (int)Shapes.TRIANGLE:
|
||||
case (int)Shapes.ARC_FULL:
|
||||
{
|
||||
return DimensionList.Where(x => x.sName == "Height").First().dDimension;
|
||||
dim = DimensionList.Where(x => x.sName == "Height").First().dDimension;
|
||||
break;
|
||||
}
|
||||
case (int)Shapes.RIGHTCHAMFER:
|
||||
{
|
||||
return DimensionList.Where(x => x.sName == "Left Height").First().dDimension;
|
||||
dim = DimensionList.Where(x => x.sName == "Left Height").First().dDimension;
|
||||
break;
|
||||
}
|
||||
case (int)Shapes.LEFTCHAMFER:
|
||||
{
|
||||
return DimensionList.Where(x => x.sName == "Right Height").First().dDimension;
|
||||
dim = DimensionList.Where(x => x.sName == "Right Height").First().dDimension;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return DimensionList.Where(x => x.sName == "Full Height").First().dDimension;
|
||||
dim = DimensionList.Where(x => x.sName == "Full Height").First().dDimension;
|
||||
break;
|
||||
}
|
||||
}
|
||||
double overlap = 0;
|
||||
if (AreaList.First() is Sash)
|
||||
overlap = ElementDimensionList.ElementAt(1).dOverlap +
|
||||
ElementDimensionList.ElementAt(ElementDimensionList.Count() - 2).dOverlap;
|
||||
return dim - ElementDimensionList.ElementAt(0).dDimension -
|
||||
ElementDimensionList.Last().dDimension +
|
||||
overlap;
|
||||
}
|
||||
|
||||
public override Frame Copy(Area ParentArea)
|
||||
@@ -432,6 +444,26 @@ namespace WebWindowComplex.Models
|
||||
return new Frame(null, ParentWindow);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per calcolare l'area disponibile
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public double AvailWidthArea()
|
||||
{
|
||||
if (DimensionList.Count > 0 && DimensionList.FirstOrDefault(x => x.sName.Equals("Width")) != null)
|
||||
{
|
||||
double dim = DimensionList.FirstOrDefault(x => x.sName.Equals("Width"))!.dDimension;
|
||||
double overlap = 0;
|
||||
if(AreaList.First() is Sash)
|
||||
overlap = ElementDimensionList.ElementAt(1).dOverlap +
|
||||
ElementDimensionList.Last().dOverlap;
|
||||
return dim - ElementDimensionList.ElementAt(0).dDimension -
|
||||
ElementDimensionList.Last().dDimension +
|
||||
overlap;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Internal Methods
|
||||
@@ -661,24 +693,6 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per calcolare l'area disponibile
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
internal double AvailArea()
|
||||
{
|
||||
if(DimensionList.Count> 0 && DimensionList.FirstOrDefault(x => x.sName.Equals("Width")) != null)
|
||||
{
|
||||
// larghezza - elementDim(1) - elementDim(last) + overlapDd + overlapSx
|
||||
return DimensionList.FirstOrDefault(x => x.sName.Equals("Width"))!.dDimension -
|
||||
ElementDimensionList.ElementAt(1).dDimension -
|
||||
ElementDimensionList.Last().dDimension +
|
||||
ElementDimensionList.ElementAt(1).dOverlap +
|
||||
ElementDimensionList.Last().dOverlap;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endregion Internal Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
Reference in New Issue
Block a user