개정판 429bc8fa
issue #000000 MarkusImageCreate 수정
Change-Id: I917f0660998d86bb633f33dd333a299d7ae7ffbb
ID2.Manager/MarkusImageCreate/Program.cs | ||
---|---|---|
33 | 33 |
static void Main(string[] args) |
34 | 34 |
{ |
35 | 35 |
bool bSuccess = true; |
36 |
Teigha.Runtime.Services.odActivate(ActivationData.userInfo, ActivationData.userSignature); |
|
37 |
using (Teigha.Runtime.Services srv = new Teigha.Runtime.Services())
|
|
36 |
|
|
37 |
try
|
|
38 | 38 |
{ |
39 |
try |
|
39 |
Teigha.Runtime.Services.odActivate(ActivationData.userInfo, ActivationData.userSignature); |
|
40 |
using (Teigha.Runtime.Services srv = new Teigha.Runtime.Services()) |
|
40 | 41 |
{ |
41 | 42 |
HostApplicationServices.Current = new OdaMgdMViewApp.HostAppServ(); |
42 | 43 |
/**********************************************************************/ |
... | ... | |
57 | 58 |
while (!Directory.Exists(ID2ProjectsPath)) |
58 | 59 |
{ |
59 | 60 |
string sourceComputer = ID2ProjectsPath.Split('\\').FirstOrDefault(x => !string.IsNullOrEmpty(x)); |
60 |
IsCredential(sourceComputer); |
|
61 |
IsCredential($"\\\\{sourceComputer}에 대한 인증이 필요합니다.",sourceComputer); |
|
62 |
} |
|
63 |
|
|
64 |
while (!Directory.Exists(MarkusImagePath)) |
|
65 |
{ |
|
66 |
string sourceComputer = MarkusImagePath.Split('\\').FirstOrDefault(x => !string.IsNullOrEmpty(x)); |
|
67 |
IsCredential($"\\\\{sourceComputer}에 대한 인증이 필요합니다.",sourceComputer); |
|
61 | 68 |
} |
62 | 69 |
|
63 | 70 |
if (args.Length > 0) |
... | ... | |
72 | 79 |
InitConvertPDF(); |
73 | 80 |
} |
74 | 81 |
} |
75 |
/********************************************************************/ |
|
76 |
/* Display the error */ |
|
77 |
/********************************************************************/ |
|
78 |
catch (System.Exception e) |
|
79 |
{ |
|
80 |
bSuccess = false; |
|
81 |
Console.WriteLine("Teigha?NET for .dwg files Error: " + e.Message); |
|
82 |
} |
|
83 |
|
|
84 |
if (bSuccess) |
|
85 |
Console.WriteLine("OdReadExMgd Finished Successfully"); |
|
86 | 82 |
} |
83 |
/********************************************************************/ |
|
84 |
/* Display the error */ |
|
85 |
/********************************************************************/ |
|
86 |
catch (System.Exception e) |
|
87 |
{ |
|
88 |
bSuccess = false; |
|
89 |
Console.WriteLine("Teigha?NET for .dwg files Error: " + e.Message); |
|
90 |
} |
|
91 |
|
|
92 |
if (bSuccess) |
|
93 |
Console.WriteLine("OdReadExMgd Finished Successfully"); |
|
94 |
|
|
87 | 95 |
Console.WriteLine("완료"); |
88 | 96 |
Console.ReadKey(); |
89 | 97 |
} |
... | ... | |
131 | 139 |
} |
132 | 140 |
} |
133 | 141 |
|
134 |
static bool IsCredential(string path) |
|
142 |
static bool IsCredential(string Message, string path)
|
|
135 | 143 |
{ |
136 | 144 |
bool result = false; |
137 | 145 |
|
... | ... | |
147 | 155 |
if (credential.Load() == false) |
148 | 156 |
{ |
149 | 157 |
VistaPrompt prompt = new VistaPrompt(); |
158 |
prompt.Title = $"{Message}"; |
|
150 | 159 |
|
151 | 160 |
var dialogResult = prompt.ShowDialog(); |
152 | 161 |
|
내보내기 Unified diff