개정판 db06b100
dev issue #1225 : APID model 구현
Change-Id: I9e9c4f8546330c52d74fc1d1c3eecf51e335fb9e
DTI_PID/APIDConverter/AVEVA.PID.CustomizationUtility_ACAD2018_x64.csproj | ||
---|---|---|
93 | 93 |
<Reference Include="WindowsBase" /> |
94 | 94 |
</ItemGroup> |
95 | 95 |
<ItemGroup> |
96 |
<Compile Include="Model\Document.cs" /> |
|
97 |
<Compile Include="Model\Equipment.cs" /> |
|
96 |
<Compile Include="Model\PlantItem\Document.cs" /> |
|
97 |
<Compile Include="Model\PlantItem\Equipment.cs" /> |
|
98 |
<Compile Include="Model\Project_DB.cs" /> |
|
99 |
<Compile Include="Model\Project_Info.cs" /> |
|
98 | 100 |
<Compile Include="Utils\APIDUtils.cs" /> |
99 | 101 |
<Compile Include="Form\APIDConverter.cs"> |
100 | 102 |
<SubType>Form</SubType> |
... | ... | |
112 | 114 |
<Compile Include="Form\MappingForm.Designer.cs"> |
113 | 115 |
<DependentUpon>MappingForm.cs</DependentUpon> |
114 | 116 |
</Compile> |
115 |
<Compile Include="Model\Line.cs" /> |
|
116 |
<Compile Include="Model\PlantItem.cs" /> |
|
117 |
<Compile Include="Model\Symbol.cs" /> |
|
117 |
<Compile Include="Model\PlantItem\Line.cs" />
|
|
118 |
<Compile Include="Model\PlantItem\PlantItem.cs" />
|
|
119 |
<Compile Include="Model\PlantItem\Symbol.cs" />
|
|
118 | 120 |
<Compile Include="PIDCustomization.cs" /> |
119 | 121 |
<Compile Include="Form\ProjectForm.cs"> |
120 | 122 |
<SubType>Form</SubType> |
DTI_PID/APIDConverter/Model/Document.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
using System.IO; |
|
7 |
|
|
8 |
namespace AVEVA.PID.CustomizationUtility.Model |
|
9 |
{ |
|
10 |
public class Document |
|
11 |
{ |
|
12 |
public bool Enabled = false; |
|
13 |
|
|
14 |
public List<Symbol> Symbols { get; set; } |
|
15 |
public List<Line> Lines { get; set; } |
|
16 |
public List<Equipment> Equipments { get; set; } |
|
17 |
|
|
18 |
public Document(string xmlPath) |
|
19 |
{ |
|
20 |
Symbols = new List<Symbol>(); |
|
21 |
Lines = new List<Line>(); |
|
22 |
Equipments = new List<Equipment>(); |
|
23 |
|
|
24 |
if (File.Exists(xmlPath)) |
|
25 |
{ |
|
26 |
|
|
27 |
} |
|
28 |
} |
|
29 |
} |
|
30 |
} |
DTI_PID/APIDConverter/Model/Equipment.cs | ||
---|---|---|
1 |
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 Equipment : PlantItem |
|
10 |
{ |
|
11 |
|
|
12 |
} |
|
13 |
} |
DTI_PID/APIDConverter/Model/Line.cs | ||
---|---|---|
1 |
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 Line : PlantItem |
|
10 |
{ |
|
11 |
|
|
12 |
} |
|
13 |
} |
DTI_PID/APIDConverter/Model/PlantItem.cs | ||
---|---|---|
1 |
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 PlantItem |
|
10 |
{ |
|
11 |
public string UID { get; set; } |
|
12 |
} |
|
13 |
} |
DTI_PID/APIDConverter/Model/PlantItem/Document.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
using System.IO; |
|
7 |
|
|
8 |
namespace AVEVA.PID.CustomizationUtility.Model |
|
9 |
{ |
|
10 |
public class Document |
|
11 |
{ |
|
12 |
public bool Enabled = false; |
|
13 |
|
|
14 |
public List<Symbol> Symbols { get; set; } |
|
15 |
public List<Line> Lines { get; set; } |
|
16 |
public List<Equipment> Equipments { get; set; } |
|
17 |
|
|
18 |
public Document(string xmlPath) |
|
19 |
{ |
|
20 |
Symbols = new List<Symbol>(); |
|
21 |
Lines = new List<Line>(); |
|
22 |
Equipments = new List<Equipment>(); |
|
23 |
|
|
24 |
if (File.Exists(xmlPath)) |
|
25 |
{ |
|
26 |
|
|
27 |
} |
|
28 |
} |
|
29 |
} |
|
30 |
} |
DTI_PID/APIDConverter/Model/PlantItem/Equipment.cs | ||
---|---|---|
1 |
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 Equipment : PlantItem |
|
10 |
{ |
|
11 |
|
|
12 |
} |
|
13 |
} |
DTI_PID/APIDConverter/Model/PlantItem/Line.cs | ||
---|---|---|
1 |
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 Line : PlantItem |
|
10 |
{ |
|
11 |
|
|
12 |
} |
|
13 |
} |
DTI_PID/APIDConverter/Model/PlantItem/PlantItem.cs | ||
---|---|---|
1 |
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 PlantItem |
|
10 |
{ |
|
11 |
public string UID { get; set; } |
|
12 |
} |
|
13 |
} |
DTI_PID/APIDConverter/Model/PlantItem/Symbol.cs | ||
---|---|---|
1 |
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 Symbol : PlantItem |
|
10 |
{ |
|
11 |
|
|
12 |
} |
|
13 |
} |
DTI_PID/APIDConverter/Model/Project_Info.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
using System.IO; |
|
7 |
|
|
8 |
namespace AVEVA.PID.CustomizationUtility.Model |
|
9 |
{ |
|
10 |
public enum ID2DB_Type |
|
11 |
{ |
|
12 |
SQLite, |
|
13 |
MSSQL |
|
14 |
} |
|
15 |
public class Project_Info |
|
16 |
{ |
|
17 |
private static Project_Info projectInfo; |
|
18 |
private string _DefaultPath; |
|
19 |
private string _Name; |
|
20 |
private bool _Enable; |
|
21 |
private string _DBFilePath; |
|
22 |
private string _TempDirPath; |
|
23 |
private string _ImageDirPath; |
|
24 |
private string _SvgImageDirPath; |
|
25 |
private string _SPPID_ImageDirPath; |
|
26 |
|
|
27 |
public ID2DB_Type DBType { get; set; } |
|
28 |
public string ServerIP { get; set; } |
|
29 |
public string Port { get; set; } |
|
30 |
public string DBUser { get; set; } |
|
31 |
public string DBPassword { get; set; } |
|
32 |
|
|
33 |
public string DefaultPath { |
|
34 |
get { return _DefaultPath; } |
|
35 |
set { |
|
36 |
_DefaultPath = value; |
|
37 |
_Name = Path.GetFileName(value); |
|
38 |
_DBFilePath = value + @"\db\ITI_PID.db"; |
|
39 |
_TempDirPath = value + @"\Temp\"; |
|
40 |
_ImageDirPath = value + @"\image\"; |
|
41 |
_SvgImageDirPath = value + @"\svg\"; |
|
42 |
_SPPID_ImageDirPath = value + @"\SPPID_Image"; |
|
43 |
Directory.CreateDirectory(_SPPID_ImageDirPath); |
|
44 |
} |
|
45 |
} |
|
46 |
|
|
47 |
public string Name |
|
48 |
{ |
|
49 |
get { return _Name; } |
|
50 |
} |
|
51 |
|
|
52 |
public string DBFilePath |
|
53 |
{ |
|
54 |
get { return _DBFilePath; } |
|
55 |
} |
|
56 |
|
|
57 |
public string TempDirPath |
|
58 |
{ |
|
59 |
get { return _TempDirPath; } |
|
60 |
} |
|
61 |
|
|
62 |
public string ImageDirPath |
|
63 |
{ |
|
64 |
get { return _ImageDirPath; } |
|
65 |
} |
|
66 |
|
|
67 |
public string SvgImageDirPath |
|
68 |
{ |
|
69 |
get { return _SvgImageDirPath; } |
|
70 |
} |
|
71 |
|
|
72 |
public string SPPID_ImageDirPath |
|
73 |
{ |
|
74 |
get { return _SPPID_ImageDirPath; } |
|
75 |
} |
|
76 |
|
|
77 |
public bool Enable { get => _Enable; set => _Enable = value; } |
|
78 |
|
|
79 |
public static Project_Info GetInstance() |
|
80 |
{ |
|
81 |
if (projectInfo == null) |
|
82 |
projectInfo = new Project_Info(); |
|
83 |
|
|
84 |
return projectInfo; |
|
85 |
} |
|
86 |
} |
|
87 |
} |
DTI_PID/APIDConverter/Model/Symbol.cs | ||
---|---|---|
1 |
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 Symbol : PlantItem |
|
10 |
{ |
|
11 |
|
|
12 |
} |
|
13 |
} |
내보내기 Unified diff