프로젝트

일반

사용자정보

통계
| 개정판:

hytos / DTI_PID / SPPIDConverter / BaseModel / Note.cs @ a0c69b1c

이력 | 보기 | 이력해설 | 다운로드 (2.26 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 Note
10
    {
11
        private string _UID;
12
        private string _ATTRIBUTEVALUE;
13
        private string _NAME;
14
        private string _LOCATION;
15
        private string _VALUE;
16
        private double _ANGLE;
17
        private string _WIDTH;
18
        private string _HEIGHT;
19
        private string _AREA;
20
        private string _SCENE;
21
        private SPPIDSymbolInfo _SPPID;
22

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

    
43
                _ANGLE = value;
44
            }
45
        }
46
        public string WIDTH { get => _WIDTH; set => _WIDTH = value; }
47
        public string HEIGHT { get => _HEIGHT; set => _HEIGHT = value; }
48
        public string AREA { get => _AREA; set => _AREA = value; }
49
        public SPPIDSymbolInfo SPPID { get => _SPPID; set => _SPPID = value; }
50

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