hytos / DTI_PID / APIDConverter / Model / Project_Info.cs @ 56cd4954
이력 | 보기 | 이력해설 | 다운로드 (2.2 KB)
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 _AVEVA_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 |
_AVEVA_ImageDirPath = value + @"\AVEVA_Image"; |
43 |
Directory.CreateDirectory(_AVEVA_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 AVEVA_ImageDirPath |
73 |
{ |
74 |
get { return _AVEVA_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 |
} |