프로젝트

일반

사용자정보

통계
| 개정판:

hytos / DTI_PID / BaseModel / Model / Text.cs @ 1a3a74a8

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

1
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
    public class Text
10
    {
11
        private string _UID;
12
        private string _OWNER;
13
        private string _ATTRIBUTEVALUE;
14
        private string _NAME;
15
        private string _LOCATION;
16
        private string _VALUE;
17
        private double _ANGLE;
18
        private string _WIDTH;
19
        private string _HEIGHT;
20
        private string _AREA;
21
        private string _SCENE;
22
        private SPPIDSymbolInfo _SPPID;
23
        private bool _ASSOCIATION;
24

    
25
        public string UID { get => _UID; set => _UID = value; }
26
        public string ATTRIBUTEVALUE { get => _ATTRIBUTEVALUE; set => _ATTRIBUTEVALUE = value; }
27
        public string NAME { get => _NAME; set => _NAME = value; }
28
        public string LOCATION { get => _LOCATION; set => _LOCATION = value; }
29
        public string VALUE { get => _VALUE; set => _VALUE = value; }
30
        public double ANGLE
31
        {
32
            get
33
            {
34
                return _ANGLE;
35
            }
36
            set
37
            {
38
                if (value == 1.57)
39
                    value = 90 * Math.PI / 180;
40
                else if (value == 3.14)
41
                    value = Math.PI;
42
                else if (value == 4.71)
43
                    value = 270 * Math.PI / 180;
44

    
45
                _ANGLE = value;
46
            }
47
        }
48
        public string WIDTH { get => _WIDTH; set => _WIDTH = value; }
49
        public string HEIGHT { get => _HEIGHT; set => _HEIGHT = value; }
50
        public string AREA { get => _AREA; set => _AREA = value; }
51
        public SPPIDSymbolInfo SPPID { get => _SPPID; set => _SPPID = value; }
52
        public bool ASSOCIATION { get => _ASSOCIATION; set => _ASSOCIATION = value; }
53
        public string OWNER { get => _OWNER; set => _OWNER = value; }
54

    
55
        public string SCENE
56
        {
57
            get
58
            {
59
                return _SCENE;
60
            }
61
            set
62
            {
63
                string[] split = value.Split(',');
64
                X1 = Convert.ToDouble(split[0]);
65
                Y1 = Convert.ToDouble(split[1]);
66
                X2 = X1 + Convert.ToDouble(split[2]);
67
                Y2 = Y1 + Convert.ToDouble(split[3]);
68
            }
69
        }
70
        public double X1 { get; set; }
71
        public double X2 { get; set; }
72
        public double Y1 { get; set; }
73
        public double Y2 { get; set; }
74
        public SPPIDLabelLocationInfo SPPIDLabelLocation { get; set; }
75
    }
76
}
클립보드 이미지 추가 (최대 크기: 500 MB)