hytos / DTI_PID / SPPIDConverter / DB / Project_Info.cs @ 7e4a64a3
이력 | 보기 | 이력해설 | 다운로드 (1.9 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 Converter.BaseModel |
9 |
{ |
10 |
public class Project_Info |
11 |
{ |
12 |
private static Project_Info projectInfo; |
13 |
private string _DefaultPath; |
14 |
private string _Name; |
15 |
private bool _Enable; |
16 |
private string _DBFilePath; |
17 |
private string _TempDirPath; |
18 |
private string _ImageDirPath; |
19 |
private string _SvgImageDirPath; |
20 |
private string _SPPID_ImageDirPath; |
21 |
|
22 |
public string DefaultPath { |
23 |
get { return _DefaultPath; } |
24 |
set { |
25 |
_DefaultPath = value; |
26 |
_Name = Path.GetFileName(value); |
27 |
_DBFilePath = value + @"\db\ITI_PID.db"; |
28 |
_TempDirPath = value + @"\Temp\"; |
29 |
_ImageDirPath = value + @"\image\"; |
30 |
_SvgImageDirPath = value + @"\svg\"; |
31 |
_SPPID_ImageDirPath = value + @"\SPPID_Image"; |
32 |
Directory.CreateDirectory(_SPPID_ImageDirPath); |
33 |
} |
34 |
} |
35 |
|
36 |
public string Name |
37 |
{ |
38 |
get { return _Name; } |
39 |
} |
40 |
|
41 |
public string DBFilePath |
42 |
{ |
43 |
get { return _DBFilePath; } |
44 |
} |
45 |
public string TempDirPath |
46 |
{ |
47 |
get { return _TempDirPath; } |
48 |
} |
49 |
|
50 |
public string ImageDirPath |
51 |
{ |
52 |
get { return _ImageDirPath; } |
53 |
} |
54 |
public string SvgImageDirPath |
55 |
{ |
56 |
get { return _SvgImageDirPath; } |
57 |
} |
58 |
|
59 |
public string SPPID_ImageDirPath |
60 |
{ |
61 |
get { return _SPPID_ImageDirPath; } |
62 |
} |
63 |
|
64 |
public bool Enable { get => _Enable; set => _Enable = value; } |
65 |
|
66 |
|
67 |
public static Project_Info GetInstance() |
68 |
{ |
69 |
if (projectInfo == null) |
70 |
projectInfo = new Project_Info(); |
71 |
|
72 |
return projectInfo; |
73 |
} |
74 |
} |
75 |
} |