hytos / DTI_PID / APIDConverter / Model / PlantItem / LineNumber.cs @ f37c5383
이력 | 보기 | 이력해설 | 다운로드 (2.57 KB)
1 | 5aec7e24 | gaqhf | using System; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | using System.Linq; |
||
4 | using System.Text; |
||
5 | using System.Threading.Tasks; |
||
6 | |||
7 | namespace AVEVA.PID.CustomizationUtility.Model |
||
8 | { |
||
9 | public class LineNumber : PlantItem |
||
10 | { |
||
11 | private string _TEXT; |
||
12 | private string _LOCATION; |
||
13 | private string _WIDTH; |
||
14 | private string _HEIGHT; |
||
15 | private double _ANGLE; |
||
16 | private string _AREA; |
||
17 | private string _CONNLINE; |
||
18 | private string _SCENE; |
||
19 | private List<LineRun> _RUNS = new List<LineRun>(); |
||
20 | private List<Property> _PROPERTIES = new List<Property>(); |
||
21 | private List<Attribute> _ATTRIBUTES = new List<Attribute>(); |
||
22 | public string TEXT { get => _TEXT; set => _TEXT = value; } |
||
23 | public string LOCATION { get => _LOCATION; set => _LOCATION = value; } |
||
24 | public string WIDTH { get => _WIDTH; set => _WIDTH = value; } |
||
25 | public string HEIGHT { get => _HEIGHT; set => _HEIGHT = value; } |
||
26 | public double ANGLE |
||
27 | { |
||
28 | get |
||
29 | { |
||
30 | return _ANGLE; |
||
31 | } |
||
32 | set |
||
33 | { |
||
34 | double gap = 0.05; |
||
35 | if (value < gap) |
||
36 | value = 0; |
||
37 | else if (1.57 - gap < value && value < 1.57 + gap) |
||
38 | value = 90 * Math.PI / 180; |
||
39 | else if (3.14 - gap < value && value < 3.14 + gap) |
||
40 | value = Math.PI; |
||
41 | else if (4.71 - gap < value && value < 4.71 + gap) |
||
42 | value = 270 * Math.PI / 180; |
||
43 | |||
44 | _ANGLE = value; |
||
45 | } |
||
46 | } |
||
47 | public string AREA { get => _AREA; set => _AREA = value; } |
||
48 | public List<LineRun> RUNS { get => _RUNS; set => _RUNS = value; } |
||
49 | public List<Property> PROPERTIES { get => _PROPERTIES; set => _PROPERTIES = value; } |
||
50 | public List<Attribute> ATTRIBUTES { get => _ATTRIBUTES; set => _ATTRIBUTES = value; } |
||
51 | public string CONNLINE { get => _CONNLINE; set => _CONNLINE = value; } |
||
52 | |||
53 | public string SCENE |
||
54 | { |
||
55 | get |
||
56 | { |
||
57 | return _SCENE; |
||
58 | } |
||
59 | set |
||
60 | { |
||
61 | string[] split = value.Split(','); |
||
62 | X1 = Convert.ToDouble(split[0]); |
||
63 | Y1 = Convert.ToDouble(split[1]); |
||
64 | X2 = X1 + Convert.ToDouble(split[2]); |
||
65 | Y2 = Y1 + Convert.ToDouble(split[3]); |
||
66 | } |
||
67 | } |
||
68 | public double X1 { get; set; } |
||
69 | public double X2 { get; set; } |
||
70 | public double Y1 { get; set; } |
||
71 | public double Y2 { get; set; } |
||
72 | 932933ed | gaqhf | |
73 | public AvevaLabelInfo Aveva { get; set; } |
||
74 | 5aec7e24 | gaqhf | } |
75 | } |