Aggiunto arc element per Frame e Sash (da rivedere)

This commit is contained in:
Annamaria Sassi
2025-12-02 16:44:01 +01:00
parent 5a7987d02b
commit dfe4ecd9d1
28 changed files with 1075 additions and 78 deletions
+59 -6
View File
@@ -20,6 +20,18 @@ namespace WebWindowComplex.Models
#region Public Properties
public FrameArcElement? FrameArcElem
{
get
{
return m_FrameArcElem;
}
set
{
m_FrameArcElem = value!;
}
}
public bool BottomRail
{
get
@@ -207,11 +219,40 @@ namespace WebWindowComplex.Models
break;
}
}
switch (SelShape)
{
case Shapes.RECTANGLE:
case Shapes.RIGHTCHAMFER:
case Shapes.LEFTCHAMFER:
case Shapes.DOUBLECHAMFER:
case Shapes.TRIANGLE:
{
FrameArcElem = null;
SearchSash(this);
break;
}
}
m_Shape = SelShape;
}
}
}
protected void SearchSash(Area node)
{
if (node != null)
{
if (node.AreaType.Equals(AreaTypes.SASH))
{
Sash s = (Sash)node;
s.SashArcElem = null;
}
foreach (var item in node.AreaList)
{
SearchSash(item);
}
}
}
public Shapes Shape
{
get
@@ -241,14 +282,20 @@ namespace WebWindowComplex.Models
#region Internal Methods
internal void SetFrameArcElem(FrameArcElement arcElement)
{
m_FrameArcElem = arcElement;
}
internal static Area CreateFrame(Window Window)
{
Frame NewFrame = new Frame(null, Window);
NewFrame.SetAreaType(AreaTypes.FRAME);
NewFrame.SetSelShape(Shapes.RECTANGLE);
NewFrame.SetBottomRail(false);
NewFrame.SetBottomRailQty(0);
return NewFrame;
Frame newFrame = new Frame(null, Window);
newFrame.SetAreaType(AreaTypes.FRAME);
newFrame.SetSelShape(Shapes.RECTANGLE);
newFrame.SetBottomRail(false);
newFrame.SetBottomRailQty(0);
newFrame.FrameArcElem = null;
return newFrame;
}
internal override JsonArea Serialize(bool hideHw)
@@ -257,6 +304,10 @@ namespace WebWindowComplex.Models
if (nCounterGroup < GroupId)
Area.nCounterGroup = GroupId;
JsonFrame JsonFrame = new JsonFrame(m_Shape, m_bBottomRail, m_nBottomRailQty, GroupId);
if (FrameArcElem != null)
JsonFrame.ArcElement = FrameArcElem.Serialize();
else
JsonFrame.ArcElement = null;
foreach (var Dimension in DimensionList)
JsonFrame.DimensionList.Add(Dimension.Serialize());
foreach (var Joint in JointList)
@@ -395,6 +446,8 @@ namespace WebWindowComplex.Models
#region Private Fields
private FrameArcElement m_FrameArcElem = new FrameArcElement();
private bool m_bBottomRail;
private List<FrameDimension> m_DimensionList = new List<FrameDimension>();