hytos / DTI_PID / APIDConverter / Model / PlantItem / Line.cs @ 1d561973
이력 | 보기 | 이력해설 | 다운로드 (2.79 KB)
1 | 4e320fcb | 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 | 5aec7e24 | gaqhf | public enum SlopeType |
10 | { |
||
11 | None, |
||
12 | Slope, |
||
13 | HORIZONTAL, |
||
14 | VERTICAL |
||
15 | } |
||
16 | |||
17 | 4e320fcb | gaqhf | public class Line : PlantItem |
18 | { |
||
19 | 5aec7e24 | gaqhf | private string _OWNER; |
20 | private string _UID; |
||
21 | private string _TYPEUID; |
||
22 | private string _STARTPOINT; |
||
23 | private string _ENDPOINT; |
||
24 | 32954c7f | gaqhf | public double Start_X { get; set; } |
25 | public double Start_Y { get; set; } |
||
26 | public double End_X { get; set; } |
||
27 | public double End_Y { get; set; } |
||
28 | 5aec7e24 | gaqhf | private string _TYPE; |
29 | private string _AREA; |
||
30 | private string _THICKNESS; |
||
31 | private bool _FLOWMARK; |
||
32 | private int _FLOWMARK_PERCENT; |
||
33 | public SlopeType SlopeType { get; set; } |
||
34 | private List<Connector> _CONNECTORS = new List<Connector>(); |
||
35 | private List<Association> _ASSOCIATIONS = new List<Association>(); |
||
36 | private List<Attribute> _ATTRIBUTES = new List<Attribute>(); |
||
37 | 4e320fcb | gaqhf | |
38 | 5aec7e24 | gaqhf | public string OWNER { get => _OWNER; set => _OWNER = value; } |
39 | 32954c7f | gaqhf | public string STARTPOINT |
40 | { |
||
41 | get |
||
42 | { |
||
43 | return _STARTPOINT; |
||
44 | } |
||
45 | set |
||
46 | { |
||
47 | _STARTPOINT = value; |
||
48 | double x = 0, y = 0; |
||
49 | APIDUtils.ConvertPointBystring(_STARTPOINT, ref x, ref y); |
||
50 | Start_X = x; |
||
51 | Start_Y = y; |
||
52 | } |
||
53 | } |
||
54 | public string ENDPOINT |
||
55 | { |
||
56 | get |
||
57 | { |
||
58 | return _ENDPOINT; |
||
59 | } |
||
60 | set |
||
61 | { |
||
62 | _ENDPOINT = value; |
||
63 | double x = 0, y = 0; |
||
64 | APIDUtils.ConvertPointBystring(_ENDPOINT, ref x, ref y); |
||
65 | End_X = x; |
||
66 | End_Y = y; |
||
67 | } |
||
68 | } |
||
69 | 5aec7e24 | gaqhf | public string TYPE { get => _TYPE; set => _TYPE = value; } |
70 | public string AREA { get => _AREA; set => _AREA = value; } |
||
71 | public string THICKNESS { get => _THICKNESS; set => _THICKNESS = value; } |
||
72 | public List<Connector> CONNECTORS { get => _CONNECTORS; set => _CONNECTORS = value; } |
||
73 | public string TYPEUID { get => _TYPEUID; set => _TYPEUID = value; } |
||
74 | public bool FLOWMARK { get => _FLOWMARK; set => _FLOWMARK = value; } |
||
75 | public int FLOWMARK_PERCENT { get => _FLOWMARK_PERCENT; set => _FLOWMARK_PERCENT = value; } |
||
76 | public List<Association> ASSOCIATIONS { get => _ASSOCIATIONS; set => _ASSOCIATIONS = value; } |
||
77 | public List<Attribute> ATTRIBUTES { get => _ATTRIBUTES; set => _ATTRIBUTES = value; } |
||
78 | a999464f | gaqhf | public AvevaLineInfo Aveva { get; set; } |
79 | 016701e5 | gaqhf | |
80 | public void SetSlopeType() |
||
81 | { |
||
82 | SlopeType = APIDUtils.CalcSlope(Start_X, Start_Y, End_X, End_Y); |
||
83 | } |
||
84 | 4e320fcb | gaqhf | } |
85 | } |