프로젝트

일반

사용자정보

통계
| 개정판:

hytos / DTI_PID / SPPIDConverter / BaseModel / LineNumber.cs @ e75b5c63

이력 | 보기 | 이력해설 | 다운로드 (2.77 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 LineNumber
10
    {
11
        private string _UID;
12
        private string _TEXT;
13
        private string _LOCATION;
14
        private string _WIDTH;
15
        private string _HEIGHT;
16
        private double _ANGLE;
17
        private string _AREA;
18
        private string _CONNLINE;
19
        private string _SCENE;
20
        private List<LineRun> _RUNS = new List<LineRun>();
21
        private List<Property> _PROPERTIES = new List<Property>();
22
        private List<Attribute> _ATTRIBUTES = new List<Attribute>();
23
        private SPPIDSymbolInfo _SPPID;
24
        public string UID { get => _UID; set => _UID = value; }
25
        public string TEXT { get => _TEXT; set => _TEXT = value; }
26
        public string LOCATION { get => _LOCATION; set => _LOCATION = value; }
27
        public string WIDTH { get => _WIDTH; set => _WIDTH = value; }
28
        public string HEIGHT { get => _HEIGHT; set => _HEIGHT = value; }
29
        public double ANGLE
30
        {
31
            get
32
            {
33
                return _ANGLE;
34
            }
35
            set
36
            {
37
                double gap = 0.05;
38
                if (value < gap)
39
                    value = 0;
40
                else if (1.57 - gap < value && value < 1.57 + gap)
41
                    value = 270 * Math.PI / 180;
42
                else if (3.14 - gap < value && value < 3.14 + gap)
43
                    value = Math.PI;
44
                else if (4.71 - gap < value && value < 4.71 + gap)
45
                    value = 90 * Math.PI / 180;
46

    
47

    
48
                _ANGLE = value;
49
            }
50
        }
51
        public string AREA { get => _AREA; set => _AREA = value; }
52
        public List<LineRun> RUNS { get => _RUNS; set => _RUNS = value; }
53
        public List<Property> PROPERTIES { get => _PROPERTIES; set => _PROPERTIES = value; }
54
        public List<Attribute> ATTRIBUTES { get => _ATTRIBUTES; set => _ATTRIBUTES = value; }
55
        public SPPIDSymbolInfo SPPID { get => _SPPID; set => _SPPID = value; }
56
        public string CONNLINE { get => _CONNLINE; set => _CONNLINE = value; }
57

    
58
        public string SCENE
59
        {
60
            get
61
            {
62
                return _SCENE;
63
            }
64
            set
65
            {
66
                string[] split = value.Split(',');
67
                X1 = Convert.ToDouble(split[0]);
68
                Y1 = Convert.ToDouble(split[1]);
69
                X2 = X1 + Convert.ToDouble(split[2]);
70
                Y2 = Y1 + Convert.ToDouble(split[3]);
71
            }
72
        }
73
        public double X1 { get; set; }
74
        public double X2 { get; set; }
75
        public double Y1 { get; set; }
76
        public double Y2 { get; set; }
77

    
78
        public SPPIDEtcLocationInfo SPPIDLabelLocation { get; set; }
79
    }
80
}
클립보드 이미지 추가 (최대 크기: 500 MB)