프로젝트

일반

사용자정보

통계
| 개정판:

hytos / DTI_PID / SPPIDConverter / BaseModel / Text.cs @ a3390f45

이력 | 보기 | 이력해설 | 다운로드 (3.19 KB)

1 96a2080c gaqhf
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
7
namespace Converter.BaseModel
8
{
9 aadf6821 gaqhf
    public class Text
10 96a2080c gaqhf
    {
11 60244a8b gaqhf
        private string _UID;
12 ea80efaa gaqhf
        private string _OWNER;
13 60244a8b gaqhf
        private string _ATTRIBUTEVALUE;
14
        private string _NAME;
15
        private string _LOCATION;
16 1299077b gaqhf
        private double _LOCATION_X;
17
        private double _LOCATION_Y;
18
        public double LOCATION_X { get { return _LOCATION_X; } }
19
        public double LOCATION_Y { get { return _LOCATION_Y; } }
20 60244a8b gaqhf
        private string _VALUE;
21
        private double _ANGLE;
22
        private string _WIDTH;
23
        private string _HEIGHT;
24
        private string _AREA;
25 1a3a74a8 gaqhf
        private string _SCENE;
26 6b298450 gaqhf
        private SPPIDSymbolInfo _SPPID;
27 ea80efaa gaqhf
        private bool _ASSOCIATION;
28 60244a8b gaqhf
29
        public string UID { get => _UID; set => _UID = value; }
30
        public string ATTRIBUTEVALUE { get => _ATTRIBUTEVALUE; set => _ATTRIBUTEVALUE = value; }
31
        public string NAME { get => _NAME; set => _NAME = value; }
32 1299077b gaqhf
        public string LOCATION
33
        {
34
            get
35
            {
36
                return _LOCATION;
37
            }
38
            set
39
            {
40
                _LOCATION = value;
41
                double x = 0;
42
                double y = 0;
43
                Converter.SPPID.Util.SPPIDUtil.ConvertPointBystring(_LOCATION, ref x, ref y);
44
                _LOCATION_X = x;
45
                _LOCATION_Y = y;
46
            }
47
        }
48 60244a8b gaqhf
        public string VALUE { get => _VALUE; set => _VALUE = value; }
49 6b298450 gaqhf
        public double ANGLE
50
        {
51
            get
52
            {
53
                return _ANGLE;
54
            }
55
            set
56
            {
57 912a05b0 gaqhf
                double gap = 0.05;
58
                if (value < gap)
59
                    value = 0;
60
                else if (1.57 - gap < value && value < 1.57 + gap)
61 77a869a8 gaqhf
                    value = 270 * Math.PI / 180;
62 912a05b0 gaqhf
                else if (3.14 - gap < value && value < 3.14 + gap)
63 6b298450 gaqhf
                    value = Math.PI;
64 912a05b0 gaqhf
                else if (4.71 - gap < value && value < 4.71 + gap)
65 77a869a8 gaqhf
                    value = 90 * Math.PI / 180;
66 6b298450 gaqhf
67
                _ANGLE = value;
68
            }
69
        }
70 60244a8b gaqhf
        public string WIDTH { get => _WIDTH; set => _WIDTH = value; }
71
        public string HEIGHT { get => _HEIGHT; set => _HEIGHT = value; }
72
        public string AREA { get => _AREA; set => _AREA = value; }
73 6b298450 gaqhf
        public SPPIDSymbolInfo SPPID { get => _SPPID; set => _SPPID = value; }
74 ea80efaa gaqhf
        public bool ASSOCIATION { get => _ASSOCIATION; set => _ASSOCIATION = value; }
75
        public string OWNER { get => _OWNER; set => _OWNER = value; }
76 1a3a74a8 gaqhf
77
        public string SCENE
78
        {
79
            get
80
            {
81
                return _SCENE;
82
            }
83
            set
84
            {
85
                string[] split = value.Split(',');
86
                X1 = Convert.ToDouble(split[0]);
87
                Y1 = Convert.ToDouble(split[1]);
88
                X2 = X1 + Convert.ToDouble(split[2]);
89
                Y2 = Y1 + Convert.ToDouble(split[3]);
90
            }
91
        }
92
        public double X1 { get; set; }
93
        public double X2 { get; set; }
94
        public double Y1 { get; set; }
95
        public double Y2 { get; set; }
96 45af3335 Denny
        public SPPIDEtcLocationInfo SPPIDLabelLocation { get; set; }
97 96a2080c gaqhf
    }
98
}
클립보드 이미지 추가 (최대 크기: 500 MB)