You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
4.0 KiB
C#

1 month ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing.Design;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using GeoSigma.SigmaDrawerStyle;
using GeoSigmaDrawLib;
using SigmaDrawerStyle;
namespace SigmaDrawerElement
{
[TypeConverter(typeof(PropertySorter))]
[XmlRoot("Element")]
public class ElementBase
{
/// <summary>
/// 属性类别排序
/// </summary>
private List<string> categorys = new List<string>() { "基础属性", "其他", "杂项" };
[Browsable(false)]
//[XmlAttribute("Type")]
//[NonSerialized]
[XmlIgnore]
public DrawElementType ElementType { get; set; }
//[XmlElement("HowToViewCurve")]
//public DrawerCurveStyle CurveStyle { set; get; }
//[XmlElement("HowToViewPoint")]
//public DrawerPointStyle PointStyle { set; get; }
//[XmlElement("Point")]
////public DrawerPoint Point { get; set; }
//[XmlElement("Pline")]
//public DrawerPline Pline { get; set; }
/// <summary>
/// Gets or sets the layer.
/// </summary>
[Category("其他"), DisplayName("图层"), ReadOnly(true), PropertyOrder(100)]
[XmlIgnore]
//[Editor("UCDraw.Editor.LayerEditor, UCDraw", typeof(UITypeEditor))]
public string Layer { get; set; }
/// <summary>
/// Gets or sets the name.
/// </summary>
[XmlAttribute("Name")]
[Category("基础属性"), DisplayName("名称"), PropertyOrder(0)]
public virtual string Name { get; set; }
/// <summary>
/// 转换为DFD格式的字符串.
/// </summary>
/// <returns>数据内容</returns>
public virtual string ToDfdString()
{
return string.Empty;
}
public void CopyTo(ElementBase other)
{
if (other == null)
{
other = new ElementBase();
}
other.Name = this.Name;
other.Layer = this.Layer;
other.ElementType = this.ElementType;
}
}
/// <summary>
/// 基础元素类型
/// </summary>
//public enum DrawElementType
//{
// DOUBLEFOX_UNKNOWN = 0,
// DOUBLEFOX_POINT = 1,
// DOUBLEFOX_CURVE = 2,
// DOUBLEFOX_DRAW = 3,
// DOUBLEFOX_TEXT = 4,
// DOUBLEFOX_ELLIPSE = 5,
// DOUBLEFOX_CIRCLE = 6,
// DOUBLEFOX_FRAME = 7,
// DOUBLEFOX_IMAGE = 8,
// DOUBLEFOX_MESH = 9,
// DOUBLEFOX_MXN = 10,
// DOUBLEFOX_PROPORTION = 11,
// DOUBLEFOX_DRAW_RECT = 12,
// DOUBLEFOX_ARC = 13,
// DOUBLEFOX_GRID = 14,
// DOUBLEFOX_NET = 15,
// DOUBLEFOX_SECTION = 16,
// DOUBLEFOX_OTHERDRAW = 17,
// DOUBLEFOX_XYDC = 18,
// DOUBLEFOX_OLE = 19,
// DOUBLEFOX_TREE = 20,
// DOUBLEFOX_WMF = 21,
// DOUBLEFOX_STATION = 22,
// DOUBLEFOX_CURVE_STATION = 23,
// DOUBLEFOX_TV = 24,
// DOUBLEFOX_XPOINT = 25,
// DOUBLEFOX_COLOR_RULER = 26,
// DOUBLEFOX_MTEXT = 27,
// DOUBLEFOX_INSERT = 28, // 老格式符号
// DOUBLEFOX_ENCRYPT = 29, // 文件加密
// DOUBLEFOX_COLORBAR = 30, // 颜色条
// DOUBLEFOX_SCALERULER = 31, // 刻度标尺
// DOUBLEFOX_CRECT = 32, // 矩形曲线
// DOUBLEFOX_CROSSPOINT = 33, // 十字点
// DOUBLEFOX_WELLLOG = 34, // 测井
// DOUBLEFOX_TWOPOINT = 35, // 分数点
// DOUBLEFOX_PATHFILL = 36, // 路径充填
// DOUBLEFOX_CHART = 37, // 统计图
// DOUBLEFOX_HORIZONTALWELL = 38, // 水平井
// DOUBLEFOX_RECTLABEL = 39, // 矩形标注
// DOUBLEFOX_FAULTLINE = 40, // 断层线
// DOUBLEFOX_BLOCK = 41, // 组合块,类似于符号,内部元素为实际坐标
// DOUBLEFOX_XYZ = 42 // 散点
//}
}