整理代码
This commit is contained in:
152
ShrlAlgoToolkit.RevitAddins/RvIndependent/MetroGauges/XmlData.cs
Normal file
152
ShrlAlgoToolkit.RevitAddins/RvIndependent/MetroGauges/XmlData.cs
Normal file
@@ -0,0 +1,152 @@
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace ShrlAlgo.RvKits.RvIndependent.MetroGauges
|
||||
{
|
||||
[XmlType("限界控制点")]
|
||||
[Serializable]
|
||||
public class XmlData
|
||||
{
|
||||
[XmlElement("受电弓", Type = typeof(Sdg))]
|
||||
[XmlElement("车顶", Type = typeof(Cd))]
|
||||
[XmlElement("车顶空调", Type = typeof(Cdkt))]
|
||||
[XmlElement("车肩", Type = typeof(Cj))]
|
||||
[XmlElement("侧墙", Type = typeof(Cq))]
|
||||
[XmlElement("信号灯", Type = typeof(Xhd))]
|
||||
[XmlElement("转向架", Type = typeof(Zxj))]
|
||||
[XmlElement("踏面", Type = typeof(Tm))]
|
||||
[XmlElement("轮缘", Type = typeof(Ly))]
|
||||
[XmlElement("构架设备最低点1", Type = typeof(Gj1))]
|
||||
[XmlElement("簧下", Type = typeof(Hx))]
|
||||
[XmlElement("构架设备最低点2", Type = typeof(Gj2))]
|
||||
public List<Factor> parts;
|
||||
}
|
||||
|
||||
[XmlInclude(typeof(Sdg))]
|
||||
[XmlInclude(typeof(Cd))]
|
||||
[XmlInclude(typeof(Cdkt))]
|
||||
[XmlInclude(typeof(Xhd))]
|
||||
[XmlInclude(typeof(Cj))]
|
||||
[XmlInclude(typeof(Cq))]
|
||||
[XmlInclude(typeof(Zxj))]
|
||||
[XmlInclude(typeof(Tm))]
|
||||
[XmlInclude(typeof(Ly))]
|
||||
[XmlInclude(typeof(Gj1))]
|
||||
[XmlInclude(typeof(Hx))]
|
||||
[XmlInclude(typeof(Gj2))]
|
||||
[Serializable]
|
||||
public abstract class Factor
|
||||
{
|
||||
//[XmlElement("坐标点", Type = typeof(Point))]
|
||||
//public ErrorModels<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("受电弓")]
|
||||
[Serializable]
|
||||
public class Sdg : Factor
|
||||
{
|
||||
[XmlElement("坐标点", Type = typeof(Point))]
|
||||
public List<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("车顶")]
|
||||
[Serializable]
|
||||
public class Cd : Factor
|
||||
{
|
||||
[XmlElement("坐标点", Type = typeof(Point))]
|
||||
public List<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("车顶空调")]
|
||||
[Serializable]
|
||||
public class Cdkt : Factor
|
||||
{
|
||||
[XmlElement("坐标点", Type = typeof(Point))]
|
||||
public List<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("车肩")]
|
||||
[Serializable]
|
||||
public class Cj : Factor
|
||||
{
|
||||
[XmlElement("坐标点", Type = typeof(Point))]
|
||||
public List<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("信号灯")]
|
||||
[Serializable]
|
||||
public class Xhd : Factor
|
||||
{
|
||||
[XmlElement("坐标点", Type = typeof(Point))]
|
||||
public List<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("侧墙")]
|
||||
[Serializable]
|
||||
public class Cq : Factor
|
||||
{
|
||||
[XmlElement("坐标点", Type = typeof(Point))]
|
||||
public List<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("转向架")]
|
||||
[Serializable]
|
||||
public class Zxj : Factor
|
||||
{
|
||||
[XmlElement("坐标点", Type = typeof(Point))]
|
||||
public List<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("踏面")]
|
||||
[Serializable]
|
||||
public class Tm : Factor
|
||||
{
|
||||
[XmlElement("坐标点", Type = typeof(Point))]
|
||||
public List<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("轮缘")]
|
||||
[Serializable]
|
||||
public class Ly : Factor
|
||||
{
|
||||
[XmlElement("坐标点", Type = typeof(Point))]
|
||||
public List<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("构架设备最低点1")]
|
||||
[Serializable]
|
||||
public class Gj1 : Factor
|
||||
{
|
||||
[XmlElement("坐标点", Type = typeof(Point))]
|
||||
public List<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("簧下")]
|
||||
[Serializable]
|
||||
public class Hx : Factor
|
||||
{
|
||||
[XmlElement("坐标点", Type = typeof(Point))]
|
||||
public List<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("构架设备最低点2")]
|
||||
[Serializable]
|
||||
public class Gj2 : Factor
|
||||
{
|
||||
[XmlElement("坐标点", Type = typeof(Point))]
|
||||
public List<Point> pts;
|
||||
}
|
||||
|
||||
[XmlType("坐标点")]
|
||||
[Serializable]
|
||||
public class Point
|
||||
{
|
||||
[XmlAttribute("点号")]
|
||||
public string Id;
|
||||
|
||||
[XmlAttribute("X")]
|
||||
public double X;
|
||||
|
||||
[XmlAttribute("Y")]
|
||||
public double Y;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user