개정판 32954c7f
dev issue #1225 : fix line get set
Change-Id: Ic7dd7a187f61a0c2ca6396ae51b08b5fda5995a5
DTI_PID/APIDConverter/Model/PlantItem/Line.cs | ||
---|---|---|
21 | 21 |
private string _TYPEUID; |
22 | 22 |
private string _STARTPOINT; |
23 | 23 |
private string _ENDPOINT; |
24 |
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; } |
|
24 | 28 |
private string _TYPE; |
25 | 29 |
private string _AREA; |
26 | 30 |
private string _THICKNESS; |
... | ... | |
32 | 36 |
private List<Attribute> _ATTRIBUTES = new List<Attribute>(); |
33 | 37 |
|
34 | 38 |
public string OWNER { get => _OWNER; set => _OWNER = value; } |
35 |
public string UID { get => _UID; set => _UID = value; } |
|
36 |
public string STARTPOINT { get => _STARTPOINT; set => _STARTPOINT = value; } |
|
37 |
public string ENDPOINT { get => _ENDPOINT; set => _ENDPOINT = value; } |
|
39 |
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 |
} |
|
38 | 69 |
public string TYPE { get => _TYPE; set => _TYPE = value; } |
39 | 70 |
public string AREA { get => _AREA; set => _AREA = value; } |
40 | 71 |
public string THICKNESS { get => _THICKNESS; set => _THICKNESS = value; } |
DTI_PID/APIDConverter/Utils/APIDUtils.cs | ||
---|---|---|
19 | 19 |
{ |
20 | 20 |
public class APIDUtils |
21 | 21 |
{ |
22 |
#region APID Converter |
|
22 | 23 |
public static object FindObjectByUID(Document document, string UID) |
23 | 24 |
{ |
24 | 25 |
if (!string.IsNullOrEmpty(UID) && UID != "None") |
... | ... | |
32 | 33 |
|
33 | 34 |
return null; |
34 | 35 |
} |
36 |
public static bool ConvertPointBystring(string sPoint, ref double dX, ref double dY) |
|
37 |
{ |
|
38 |
try |
|
39 |
{ |
|
40 |
string[] pointArr = sPoint.Split(new char[] { ',' }); |
|
41 |
if (pointArr.Length == 2) |
|
42 |
{ |
|
43 |
dX = Convert.ToDouble(pointArr[0]); |
|
44 |
dY = Convert.ToDouble(pointArr[1]); |
|
45 |
} |
|
46 |
} |
|
47 |
catch (Exception) |
|
48 |
{ |
|
49 |
dX = 0; |
|
50 |
dY = 0; |
|
51 |
return false; |
|
52 |
} |
|
53 |
|
|
54 |
return true; |
|
55 |
} |
|
56 |
#endregion |
|
35 | 57 |
|
58 |
#region Only AVEVA |
|
36 | 59 |
public static void SetAvevaExplorer() |
37 | 60 |
{ |
38 | 61 |
bool exist = false; |
... | ... | |
53 | 76 |
Aveva.Command.AvevaCommands.projectExplorer.Activate(Aveva.Command.AvevaCommands.projectExplorer.Count - 1); |
54 | 77 |
} |
55 | 78 |
} |
56 |
|
|
57 | 79 |
public static List<string> GetPipeStyle() |
58 | 80 |
{ |
59 | 81 |
List<string> list = new List<string>(); |
... | ... | |
71 | 93 |
|
72 | 94 |
return list; |
73 | 95 |
} |
74 |
|
|
75 | 96 |
public static List<string> GetSignalStyle() |
76 | 97 |
{ |
77 | 98 |
List<string> list = new List<string>(); |
... | ... | |
89 | 110 |
|
90 | 111 |
return list; |
91 | 112 |
} |
92 |
|
|
93 | 113 |
public static bool CreateDrawingAndOpen(string drawingNumber, string sheetNumber, string templateName, string templateId) |
94 | 114 |
{ |
95 | 115 |
bool result = true; |
... | ... | |
122 | 142 |
|
123 | 143 |
return result; |
124 | 144 |
} |
145 |
#endregion |
|
125 | 146 |
} |
126 | 147 |
} |
내보내기 Unified diff