Shuxia Ning
2024-12-23 a97513ccbb97b2c471e90b032fabdd2e709b7f32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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();
        }
 
 
 
    }
 
 
 
 
}