hytos / DTI_PID / SPPIDConverter / BaseModel / Note.cs @ 1299077b
이력 | 보기 | 이력해설 | 다운로드 (3.08 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 _OWNER; |
13 |
private string _ATTRIBUTEVALUE; |
14 |
private string _NAME; |
15 |
private string _LOCATION; |
16 |
private double _LOCATION_X; |
17 |
private double _LOCATION_Y; |
18 |
public double LOCATION_X { get { return _LOCATION_X; } } |
19 |
public double LOCATION_Y { get { return _LOCATION_Y; } } |
20 |
private string _VALUE; |
21 |
private double _ANGLE; |
22 |
private string _WIDTH; |
23 |
private string _HEIGHT; |
24 |
private string _AREA; |
25 |
private string _SCENE; |
26 |
private SPPIDSymbolInfo _SPPID; |
27 |
|
28 |
public string UID { get => _UID; set => _UID = value; } |
29 |
public string ATTRIBUTEVALUE { get => _ATTRIBUTEVALUE; set => _ATTRIBUTEVALUE = value; } |
30 |
public string NAME { get => _NAME; set => _NAME = value; } |
31 |
public string LOCATION |
32 |
{ |
33 |
get |
34 |
{ |
35 |
return _LOCATION; |
36 |
} |
37 |
set |
38 |
{ |
39 |
_LOCATION = value; |
40 |
double x = 0; |
41 |
double y = 0; |
42 |
Converter.SPPID.Util.SPPIDUtil.ConvertPointBystring(_LOCATION, ref x, ref y); |
43 |
_LOCATION_X = x; |
44 |
_LOCATION_Y = y; |
45 |
} |
46 |
} |
47 |
public string VALUE { get => _VALUE; set => _VALUE = value; } |
48 |
public double ANGLE |
49 |
{ |
50 |
get |
51 |
{ |
52 |
return _ANGLE; |
53 |
} |
54 |
set |
55 |
{ |
56 |
double gap = 0.05; |
57 |
if (value < gap) |
58 |
value = 0; |
59 |
else if (1.57 - gap < value && value < 1.57 + gap) |
60 |
value = 90 * Math.PI / 180; |
61 |
else if (3.14 - gap < value && value < 3.14 + gap) |
62 |
value = Math.PI; |
63 |
else if (4.71 - gap < value && value < 4.71 + gap) |
64 |
value = 270 * Math.PI / 180; |
65 |
|
66 |
_ANGLE = value; |
67 |
} |
68 |
} |
69 |
public string WIDTH { get => _WIDTH; set => _WIDTH = value; } |
70 |
public string HEIGHT { get => _HEIGHT; set => _HEIGHT = value; } |
71 |
public string AREA { get => _AREA; set => _AREA = value; } |
72 |
public SPPIDSymbolInfo SPPID { get => _SPPID; set => _SPPID = value; } |
73 |
|
74 |
public string SCENE |
75 |
{ |
76 |
get |
77 |
{ |
78 |
return _SCENE; |
79 |
} |
80 |
set |
81 |
{ |
82 |
string[] split = value.Split(','); |
83 |
X1 = Convert.ToDouble(split[0]); |
84 |
Y1 = Convert.ToDouble(split[1]); |
85 |
X2 = X1 + Convert.ToDouble(split[2]); |
86 |
Y2 = Y1 + Convert.ToDouble(split[3]); |
87 |
} |
88 |
} |
89 |
public double X1 { get; set; } |
90 |
public double X2 { get; set; } |
91 |
public double Y1 { get; set; } |
92 |
public double Y2 { get; set; } |
93 |
public SPPIDLabelLocationInfo SPPIDLabelLocation { get; set; } |
94 |
public string OWNER { get => _OWNER; set => _OWNER = value; } |
95 |
} |
96 |
} |