Aggiunti element per Bottom rail
This commit is contained in:
@@ -143,9 +143,9 @@ namespace WebWindowComplex.Models
|
||||
|
||||
private string m_sName = "";
|
||||
|
||||
private double m_dMin;
|
||||
private double m_dMin = 40;
|
||||
|
||||
private double m_dMax;
|
||||
private double m_dMax = 100;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
|
||||
@@ -99,8 +99,18 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
if (m_nBottomRailQty >= 0)
|
||||
{
|
||||
if(value > m_nBottomRailQty)
|
||||
{
|
||||
// Aggiungo un element
|
||||
BottomRailElemDimList.Add(new ElementDimension(this, BottomRailElemDimList.Count + 1, 78));
|
||||
}
|
||||
else if (value < m_nBottomRailQty)
|
||||
{
|
||||
// Elimino un element
|
||||
BottomRailElemDimList.RemoveAt(BottomRailElemDimList.Count - 1);
|
||||
}
|
||||
m_nBottomRailQty = value;
|
||||
if (m_nBottomRailQty > 0)
|
||||
if (value > 0)
|
||||
{
|
||||
m_bBottomRail = true;
|
||||
}
|
||||
@@ -112,6 +122,12 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
|
||||
public List<ElementDimension> BottomRailElemDimList
|
||||
{
|
||||
get => m_BottomRailElemDimList;
|
||||
set => m_BottomRailElemDimList = value;
|
||||
}
|
||||
|
||||
public List<FrameDimension> DimensionList
|
||||
{
|
||||
get => m_DimensionList;
|
||||
@@ -477,6 +493,8 @@ namespace WebWindowComplex.Models
|
||||
if (nCounterGroup < GroupId)
|
||||
Area.nCounterGroup = GroupId;
|
||||
JsonFrame JsonFrame = new JsonFrame(m_Shape, m_SelThreshold.Name, m_bBottomRail, m_nBottomRailQty, GroupId);
|
||||
foreach (var BottomRailDim in BottomRailElemDimList)
|
||||
JsonFrame.BottomRailElemDimList.Add(BottomRailDim.Serialize());
|
||||
//if (FrameArcElem != null)
|
||||
// JsonFrame.ArcElement = FrameArcElem.Serialize();
|
||||
//else
|
||||
@@ -751,9 +769,11 @@ namespace WebWindowComplex.Models
|
||||
private List<Threshold> m_ThresholdList = new List<Threshold>();
|
||||
|
||||
private List<FrameDimension> m_DimensionList = new List<FrameDimension>();
|
||||
|
||||
|
||||
private List<ElementDimension> m_ElementDimensionList = new List<ElementDimension>();
|
||||
|
||||
private List<ElementDimension> m_BottomRailElemDimList = new List<ElementDimension>();
|
||||
|
||||
private List<Joint> m_JointList = new List<Joint>();
|
||||
|
||||
private int m_nBottomRailQty = 0;
|
||||
|
||||
@@ -57,7 +57,11 @@ namespace WebWindowComplex.Models
|
||||
// m_SashArcElement = value!;
|
||||
// }
|
||||
//}
|
||||
|
||||
public List<ElementDimension> BottomRailElemDimList
|
||||
{
|
||||
get => m_BottomRailElemDimList;
|
||||
set => m_BottomRailElemDimList = value;
|
||||
}
|
||||
public List<Hardware> HardwareList
|
||||
{
|
||||
get
|
||||
@@ -423,6 +427,16 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
if (value >= 0)
|
||||
{
|
||||
if (value > m_nSashBottomRailQty)
|
||||
{
|
||||
// Aggiungo un element
|
||||
BottomRailElemDimList.Add(new ElementDimension(this, BottomRailElemDimList.Count + 1, 78));
|
||||
}
|
||||
else if (value < m_nSashBottomRailQty)
|
||||
{
|
||||
// Elimino un element
|
||||
BottomRailElemDimList.RemoveAt(BottomRailElemDimList.Count - 1);
|
||||
}
|
||||
m_nSashBottomRailQty = value;
|
||||
if (m_nSashBottomRailQty > 0)
|
||||
{
|
||||
@@ -801,6 +815,8 @@ namespace WebWindowComplex.Models
|
||||
JsonSash JsonSash = new JsonSash(m_bIsSashVertical, m_SashType, m_bSashBottomRail, m_nSashBottomRailQty, currHwId, GroupId);
|
||||
foreach (var SashDimension in SashList)
|
||||
JsonSash.SashList.Add(SashDimension.Serialize());
|
||||
foreach (var BottomRailDim in BottomRailElemDimList)
|
||||
JsonSash.BottomRailElemDimList.Add(BottomRailDim.Serialize());
|
||||
if (HwOptionList.Count > 0)
|
||||
{
|
||||
foreach (var HwOption in HwOptionList)
|
||||
@@ -1022,7 +1038,7 @@ namespace WebWindowComplex.Models
|
||||
private int m_nSashBottomRailQty;
|
||||
|
||||
private List<ElementDimension> m_ElementDimensionList = new List<ElementDimension>();
|
||||
|
||||
private List<ElementDimension> m_BottomRailElemDimList = new List<ElementDimension>();
|
||||
private List<IdNameStruct> m_OrientationSashTypeList = new List<IdNameStruct>
|
||||
{
|
||||
new IdNameStruct((int)OrientationSash.VERTICAL, "Vertical"),
|
||||
|
||||
@@ -510,6 +510,24 @@ namespace WebWindowComplex.Models
|
||||
//m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
|
||||
public List<SplitElementDimension> searchElemFromSubArea(int subArea)
|
||||
{
|
||||
if(subArea == 0)
|
||||
{
|
||||
if (m_bSplitStartVert)
|
||||
return m_ElemDimVertList;
|
||||
else
|
||||
return m_ElemDimHorizList;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_bSplitStartVert)
|
||||
return m_ElemDimHorizList.Where(x => x.nSubArea == subArea).ToList();
|
||||
else
|
||||
return m_ElemDimVertList.Where(x => x.nSubArea == subArea).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public bool OnlySashChild()
|
||||
{
|
||||
foreach (var areaSplitted in AreaList)
|
||||
|
||||
Reference in New Issue
Block a user