using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Runtime.Serialization;
|
|
namespace Eventech.Model
|
{
|
[DataContract]
|
public class AnnoAnchorPoint : Eventech.Model.FeatPoint
|
{
|
[DataMember]
|
public string Text { get { return _str; } set { _str = value; } }
|
protected string _str = null;
|
|
[DataMember]
|
public string CurveTag { get { return _curvetag; } set { _curvetag = value; } }
|
protected string _curvetag = "";
|
|
[DataMember]
|
public int TextAligment { get { return _textAligment; } set { _textAligment = value; } }
|
protected int _textAligment = 0;
|
|
|
#region 构造函数
|
public AnnoAnchorPoint() { }
|
|
public AnnoAnchorPoint(Eventech.Model.FeatPoint rhs)
|
{
|
this.X = rhs.X;
|
this.Y = rhs.Y;
|
}
|
|
public AnnoAnchorPoint(AnnoAnchorPoint rhs)
|
{
|
this.Text = rhs.Text;
|
this.CurveTag = rhs.CurveTag;
|
this.TextAligment = rhs.TextAligment;
|
this.X = rhs.X;
|
this.Y = rhs.Y;
|
}
|
|
public AnnoAnchorPoint(string strStore)
|
{
|
string[] strPara_split_array = strStore.Split(',');
|
this.X = Convert.ToDouble(strPara_split_array[0]);
|
this.Y = Convert.ToDouble(strPara_split_array[1]);
|
this.Text = strPara_split_array[2];
|
this.CurveTag = strPara_split_array[3];
|
this.TextAligment = Convert.ToInt32(strPara_split_array[4]);
|
}
|
#endregion
|
|
public override string ToString()
|
{
|
return string.Format("{0}({3}) X:{1},Y:{2}", _str, x, y, _curvetag);
|
}
|
|
public new AnnoAnchorPoint Clone() //对外提供一个创建自身的浅表副本的能力
|
{
|
return new AnnoAnchorPoint(this);
|
}
|
|
public new string ToDsString()
|
{
|
StringBuilder sb = new StringBuilder();
|
|
sb.AppendFormat("{0:0.00}", this.X); sb.Append(",");
|
sb.AppendFormat("{0:0.00}", this.Y); sb.Append(",");
|
sb.Append(this.Text); sb.Append(",");
|
sb.Append(this.CurveTag); sb.Append(",");
|
sb.AppendFormat("{0}", this.TextAligment);
|
return sb.ToString();
|
}
|
|
|
|
}
|
|
|
|
|
}
|