Files
2026-01-16 15:10:19 +01:00

121 lines
2.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebWindowTest.Json;
using static WebWindowTest.Json.WindowConst;
namespace WebWindowTest.Models
{
public class Joint
{
#region Public Constructors
public Joint(Area ParentArea, int nIndex, Joints SelJointType)
{
m_ParentArea = ParentArea;
m_nIndex = nIndex;
m_SelJointType = SelJointType;
}
#endregion Public Constructors
#region Public Properties
public List<IdNameStruct> JointTypeList
{
get
{
return m_JointTypeList;
}
}
public int nIndex
{
get
{
return m_nIndex;
}
}
public Area ParentArea
{
get
{
return m_ParentArea;
}
}
public Joints SelJointType
{
get
{
return m_SelJointType;
}
set
{
m_SelJointType = value;
}
}
public int SelJointTypeIndex
{
get
{
return (int)m_SelJointType;
}
set
{
m_SelJointType = (Joints)value;
}
}
#endregion Public Properties
#region Public Methods
public Joint Copy()
{
Joint newJoint = new Joint(ParentArea, nIndex, SelJointType);
return newJoint;
}
#endregion Public Methods
#region Internal Methods
internal JsonJoint Serialize()
{
JsonJoint JsonJoint = new JsonJoint(m_nIndex, m_SelJointType);
return JsonJoint;
}
internal void SetSelJointType(Joints value)
{
m_SelJointType = value;
}
#endregion Internal Methods
#region Protected Fields
protected Area m_ParentArea;
#endregion Protected Fields
#region Private Fields
private List<IdNameStruct> m_JointTypeList = new List<IdNameStruct>
{
new IdNameStruct((int)Joints.ANGLED, "Angled"),
new IdNameStruct((int)Joints.FULL_H, "Full H"),
new IdNameStruct((int)Joints.FULL_V, "Full V")
};
private int m_nIndex;
private Joints m_SelJointType;
#endregion Private Fields
}
}