hytos / DTI_PID / SPPIDConverter / DB / Project_Info.cs @ 69b97ac0
이력 | 보기 | 이력해설 | 다운로드 (2.19 KB)
1 | 171142c5 | gaqhf | 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 Converter.BaseModel |
||
9 | { |
||
10 | 8847ea67 | gaqhf | public enum ID2DB_Type |
11 | { |
||
12 | SQLite, |
||
13 | MSSQL |
||
14 | } |
||
15 | 171142c5 | gaqhf | 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 | bca86986 | gaqhf | private string _ImageDirPath; |
24 | 1c2a2348 | gaqhf | private string _SvgImageDirPath; |
25 | private string _SPPID_ImageDirPath; |
||
26 | 171142c5 | gaqhf | |
27 | 8847ea67 | gaqhf | 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 | 171142c5 | gaqhf | 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 | bca86986 | gaqhf | _ImageDirPath = value + @"\image\"; |
41 | 1c2a2348 | gaqhf | _SvgImageDirPath = value + @"\svg\"; |
42 | _SPPID_ImageDirPath = value + @"\SPPID_Image"; |
||
43 | Directory.CreateDirectory(_SPPID_ImageDirPath); |
||
44 | 171142c5 | gaqhf | } |
45 | } |
||
46 | |||
47 | public string Name |
||
48 | { |
||
49 | get { return _Name; } |
||
50 | } |
||
51 | |||
52 | public string DBFilePath |
||
53 | { |
||
54 | get { return _DBFilePath; } |
||
55 | } |
||
56 | 8847ea67 | gaqhf | |
57 | 171142c5 | gaqhf | public string TempDirPath |
58 | { |
||
59 | get { return _TempDirPath; } |
||
60 | } |
||
61 | |||
62 | bca86986 | gaqhf | public string ImageDirPath |
63 | { |
||
64 | get { return _ImageDirPath; } |
||
65 | } |
||
66 | 8847ea67 | gaqhf | |
67 | 1c2a2348 | gaqhf | public string SvgImageDirPath |
68 | { |
||
69 | get { return _SvgImageDirPath; } |
||
70 | } |
||
71 | |||
72 | public string SPPID_ImageDirPath |
||
73 | { |
||
74 | get { return _SPPID_ImageDirPath; } |
||
75 | } |
||
76 | bca86986 | gaqhf | |
77 | 171142c5 | gaqhf | public bool Enable { get => _Enable; set => _Enable = value; } |
78 | ec0c7045 | gaqhf | |
79 | 171142c5 | gaqhf | public static Project_Info GetInstance() |
80 | { |
||
81 | if (projectInfo == null) |
||
82 | projectInfo = new Project_Info(); |
||
83 | |||
84 | return projectInfo; |
||
85 | } |
||
86 | } |
||
87 | } |