markus / ConvertService / ServiceBase / Markus.Service.StationController / Data / ConvertPDF.cs @ 2f07b70a
이력 | 보기 | 이력해설 | 다운로드 (11.7 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.ComponentModel; |
4 |
using System.Linq; |
5 |
using System.Text; |
6 |
using System.Threading.Tasks; |
7 |
|
8 |
namespace Markus.Service.StationController.Data |
9 |
{ |
10 |
public class ConvertPDF : INotifyPropertyChanged |
11 |
{ |
12 |
public event PropertyChangedEventHandler PropertyChanged; |
13 |
|
14 |
private void OnPropertyChanged(string propertyName) |
15 |
{ |
16 |
if (PropertyChanged != null) |
17 |
{ |
18 |
PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); |
19 |
} |
20 |
|
21 |
} |
22 |
public ConvertPDF() |
23 |
{ |
24 |
|
25 |
} |
26 |
|
27 |
public bool Equals(ConvertPDF other) |
28 |
{ |
29 |
if (other is null) |
30 |
return false; |
31 |
|
32 |
return this.ConvertID == other.ConvertID && this.ProjectNumber == other.ProjectNumber; |
33 |
} |
34 |
|
35 |
public override bool Equals(object obj) => Equals(obj as ConvertPDF); |
36 |
public override int GetHashCode() |
37 |
{ |
38 |
var id = (ConvertID != null) ? ConvertID : ""; |
39 |
var project = (ProjectNumber != null) ? ProjectNumber : ""; |
40 |
|
41 |
return (id + project).GetHashCode(); |
42 |
} |
43 |
|
44 |
public ConvertPDF(string serviceID, string convertId, string projectNo, int Status, string documentID, string documentName, string documentNo, string document_URL, |
45 |
string revision, int currentPageNo, int totalPage, string exception, string groupNo, |
46 |
DateTime create_datetime, DateTime? start_datetime, DateTime? end_datetime, string originfilePath, string convertPath, string markusLink, int? reconverter) |
47 |
{ |
48 |
ServiceID = serviceID; |
49 |
DocumentID = documentID; |
50 |
ConvertID = convertId; |
51 |
ProjectNumber = projectNo; |
52 |
ConvertState = (StatusCodeType)Status; |
53 |
UniqueKey = documentID; |
54 |
DocumentName = documentName; |
55 |
DocumentNo = documentNo; |
56 |
DocumnetURL = document_URL; |
57 |
Revision = revision; |
58 |
CurrentPageNo = currentPageNo; |
59 |
TotalPage = totalPage; |
60 |
Exception = exception; |
61 |
GroupNo = groupNo; |
62 |
CreateTime = create_datetime; |
63 |
StartTime = start_datetime; |
64 |
EndTime = end_datetime; |
65 |
ConvertPath = convertPath; |
66 |
MarkusLink = markusLink; |
67 |
OriginfilePath = originfilePath; |
68 |
ReConverter = reconverter; |
69 |
|
70 |
string result = ""; |
71 |
if (originfilePath.Contains("/")) |
72 |
{ |
73 |
result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1); |
74 |
} |
75 |
else |
76 |
{ |
77 |
result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1); |
78 |
} |
79 |
this._FileName = result; |
80 |
} |
81 |
|
82 |
private string _FileName; |
83 |
public string FileName |
84 |
{ |
85 |
get |
86 |
{ |
87 |
return _FileName; |
88 |
} |
89 |
set |
90 |
{ |
91 |
if (_FileName != value) |
92 |
{ |
93 |
_FileName = value; |
94 |
OnPropertyChanged("FileName"); |
95 |
} |
96 |
} |
97 |
} |
98 |
|
99 |
private int? _ReConverter; |
100 |
public int? ReConverter |
101 |
{ |
102 |
get |
103 |
{ |
104 |
return _ReConverter; |
105 |
} |
106 |
set |
107 |
{ |
108 |
if (_ReConverter != value) |
109 |
{ |
110 |
_ReConverter = value; |
111 |
OnPropertyChanged("ReConverter"); |
112 |
} |
113 |
} |
114 |
} |
115 |
|
116 |
private string _OriginfilePath; |
117 |
public string OriginfilePath |
118 |
{ |
119 |
get |
120 |
{ |
121 |
return _OriginfilePath; |
122 |
} |
123 |
set |
124 |
{ |
125 |
if (_OriginfilePath != value) |
126 |
{ |
127 |
_OriginfilePath = value; |
128 |
OnPropertyChanged("OriginfilePath"); |
129 |
} |
130 |
} |
131 |
} |
132 |
|
133 |
private string _MarkusLink; |
134 |
public string MarkusLink |
135 |
{ |
136 |
get |
137 |
{ |
138 |
return _MarkusLink; |
139 |
} |
140 |
set |
141 |
{ |
142 |
if (_MarkusLink != value) |
143 |
{ |
144 |
_MarkusLink = value; |
145 |
OnPropertyChanged("MarkusLink"); |
146 |
|
147 |
} |
148 |
} |
149 |
} |
150 |
|
151 |
private string _ConvertPath; |
152 |
public string ConvertPath |
153 |
{ |
154 |
get |
155 |
{ |
156 |
return _ConvertPath; |
157 |
} |
158 |
set |
159 |
{ |
160 |
if (_ConvertPath != value) |
161 |
{ |
162 |
_ConvertPath = value; |
163 |
OnPropertyChanged("ConvertPath"); |
164 |
} |
165 |
} |
166 |
} |
167 |
|
168 |
private DateTime? _EndTime; |
169 |
public DateTime? EndTime |
170 |
{ |
171 |
get |
172 |
{ |
173 |
return _EndTime; |
174 |
} |
175 |
set |
176 |
{ |
177 |
if (value == null) |
178 |
{ |
179 |
_EndTime = null; |
180 |
OnPropertyChanged("EndTime"); |
181 |
} |
182 |
else if (_EndTime != value) |
183 |
{ |
184 |
_EndTime = value; |
185 |
OnPropertyChanged("EndTime"); |
186 |
} |
187 |
} |
188 |
} |
189 |
|
190 |
private DateTime? _StartTime; |
191 |
public DateTime? StartTime |
192 |
{ |
193 |
get |
194 |
{ |
195 |
return _StartTime; |
196 |
} |
197 |
set |
198 |
{ |
199 |
if (value == null) |
200 |
{ |
201 |
_StartTime = null; |
202 |
OnPropertyChanged("StartTime"); |
203 |
} |
204 |
else if (_StartTime != value) |
205 |
{ |
206 |
_StartTime = value; |
207 |
OnPropertyChanged("StartTime"); |
208 |
} |
209 |
} |
210 |
} |
211 |
|
212 |
private DateTime _CreateTime; |
213 |
public DateTime CreateTime |
214 |
{ |
215 |
get |
216 |
{ |
217 |
return _CreateTime; |
218 |
} |
219 |
set |
220 |
{ |
221 |
if (_CreateTime != value) |
222 |
{ |
223 |
_CreateTime = value; |
224 |
OnPropertyChanged("CreateTime"); |
225 |
} |
226 |
} |
227 |
} |
228 |
|
229 |
private string _GroupNo; |
230 |
public string GroupNo |
231 |
{ |
232 |
get |
233 |
{ |
234 |
return _GroupNo; |
235 |
} |
236 |
set |
237 |
{ |
238 |
if (_GroupNo != value) |
239 |
{ |
240 |
_GroupNo = value; |
241 |
OnPropertyChanged("GroupNo"); |
242 |
|
243 |
} |
244 |
} |
245 |
} |
246 |
|
247 |
private string _Exception; |
248 |
public string Exception |
249 |
{ |
250 |
get |
251 |
{ |
252 |
return _Exception; |
253 |
} |
254 |
set |
255 |
{ |
256 |
if (_Exception != value) |
257 |
{ |
258 |
_Exception = value; |
259 |
OnPropertyChanged("Exception"); |
260 |
|
261 |
} |
262 |
} |
263 |
} |
264 |
|
265 |
private int _TotalPage; |
266 |
public int TotalPage |
267 |
{ |
268 |
get |
269 |
{ |
270 |
return _TotalPage; |
271 |
} |
272 |
set |
273 |
{ |
274 |
if (_TotalPage != value) |
275 |
{ |
276 |
_TotalPage = value; |
277 |
OnPropertyChanged("TotalPage"); |
278 |
} |
279 |
} |
280 |
} |
281 |
|
282 |
private int _CurrentPageNo; |
283 |
public int CurrentPageNo |
284 |
{ |
285 |
get |
286 |
{ |
287 |
return _CurrentPageNo; |
288 |
} |
289 |
set |
290 |
{ |
291 |
if (_CurrentPageNo != value) |
292 |
{ |
293 |
_CurrentPageNo = value; |
294 |
OnPropertyChanged("CurrentPageNo"); |
295 |
} |
296 |
} |
297 |
} |
298 |
|
299 |
private string _Revision; |
300 |
public string Revision |
301 |
{ |
302 |
get |
303 |
{ |
304 |
return _Revision; |
305 |
} |
306 |
set |
307 |
{ |
308 |
if (_Revision != value) |
309 |
{ |
310 |
_Revision = value; |
311 |
OnPropertyChanged("Revision"); |
312 |
|
313 |
} |
314 |
} |
315 |
} |
316 |
|
317 |
private string _DocumnetURL; |
318 |
public string DocumnetURL |
319 |
{ |
320 |
get |
321 |
{ |
322 |
return _DocumnetURL; |
323 |
} |
324 |
set |
325 |
{ |
326 |
if (_DocumnetURL != value) |
327 |
{ |
328 |
_DocumnetURL = value; |
329 |
OnPropertyChanged("DocumnetURL"); |
330 |
|
331 |
} |
332 |
} |
333 |
} |
334 |
|
335 |
private string _DocumentNo; |
336 |
public string DocumentNo |
337 |
{ |
338 |
get |
339 |
{ |
340 |
return _DocumentNo; |
341 |
} |
342 |
set |
343 |
{ |
344 |
if (_DocumentNo != value) |
345 |
{ |
346 |
_DocumentNo = value; |
347 |
OnPropertyChanged("DocumentNo"); |
348 |
|
349 |
} |
350 |
} |
351 |
} |
352 |
|
353 |
private string _DocumentName; |
354 |
public string DocumentName |
355 |
{ |
356 |
get |
357 |
{ |
358 |
return _DocumentName; |
359 |
} |
360 |
set |
361 |
{ |
362 |
if (_DocumentName != value) |
363 |
{ |
364 |
_DocumentName = value; |
365 |
OnPropertyChanged("DocumentName"); |
366 |
|
367 |
} |
368 |
} |
369 |
} |
370 |
|
371 |
private string _UniqueKey; |
372 |
public string UniqueKey |
373 |
{ |
374 |
get |
375 |
{ |
376 |
return _UniqueKey; |
377 |
} |
378 |
set |
379 |
{ |
380 |
if (_UniqueKey != value) |
381 |
{ |
382 |
_UniqueKey = value; |
383 |
OnPropertyChanged("UniqueKey"); |
384 |
} |
385 |
} |
386 |
} |
387 |
|
388 |
private StatusCodeType _ConvertState; |
389 |
public StatusCodeType ConvertState |
390 |
{ |
391 |
get |
392 |
{ |
393 |
return _ConvertState; |
394 |
} |
395 |
set |
396 |
{ |
397 |
if (_ConvertState != value) |
398 |
{ |
399 |
_ConvertState = value; |
400 |
OnPropertyChanged("ConvertState"); |
401 |
} |
402 |
} |
403 |
} |
404 |
|
405 |
private string _DocumentID; |
406 |
public string DocumentID |
407 |
{ |
408 |
get |
409 |
{ |
410 |
return _DocumentID; |
411 |
} |
412 |
set |
413 |
{ |
414 |
if (_DocumentID != value) |
415 |
{ |
416 |
_DocumentID = value; |
417 |
OnPropertyChanged("DocumentID"); |
418 |
|
419 |
} |
420 |
} |
421 |
} |
422 |
|
423 |
|
424 |
private string _ConvertID; |
425 |
public string ConvertID |
426 |
{ |
427 |
get |
428 |
{ |
429 |
return _ConvertID; |
430 |
} |
431 |
set |
432 |
{ |
433 |
if (_ConvertID != value) |
434 |
{ |
435 |
_ConvertID = value; |
436 |
OnPropertyChanged("ConvertID"); |
437 |
} |
438 |
} |
439 |
} |
440 |
|
441 |
private string _ServiceID; |
442 |
public string ServiceID |
443 |
{ |
444 |
get |
445 |
{ |
446 |
return _ServiceID; |
447 |
} |
448 |
set |
449 |
{ |
450 |
if (_ServiceID != value) |
451 |
{ |
452 |
_ServiceID = value; |
453 |
OnPropertyChanged("ServiceID"); |
454 |
} |
455 |
} |
456 |
} |
457 |
|
458 |
private string _ProjectNumber; |
459 |
public string ProjectNumber |
460 |
{ |
461 |
get |
462 |
{ |
463 |
return _ProjectNumber; |
464 |
} |
465 |
set |
466 |
{ |
467 |
if (_ProjectNumber != value) |
468 |
{ |
469 |
_ProjectNumber = value; |
470 |
OnPropertyChanged("ProjectNumber"); |
471 |
} |
472 |
} |
473 |
} |
474 |
|
475 |
public enum StatusCodeType |
476 |
{ |
477 |
None = 0, |
478 |
Wait = 1, |
479 |
PageLoading = 2, |
480 |
Saving = 3, |
481 |
Completed = 4, |
482 |
FileError = 50, |
483 |
PageError = 55, |
484 |
NeedsPassword = 60, |
485 |
Error = 99, |
486 |
All_Error = 100 |
487 |
} |
488 |
} |
489 |
} |