markus / ConvertService / ServiceBase / Markus.Service.StationController / ViewModel / DataBaseItemsModel.cs @ e139272d
이력 | 보기 | 이력해설 | 다운로드 (51.2 KB)
1 | 31beca73 | semi | using Markus.Service.Extensions; |
---|---|---|---|
2 | e6281033 | alzkakdixm | using Markus.Service.StationController.Data; |
3 | a6e5055d | alzkakdixm | using Markus.Service.StationController.Behaviors; |
4 | using Markus.Service.StationController.Extensions; |
||
5 | b63dcfbb | semi | using Markus.Service.StationController.Controls; |
6 | a6e5055d | alzkakdixm | using Microsoft.Win32; |
7 | using System; |
||
8 | using System.Collections.Generic; |
||
9 | using System.ComponentModel; |
||
10 | using System.Linq; |
||
11 | 2decfbdf | alzkakdixm | using System.Threading.Tasks; |
12 | using System.Web; |
||
13 | a6e5055d | alzkakdixm | using System.Windows; |
14 | using Telerik.Windows.Controls; |
||
15 | using Telerik.Windows.Data; |
||
16 | e6281033 | alzkakdixm | using System.Net; |
17 | using System.Windows.Threading; |
||
18 | e78f0871 | alzkakdixm | using System.Diagnostics; |
19 | using System.Windows.Input; |
||
20 | using Markus.Mvvm.ToolKit; |
||
21 | 902f397c | semi | using System.Windows.Data; |
22 | 85f68fef | semi | using System.Windows.Controls; |
23 | 3bde451b | semi | using System.IO; |
24 | 2c634aed | semi | using Newtonsoft.Json; |
25 | 78683624 | semi | //using Markus.Service.Interface; |
26 | 2f07b70a | semi | using static Markus.Service.StationController.Data.ConvertPDF; |
27 | 80391351 | semi | using System.Collections.ObjectModel; |
28 | a6e5055d | alzkakdixm | |
29 | namespace Markus.Service.StationController.ViewModel |
||
30 | { |
||
31 | //세미 |
||
32 | dfc86b71 | taeseongkim | public class DataBaseItemsModel : Mvvm.ToolKit.ViewModelBase |
33 | a6e5055d | alzkakdixm | { |
34 | e6281033 | alzkakdixm | #region Constructor |
35 | |||
36 | /// <summary> |
||
37 | /// 실행하면 처음 들어가는 부분 |
||
38 | /// </summary> |
||
39 | public DataBaseItemsModel() |
||
40 | { |
||
41 | b63dcfbb | semi | DataFilterCommand = new DelegateCommand(DataFilter); |
42 | e6281033 | alzkakdixm | DataSaveFileGemBoxCommand = new DelegateCommand(DataExportData); |
43 | ConvertCommand = new DelegateCommand(DataConvert); |
||
44 | DeleteCommand = new DelegateCommand(DataDelete); |
||
45 | ValidateCommand = new DelegateCommand(DataValidate); |
||
46 | e78f0871 | alzkakdixm | MarkusLinkCommand = new DelegateCommand(MarkusLink); |
47 | 5a954acc | semi | RemoveCreateTimeFilterCommand = new DelegateCommand(RemoveCreateTimeFilter); |
48 | b63dcfbb | semi | ResetCommand = new DelegateCommand(Reset); |
49 | 218e5002 | semi | ConverAddCommand = new DelegateCommand(ConverAdd); |
50 | 78683624 | semi | ConvertPathFileSearchCommand = new DelegateCommand(ConvertPathFileSearch); |
51 | e6281033 | alzkakdixm | } |
52 | |||
53 | #endregion |
||
54 | |||
55 | #region Properties |
||
56 | |||
57 | e139272d | semi | public ObservableCollection<ProjectName> _ProjectNames; |
58 | public ObservableCollection<ProjectName> ProjectNames |
||
59 | { |
||
60 | get |
||
61 | { |
||
62 | if (_ProjectNames == null) |
||
63 | { |
||
64 | _ProjectNames = new System.Collections.ObjectModel.ObservableCollection<ProjectName>(); |
||
65 | } |
||
66 | |||
67 | return _ProjectNames; |
||
68 | } |
||
69 | set |
||
70 | { |
||
71 | _ProjectNames = value; |
||
72 | OnPropertyChanged(() => ProjectNames); |
||
73 | } |
||
74 | } |
||
75 | |||
76 | 2f07b70a | semi | private System.Collections.ObjectModel.ObservableCollection<ConvertPDF> _FilterSearch; |
77 | public System.Collections.ObjectModel.ObservableCollection<ConvertPDF> FilterSearch |
||
78 | b63dcfbb | semi | { |
79 | get |
||
80 | { |
||
81 | if (_FilterSearch == null) |
||
82 | { |
||
83 | 2f07b70a | semi | _FilterSearch = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF> |
84 | b63dcfbb | semi | { |
85 | 2f07b70a | semi | new ConvertPDF{ProjectNumber = "Filter Search"} |
86 | b63dcfbb | semi | }; |
87 | } |
||
88 | |||
89 | return _FilterSearch; |
||
90 | } |
||
91 | } |
||
92 | |||
93 | 2f07b70a | semi | private System.Collections.ObjectModel.ObservableCollection<ConvertPDF> _AliveItems; |
94 | public System.Collections.ObjectModel.ObservableCollection<ConvertPDF> AliveItems |
||
95 | 2decfbdf | alzkakdixm | { |
96 | e6281033 | alzkakdixm | get => _AliveItems; |
97 | set |
||
98 | 2decfbdf | alzkakdixm | { |
99 | 0cb12397 | alzkakdixm | _AliveItems = value; |
100 | 2decfbdf | alzkakdixm | OnPropertyChanged(() => AliveItems); |
101 | } |
||
102 | } |
||
103 | |||
104 | 5a954acc | semi | public ICollectionView FilterConvertSourceView |
105 | { |
||
106 | b63dcfbb | semi | get |
107 | { |
||
108 | var view = CollectionViewSource.GetDefaultView(FilterConvertSource); |
||
109 | return view; |
||
110 | } |
||
111 | 5a954acc | semi | } |
112 | |||
113 | 2f07b70a | semi | private System.Collections.ObjectModel.ObservableCollection<ConvertPDF> _FilterConvertSource; |
114 | public System.Collections.ObjectModel.ObservableCollection<ConvertPDF> FilterConvertSource |
||
115 | dfc86b71 | taeseongkim | { |
116 | 902f397c | semi | get |
117 | { |
||
118 | 5a954acc | semi | if (_FilterConvertSource == null) |
119 | { |
||
120 | 2f07b70a | semi | _FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF>(); |
121 | 5a954acc | semi | } |
122 | 902f397c | semi | return _FilterConvertSource; |
123 | } |
||
124 | dfc86b71 | taeseongkim | set |
125 | { |
||
126 | _FilterConvertSource = value; |
||
127 | OnPropertyChanged(() => FilterConvertSource); |
||
128 | } |
||
129 | } |
||
130 | |||
131 | |||
132 | 2f07b70a | semi | private System.Collections.ObjectModel.ObservableCollection<ConvertPDF> _RealConvertSource; |
133 | public System.Collections.ObjectModel.ObservableCollection<ConvertPDF> RealConvertSource |
||
134 | dfc86b71 | taeseongkim | { |
135 | get => _RealConvertSource; |
||
136 | set |
||
137 | { |
||
138 | _RealConvertSource = value; |
||
139 | OnPropertyChanged(() => RealConvertSource); |
||
140 | } |
||
141 | } |
||
142 | |||
143 | 2decfbdf | alzkakdixm | |
144 | 0cb12397 | alzkakdixm | private System.Windows.Documents.FlowDocument connectionLog; |
145 | 2decfbdf | alzkakdixm | public System.Windows.Documents.FlowDocument ConnectionLog |
146 | { |
||
147 | get => connectionLog; |
||
148 | set |
||
149 | { |
||
150 | if (connectionLog != value) |
||
151 | { |
||
152 | connectionLog = value; |
||
153 | OnPropertyChanged(() => ConnectionLog); |
||
154 | } |
||
155 | } |
||
156 | } |
||
157 | |||
158 | a6e5055d | alzkakdixm | |
159 | private Telerik.Windows.Data.EnumMemberViewModel _SelectedStatus; |
||
160 | public Telerik.Windows.Data.EnumMemberViewModel SelectedStatus |
||
161 | { |
||
162 | get => _SelectedStatus; |
||
163 | set |
||
164 | { |
||
165 | _SelectedStatus = value; |
||
166 | 0cb12397 | alzkakdixm | OnPropertyChanged(() => SelectedStatus); |
167 | a6e5055d | alzkakdixm | } |
168 | } |
||
169 | |||
170 | |||
171 | private SelectedCountItem _SelectedCount; |
||
172 | public SelectedCountItem SelectedCount |
||
173 | { |
||
174 | get => _SelectedCount; |
||
175 | set |
||
176 | { |
||
177 | _SelectedCount = value; |
||
178 | dfc86b71 | taeseongkim | OnPropertyChanged(() => SelectedCount); |
179 | a6e5055d | alzkakdixm | } |
180 | } |
||
181 | |||
182 | e6281033 | alzkakdixm | List<SelectedCountItem> _SelectedCountList; |
183 | public List<SelectedCountItem> SelectedCountList |
||
184 | a6e5055d | alzkakdixm | { |
185 | e6281033 | alzkakdixm | get |
186 | 2decfbdf | alzkakdixm | { |
187 | e6281033 | alzkakdixm | if (_SelectedCountList == null) |
188 | 2decfbdf | alzkakdixm | { |
189 | e6281033 | alzkakdixm | _SelectedCountList = new List<SelectedCountItem> |
190 | 2decfbdf | alzkakdixm | { |
191 | e6281033 | alzkakdixm | new SelectedCountItem{DisplayMember = "50",ValueMember = 50}, |
192 | new SelectedCountItem{DisplayMember = "100",ValueMember = 100}, |
||
193 | new SelectedCountItem{DisplayMember = "150",ValueMember = 150}, |
||
194 | new SelectedCountItem{DisplayMember = "200",ValueMember = 200} |
||
195 | }; |
||
196 | 2decfbdf | alzkakdixm | } |
197 | a6e5055d | alzkakdixm | |
198 | e6281033 | alzkakdixm | return _SelectedCountList; |
199 | 2decfbdf | alzkakdixm | } |
200 | } |
||
201 | a6e5055d | alzkakdixm | |
202 | 2f07b70a | semi | private ConvertPDF _SelectFilterConvert; |
203 | public ConvertPDF SelectFilterConvert |
||
204 | a6e5055d | alzkakdixm | { |
205 | 80391351 | semi | get |
206 | { |
||
207 | return _SelectFilterConvert; |
||
208 | } |
||
209 | a6e5055d | alzkakdixm | set |
210 | { |
||
211 | _SelectFilterConvert = value; |
||
212 | dfc86b71 | taeseongkim | OnPropertyChanged(() => SelectFilterConvert); |
213 | a6e5055d | alzkakdixm | } |
214 | } |
||
215 | 0cb12397 | alzkakdixm | |
216 | 80391351 | semi | |
217 | private ObservableCollection<ConvertPDF> _SelectFilterConvertList; |
||
218 | public ObservableCollection<ConvertPDF> SelectFilterConvertList |
||
219 | { |
||
220 | get |
||
221 | { |
||
222 | if (_SelectFilterConvertList == null) |
||
223 | { |
||
224 | _SelectFilterConvertList = new ObservableCollection<ConvertPDF>(); |
||
225 | } |
||
226 | return _SelectFilterConvertList; |
||
227 | } |
||
228 | set |
||
229 | { |
||
230 | _SelectFilterConvertList = value; |
||
231 | OnPropertyChanged(() => SelectFilterConvertList); |
||
232 | } |
||
233 | } |
||
234 | |||
235 | |||
236 | |||
237 | 2f07b70a | semi | private ConvertPDF _SelectRealConvert; |
238 | public ConvertPDF SelectRealConvert |
||
239 | a6e5055d | alzkakdixm | { |
240 | get => _SelectRealConvert; |
||
241 | set |
||
242 | { |
||
243 | _SelectRealConvert = value; |
||
244 | dfc86b71 | taeseongkim | OnPropertyChanged(() => SelectRealConvert); |
245 | a6e5055d | alzkakdixm | } |
246 | } |
||
247 | |||
248 | 0cb12397 | alzkakdixm | |
249 | 2f07b70a | semi | private ConvertPDF _SelectAliveConvert; |
250 | public ConvertPDF SelectAliveConvert |
||
251 | 8c128693 | semi | { |
252 | get => _SelectAliveConvert; |
||
253 | set |
||
254 | { |
||
255 | _SelectAliveConvert = value; |
||
256 | OnPropertyChanged(() => SelectAliveConvert); |
||
257 | } |
||
258 | } |
||
259 | |||
260 | |||
261 | 0cb12397 | alzkakdixm | private StatusTypeList _StatusType; |
262 | a6e5055d | alzkakdixm | public StatusTypeList StatusType |
263 | { |
||
264 | get => _StatusType; |
||
265 | set |
||
266 | { |
||
267 | _StatusType = value; |
||
268 | dfc86b71 | taeseongkim | OnPropertyChanged(() => StatusType); |
269 | a6e5055d | alzkakdixm | } |
270 | } |
||
271 | |||
272 | 0cb12397 | alzkakdixm | private bool _IsLoading; |
273 | a6e5055d | alzkakdixm | public bool IsLoading |
274 | { |
||
275 | get => _IsLoading; |
||
276 | set |
||
277 | { |
||
278 | if (_IsLoading != value) |
||
279 | { |
||
280 | _IsLoading = value; |
||
281 | dfc86b71 | taeseongkim | OnPropertyChanged(() => IsLoading); |
282 | a6e5055d | alzkakdixm | } |
283 | } |
||
284 | } |
||
285 | |||
286 | e6281033 | alzkakdixm | IEnumerable<Telerik.Windows.Data.EnumMemberViewModel> _StatusCodeList; |
287 | public IEnumerable<Telerik.Windows.Data.EnumMemberViewModel> StatusCodeList |
||
288 | a6e5055d | alzkakdixm | { |
289 | get |
||
290 | { |
||
291 | e6281033 | alzkakdixm | if (_StatusCodeList == null) |
292 | a6e5055d | alzkakdixm | { |
293 | e6281033 | alzkakdixm | _StatusCodeList = Telerik.Windows.Data.EnumDataSource.FromType<StatusCodeType>(); |
294 | a6e5055d | alzkakdixm | } |
295 | |||
296 | e6281033 | alzkakdixm | return _StatusCodeList; |
297 | a6e5055d | alzkakdixm | } |
298 | } |
||
299 | 8c7d1ea1 | alzkakdixm | |
300 | e139272d | semi | public ProjectName _ProjectNumberFilter; |
301 | public ProjectName ProjectNumberFilter |
||
302 | 902f397c | semi | { |
303 | e139272d | semi | get |
304 | 902f397c | semi | { |
305 | e139272d | semi | if (_ProjectNumberFilter == null) |
306 | 902f397c | semi | { |
307 | e139272d | semi | _ProjectNumberFilter = new ProjectName(); |
308 | 902f397c | semi | } |
309 | e139272d | semi | return _ProjectNumberFilter; |
310 | } |
||
311 | set |
||
312 | { |
||
313 | _ProjectNumberFilter = value; |
||
314 | OnPropertyChanged(() => ProjectNumberFilter); |
||
315 | 902f397c | semi | } |
316 | } |
||
317 | |||
318 | public string _UniqueKeyFilter; |
||
319 | public string UniqueKeyFilter |
||
320 | { |
||
321 | b63dcfbb | semi | get |
322 | { |
||
323 | return _UniqueKeyFilter; |
||
324 | } |
||
325 | 902f397c | semi | set |
326 | { |
||
327 | b63dcfbb | semi | if (_UniqueKeyFilter == "") |
328 | { |
||
329 | _UniqueKeyFilter = null; |
||
330 | } |
||
331 | else if (_UniqueKeyFilter != value) |
||
332 | 902f397c | semi | { |
333 | _UniqueKeyFilter = value; |
||
334 | OnPropertyChanged(() => UniqueKeyFilter); |
||
335 | } |
||
336 | } |
||
337 | } |
||
338 | |||
339 | 5a954acc | semi | public StatusCodeType _ConvertStateFilter; |
340 | public StatusCodeType ConvertStateFilter |
||
341 | 902f397c | semi | { |
342 | get { return _ConvertStateFilter; } |
||
343 | set |
||
344 | { |
||
345 | if (_ConvertStateFilter != value) |
||
346 | { |
||
347 | _ConvertStateFilter = value; |
||
348 | OnPropertyChanged(() => ConvertStateFilter); |
||
349 | } |
||
350 | } |
||
351 | } |
||
352 | |||
353 | public string _Docuemnt_NOFilter; |
||
354 | public string Docuemnt_NOFilter |
||
355 | { |
||
356 | get { return _Docuemnt_NOFilter; } |
||
357 | set |
||
358 | { |
||
359 | b63dcfbb | semi | if (_Docuemnt_NOFilter == "") |
360 | { |
||
361 | _Docuemnt_NOFilter = null; |
||
362 | } |
||
363 | else if (_Docuemnt_NOFilter != value) |
||
364 | 902f397c | semi | { |
365 | _Docuemnt_NOFilter = value; |
||
366 | OnPropertyChanged(() => Docuemnt_NOFilter); |
||
367 | } |
||
368 | } |
||
369 | } |
||
370 | |||
371 | 3bde451b | semi | public string _Document_NameFilter; |
372 | public string Document_NameFilter |
||
373 | 902f397c | semi | { |
374 | 3bde451b | semi | get { return _Document_NameFilter; } |
375 | 902f397c | semi | set |
376 | { |
||
377 | 3bde451b | semi | if (_Document_NameFilter == "") |
378 | b63dcfbb | semi | { |
379 | 3bde451b | semi | _Document_NameFilter = null; |
380 | b63dcfbb | semi | } |
381 | 3bde451b | semi | else if (_Document_NameFilter != value) |
382 | 902f397c | semi | { |
383 | 3bde451b | semi | _Document_NameFilter = value; |
384 | OnPropertyChanged(() => Document_NameFilter); |
||
385 | 902f397c | semi | } |
386 | } |
||
387 | } |
||
388 | |||
389 | b63dcfbb | semi | public int? _ReconverterFilter = 0; |
390 | 5a954acc | semi | public int? ReconverterFilter |
391 | 902f397c | semi | { |
392 | get { return _ReconverterFilter; } |
||
393 | set |
||
394 | { |
||
395 | 85f68fef | semi | if (_ReconverterFilter == null) |
396 | b63dcfbb | semi | { |
397 | _ReconverterFilter = 0; |
||
398 | } |
||
399 | else if (_ReconverterFilter != value) |
||
400 | 902f397c | semi | { |
401 | _ReconverterFilter = value; |
||
402 | OnPropertyChanged(() => ReconverterFilter); |
||
403 | 5a954acc | semi | |
404 | 902f397c | semi | } |
405 | } |
||
406 | } |
||
407 | |||
408 | public string _Service_IDFilter; |
||
409 | public string Service_IDFilter |
||
410 | { |
||
411 | get { return _Service_IDFilter; } |
||
412 | set |
||
413 | { |
||
414 | b63dcfbb | semi | if (_Service_IDFilter == "") |
415 | { |
||
416 | _Service_IDFilter = null; |
||
417 | } |
||
418 | 85f68fef | semi | else if (_Service_IDFilter != value) |
419 | 902f397c | semi | { |
420 | _Service_IDFilter = value; |
||
421 | OnPropertyChanged(() => Service_IDFilter); |
||
422 | } |
||
423 | } |
||
424 | } |
||
425 | |||
426 | public string _RevisionFilter; |
||
427 | public string RevisionFilter |
||
428 | { |
||
429 | get { return _RevisionFilter; } |
||
430 | set |
||
431 | { |
||
432 | b63dcfbb | semi | if (_RevisionFilter == "") |
433 | { |
||
434 | 85f68fef | semi | _RevisionFilter = null; |
435 | b63dcfbb | semi | } |
436 | else if (_RevisionFilter != value) |
||
437 | 902f397c | semi | { |
438 | _RevisionFilter = value; |
||
439 | OnPropertyChanged(() => RevisionFilter); |
||
440 | 218e5002 | semi | } |
441 | } |
||
442 | } |
||
443 | |||
444 | public string _GroupNOFilter; |
||
445 | public string GroupNOFilter |
||
446 | { |
||
447 | get { return _GroupNOFilter; } |
||
448 | set |
||
449 | { |
||
450 | if (_GroupNOFilter == "") |
||
451 | { |
||
452 | _GroupNOFilter = null; |
||
453 | } |
||
454 | else if (_GroupNOFilter != value) |
||
455 | { |
||
456 | _GroupNOFilter = value; |
||
457 | OnPropertyChanged(() => GroupNOFilter); |
||
458 | 902f397c | semi | } |
459 | } |
||
460 | } |
||
461 | 5a954acc | semi | |
462 | 30680747 | semi | public string _DOCUMENT_URLFilter; |
463 | public string DOCUMENT_URLFilter |
||
464 | { |
||
465 | get { return _DOCUMENT_URLFilter; } |
||
466 | set |
||
467 | { |
||
468 | if (_DOCUMENT_URLFilter == "") |
||
469 | { |
||
470 | _DOCUMENT_URLFilter = null; |
||
471 | } |
||
472 | else if (_DOCUMENT_URLFilter != value) |
||
473 | { |
||
474 | _DOCUMENT_URLFilter = value; |
||
475 | OnPropertyChanged(() => DOCUMENT_URLFilter); |
||
476 | } |
||
477 | } |
||
478 | } |
||
479 | |||
480 | b63dcfbb | semi | static DateTime DefaultCreateTime = DateTime.Now; |
481 | private DateTime _SelectedCreateTimeBegin = DefaultCreateTime; |
||
482 | 5a954acc | semi | public DateTime SelectedCreateTimeBegin |
483 | { |
||
484 | |||
485 | get { return _SelectedCreateTimeBegin; } |
||
486 | set |
||
487 | { |
||
488 | if (_SelectedCreateTimeBegin == value) |
||
489 | return; |
||
490 | _SelectedCreateTimeBegin = value; |
||
491 | OnPropertyChanged(() => SelectedCreateTimeBegin); |
||
492 | |||
493 | } |
||
494 | } |
||
495 | |||
496 | b63dcfbb | semi | private DateTime _SelectedCreateTimeEnd = DefaultCreateTime; |
497 | 5a954acc | semi | public DateTime SelectedCreateTimeEnd |
498 | { |
||
499 | |||
500 | get { return _SelectedCreateTimeEnd; } |
||
501 | set |
||
502 | { |
||
503 | if (_SelectedCreateTimeEnd == value) |
||
504 | return; |
||
505 | _SelectedCreateTimeEnd = value; |
||
506 | OnPropertyChanged(() => SelectedCreateTimeEnd); |
||
507 | } |
||
508 | } |
||
509 | |||
510 | 8c128693 | semi | public bool _ConvertShow; |
511 | public bool ConvertShow |
||
512 | { |
||
513 | get => _ConvertShow; |
||
514 | set |
||
515 | { |
||
516 | if (_ConvertShow = !value) |
||
517 | { |
||
518 | _ConvertShow = false; |
||
519 | } |
||
520 | _ConvertShow = value; |
||
521 | OnPropertyChanged(() => ConvertShow); |
||
522 | } |
||
523 | b63dcfbb | semi | } |
524 | 8c128693 | semi | |
525 | e6281033 | alzkakdixm | #endregion |
526 | |||
527 | #region Command |
||
528 | a6e5055d | alzkakdixm | |
529 | 0cb12397 | alzkakdixm | public DelegateCommand ConvertCommand { get; private set; } |
530 | public DelegateCommand DeleteCommand { get; private set; } |
||
531 | public DelegateCommand ValidateCommand { get; private set; } |
||
532 | e6281033 | alzkakdixm | public DelegateCommand DataSaveFileGemBoxCommand { get; private set; } |
533 | e78f0871 | alzkakdixm | public DelegateCommand MarkusLinkCommand { get; private set; } |
534 | b63dcfbb | semi | public DelegateCommand RemoveCreateTimeFilterCommand { get; private set; } |
535 | |||
536 | public DelegateCommand DataFilterCommand { get; private set; } |
||
537 | public DelegateCommand ResetCommand { get; private set; } |
||
538 | 218e5002 | semi | public DelegateCommand ConverAddCommand { get; private set; } |
539 | 78683624 | semi | public DelegateCommand ConvertPathFileSearchCommand { get; private set; } |
540 | 5a954acc | semi | |
541 | e6281033 | alzkakdixm | #endregion |
542 | a6e5055d | alzkakdixm | |
543 | e6281033 | alzkakdixm | #region Main Logic |
544 | a6e5055d | alzkakdixm | |
545 | e6281033 | alzkakdixm | /// <summary> |
546 | /// 각각의 Grid row 객체들 업데이트 |
||
547 | /// </summary> |
||
548 | |||
549 | private DispatcherTimer dispatcherTimer; |
||
550 | 8c128693 | semi | public override void Loaded() |
551 | { |
||
552 | base.Loaded(); |
||
553 | |||
554 | if (!App.IsDesignMode) |
||
555 | { |
||
556 | dispatcherTimer = new DispatcherTimer(); |
||
557 | dispatcherTimer.Tick += new EventHandler(Timer_Tick); |
||
558 | dispatcherTimer.Interval = new TimeSpan(0, 0, 1); |
||
559 | dispatcherTimer.Start(); |
||
560 | } |
||
561 | } |
||
562 | a6e5055d | alzkakdixm | |
563 | b119eeaa | taeseongkim | private async void Timer_Tick(object sender, EventArgs e) |
564 | a6e5055d | alzkakdixm | { |
565 | e6281033 | alzkakdixm | dispatcherTimer.Stop(); |
566 | |||
567 | if (IsAcitve) |
||
568 | a6e5055d | alzkakdixm | { |
569 | b119eeaa | taeseongkim | await App.Current.Dispatcher.InvokeAsync(() => |
570 | a6e5055d | alzkakdixm | { |
571 | e6281033 | alzkakdixm | DataSelect(); |
572 | |||
573 | AliveDataSelect(); |
||
574 | }); |
||
575 | } |
||
576 | |||
577 | e139272d | semi | await Task.Delay(5000); |
578 | //await Task.Delay(10000); |
||
579 | b119eeaa | taeseongkim | |
580 | //System.Threading.Thread.Sleep(new TimeSpan(0,0,0,0,100)); |
||
581 | e6281033 | alzkakdixm | |
582 | dispatcherTimer.Start(); |
||
583 | } |
||
584 | a6e5055d | alzkakdixm | |
585 | c7955b40 | semi | private async void SearchTimer_Tick(object sender, EventArgs e) |
586 | { |
||
587 | dispatcherTimer.Stop(); |
||
588 | |||
589 | if (IsAcitve) |
||
590 | { |
||
591 | await App.Current.Dispatcher.InvokeAsync(() => |
||
592 | { |
||
593 | DataSearch(new[] { (StatusCodeType)(SelectedStatus.Value) }, FilterConvertSource); |
||
594 | |||
595 | RealDataSelect(new[] { StatusCodeType.None, StatusCodeType.Wait, StatusCodeType.PageLoading, StatusCodeType.Saving }, RealConvertSource); |
||
596 | |||
597 | AliveDataSelect(); |
||
598 | }); |
||
599 | } |
||
600 | |||
601 | e139272d | semi | await Task.Delay(5000); |
602 | //await Task.Delay(10000); |
||
603 | c7955b40 | semi | |
604 | //System.Threading.Thread.Sleep(new TimeSpan(0,0,0,0,100)); |
||
605 | |||
606 | dispatcherTimer.Start(); |
||
607 | } |
||
608 | |||
609 | e6281033 | alzkakdixm | public override void Closed() |
610 | { |
||
611 | if (dispatcherTimer != null) |
||
612 | { |
||
613 | dispatcherTimer.Stop(); |
||
614 | a6e5055d | alzkakdixm | } |
615 | e6281033 | alzkakdixm | |
616 | base.Closed(); |
||
617 | a6e5055d | alzkakdixm | } |
618 | 0cb12397 | alzkakdixm | |
619 | 2decfbdf | alzkakdixm | |
620 | e6281033 | alzkakdixm | #endregion |
621 | a6e5055d | alzkakdixm | |
622 | e6281033 | alzkakdixm | #region Function |
623 | a6e5055d | alzkakdixm | |
624 | e6281033 | alzkakdixm | #region Data Select |
625 | |||
626 | /// <summary> |
||
627 | /// 상단 그리드 중앙 그리드 출력 데이터 |
||
628 | /// </summary> |
||
629 | private void DataSelect() |
||
630 | { |
||
631 | a6e5055d | alzkakdixm | |
632 | e6281033 | alzkakdixm | if (FilterConvertSource == null) |
633 | { |
||
634 | 2f07b70a | semi | FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF>(); |
635 | e6281033 | alzkakdixm | } |
636 | |||
637 | if (RealConvertSource == null) |
||
638 | { |
||
639 | 2f07b70a | semi | RealConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF>(); |
640 | e6281033 | alzkakdixm | } |
641 | |||
642 | /// combobox 에서 선택된 items |
||
643 | if (SelectedStatus != null) |
||
644 | { |
||
645 | DataSelect(new[] { (StatusCodeType)(SelectedStatus.Value) }, FilterConvertSource); |
||
646 | a6e5055d | alzkakdixm | } |
647 | |||
648 | e139272d | semi | |
649 | e6281033 | alzkakdixm | /// 컨버터중인 items |
650 | RealDataSelect(new[] { StatusCodeType.None, StatusCodeType.Wait, StatusCodeType.PageLoading, StatusCodeType.Saving }, RealConvertSource); |
||
651 | 2decfbdf | alzkakdixm | |
652 | e6281033 | alzkakdixm | } |
653 | 2decfbdf | alzkakdixm | |
654 | 2f07b70a | semi | private void RealDataSelect(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<ConvertPDF> collection) |
655 | 2decfbdf | alzkakdixm | { |
656 | try |
||
657 | { |
||
658 | 30680747 | semi | using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString)) |
659 | 2decfbdf | alzkakdixm | { |
660 | 2f07b70a | semi | List<ConvertPDF> Listitems = new List<ConvertPDF>(); |
661 | 2decfbdf | alzkakdixm | |
662 | 3bde451b | semi | foreach (var coll in collection) |
663 | { |
||
664 | e139272d | semi | var items = entities.SELECT_CONVERT_ITEM(coll.ConvertID, coll.ProjectNumber, null, null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null).ToList(); |
665 | 3bde451b | semi | |
666 | foreach (var x in items) |
||
667 | { |
||
668 | ee910e7f | semi | var MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech"); |
669 | 3bde451b | semi | |
670 | 2f07b70a | semi | ConvertPDF AddItem = new ConvertPDF(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE, |
671 | ee910e7f | semi | x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER); |
672 | 3bde451b | semi | Listitems.Add(AddItem); |
673 | e139272d | semi | |
674 | 3bde451b | semi | } |
675 | } |
||
676 | |||
677 | Listitems.ForEach(newitem => |
||
678 | 2decfbdf | alzkakdixm | { |
679 | collection.UpdateWhere(changeitem => |
||
680 | ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ConvertID == newitem.ConvertID && x.ProjectNumber == newitem.ProjectNumber); |
||
681 | }); |
||
682 | 8c128693 | semi | |
683 | 2decfbdf | alzkakdixm | } |
684 | } |
||
685 | catch (Exception ex) |
||
686 | { |
||
687 | MessageBox.Show(ex.ToString()); |
||
688 | } |
||
689 | } |
||
690 | |||
691 | 2f07b70a | semi | private void DataSelect(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<ConvertPDF> collection) |
692 | a6e5055d | alzkakdixm | { |
693 | try |
||
694 | { |
||
695 | 30680747 | semi | using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString)) |
696 | a6e5055d | alzkakdixm | { |
697 | |||
698 | 2decfbdf | alzkakdixm | int _status = 0; |
699 | if (SelectedStatus != null) |
||
700 | { |
||
701 | _status = (int)SelectedStatus.Value; |
||
702 | } |
||
703 | |||
704 | e139272d | semi | if (ProjectNames.Count() == 0) |
705 | 3bde451b | semi | { |
706 | e139272d | semi | foreach (var x in entities.SELECT_RUN_PROJECTS(0)) |
707 | { |
||
708 | ProjectName projectName = new ProjectName(x.PROJECT_NO, x.PROJECT_NAME); |
||
709 | ProjectNames.Add(projectName); |
||
710 | } |
||
711 | 3bde451b | semi | } |
712 | 2decfbdf | alzkakdixm | |
713 | e139272d | semi | var Listitems = from num in entities.SELECT_CONVERT_ITEM(null, null, null, _status, SelectedCount.ValueMember, null, null, null, null, null, null, null, null, null, null, null, null, null).ToList() |
714 | let MarkusLink = "kcom://" + CreateMarkusParam(num.PROJECT_NO, num.DOCUMENT_ID, "doftech") |
||
715 | select new ConvertPDF(num.SERVICE_ID, num.ID, num.PROJECT_NO, num.STATUS, num.DOCUMENT_ID, num.DOCUMENT_NAME, num.DOCUMENT_NO, num.DOCUMENT_URL, num.REVISION, num.CURRENT_PAGE, |
||
716 | num.TOTAL_PAGE, num.EXCEPTION, num.GROUP_NO, num.CREATE_DATETIME, num.START_DATETIME, num.END_DATETIME, num.DOCUMENT_URL, num.CONVERT_PATH, MarkusLink, num.RECONVERTER); |
||
717 | |||
718 | a6e5055d | alzkakdixm | if (collection.Count() == 0) |
719 | { |
||
720 | 2decfbdf | alzkakdixm | if (statusCodeTypeList.Count() == 1) |
721 | { |
||
722 | e139272d | semi | //Listitems.ForEach(x => collection.Add(x)); |
723 | foreach(var Listitem in Listitems.ToList()) |
||
724 | { |
||
725 | collection.Add(Listitem); |
||
726 | } |
||
727 | 2decfbdf | alzkakdixm | } |
728 | a6e5055d | alzkakdixm | } |
729 | else |
||
730 | { |
||
731 | 2decfbdf | alzkakdixm | |
732 | ////세미 업데이트 |
||
733 | e139272d | semi | //Listitems.ForEach(newitem => |
734 | //{ |
||
735 | // collection.UpdateWhere(changeitem => |
||
736 | // ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID); |
||
737 | //}); |
||
738 | foreach (var Listitem in Listitems) |
||
739 | a6e5055d | alzkakdixm | { |
740 | collection.UpdateWhere(changeitem => |
||
741 | e139272d | semi | ConvertItemEx.ChangeValues(changeitem, Listitem), x => x.ProjectNumber == Listitem.ProjectNumber && x.ConvertID == Listitem.ConvertID); |
742 | } |
||
743 | 2decfbdf | alzkakdixm | if (statusCodeTypeList.Count() == 1) |
744 | a6e5055d | alzkakdixm | { |
745 | 2decfbdf | alzkakdixm | //삭제 |
746 | for (int i = collection.Count() - 1; i >= 0; --i) |
||
747 | a6e5055d | alzkakdixm | { |
748 | 2decfbdf | alzkakdixm | var item = collection[i]; |
749 | a6e5055d | alzkakdixm | |
750 | 3bde451b | semi | if (Listitems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)//디비에서 가져온 값과 마지막값부터 차례대로 비교 |
751 | 2decfbdf | alzkakdixm | {//참=> 0제외한 모든 수 |
752 | collection.RemoveAt(i); |
||
753 | } |
||
754 | } |
||
755 | a6e5055d | alzkakdixm | } |
756 | |||
757 | 2decfbdf | alzkakdixm | if (statusCodeTypeList.Count() == 1) |
758 | a6e5055d | alzkakdixm | { |
759 | 2decfbdf | alzkakdixm | //추가 convert 후 추가됨 |
760 | 3bde451b | semi | foreach (var item in Listitems) |
761 | 2decfbdf | alzkakdixm | { |
762 | if (collection.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)//그리드와 디비 변동 없으면 안들어감 |
||
763 | { |
||
764 | /*for (int i = 0; i < collection.Count()+1; i++)//위 그리드에서 카운드 개수 변함 없고 컨버터 끝난 후 추가할때 createtime 비교 하며 order by 순으로 추가*/ |
||
765 | for (int i = 0; i < 200; i++) |
||
766 | { |
||
767 | if (i < collection.Count() - 1) |
||
768 | { |
||
769 | if (DateTime.Compare(collection[i].CreateTime, item.CreateTime) < 0) |
||
770 | { |
||
771 | collection.Insert(i, item); |
||
772 | break; |
||
773 | } |
||
774 | } |
||
775 | else |
||
776 | { |
||
777 | collection.Add(item); |
||
778 | break; |
||
779 | } |
||
780 | } |
||
781 | |||
782 | } |
||
783 | a6e5055d | alzkakdixm | |
784 | } |
||
785 | } |
||
786 | 2decfbdf | alzkakdixm | |
787 | a6e5055d | alzkakdixm | } |
788 | } |
||
789 | 2decfbdf | alzkakdixm | |
790 | a6e5055d | alzkakdixm | } |
791 | catch (Exception ex) |
||
792 | { |
||
793 | 31beca73 | semi | MessageBox.Show(ex.ToString()); |
794 | //System.Diagnostics.Debug.WriteLine(ex.ToString()); |
||
795 | a6e5055d | alzkakdixm | } |
796 | } |
||
797 | |||
798 | 2f07b70a | semi | private void DataSearch(IEnumerable<StatusCodeType> statusCodeTypeList, System.Collections.ObjectModel.ObservableCollection<ConvertPDF> collection) |
799 | b63dcfbb | semi | { |
800 | try |
||
801 | { |
||
802 | 30680747 | semi | using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString)) |
803 | b63dcfbb | semi | { |
804 | 3bde451b | semi | int _status = 0; |
805 | if (SelectedStatus != null) |
||
806 | 218e5002 | semi | { |
807 | 3bde451b | semi | _status = (int)SelectedStatus.Value; |
808 | } |
||
809 | b63dcfbb | semi | |
810 | 3bde451b | semi | //DocumentID = unikey |
811 | DateTime? Start_CreateTime = null; |
||
812 | DateTime? Finish_CreateTime = null; |
||
813 | e139272d | semi | if (SelectedCreateTimeBegin != DefaultCreateTime) |
814 | 3bde451b | semi | { |
815 | Start_CreateTime = SelectedCreateTimeBegin; |
||
816 | } |
||
817 | e139272d | semi | if (SelectedCreateTimeEnd != DefaultCreateTime) |
818 | 3bde451b | semi | { |
819 | Finish_CreateTime = SelectedCreateTimeEnd; |
||
820 | } |
||
821 | b63dcfbb | semi | |
822 | e139272d | semi | if (ProjectNames.Count() == 0) |
823 | 3bde451b | semi | { |
824 | e139272d | semi | foreach (var x in entities.SELECT_RUN_PROJECTS(0)) |
825 | { |
||
826 | ProjectName projectName = new ProjectName(x.PROJECT_NO, x.PROJECT_NAME); |
||
827 | ProjectNames.Add(projectName); |
||
828 | } |
||
829 | 3bde451b | semi | } |
830 | 218e5002 | semi | |
831 | e139272d | semi | var Listitems = from num in entities.SELECT_CONVERT_ITEM(null, ProjectNumberFilter.Project_NO, UniqueKeyFilter, _status, SelectedCount.ValueMember, Start_CreateTime, Finish_CreateTime, null, |
832 | null, null, null, GroupNOFilter, Document_NameFilter, Docuemnt_NOFilter, RevisionFilter, Service_IDFilter, ReconverterFilter, DOCUMENT_URLFilter).ToList() |
||
833 | let MarkusLink = "kcom://" + CreateMarkusParam(num.PROJECT_NO, num.DOCUMENT_ID, "doftech") |
||
834 | select new ConvertPDF(num.SERVICE_ID, num.ID, num.PROJECT_NO, num.STATUS, num.DOCUMENT_ID, num.DOCUMENT_NAME, num.DOCUMENT_NO, num.DOCUMENT_URL, num.REVISION, num.CURRENT_PAGE, |
||
835 | num.TOTAL_PAGE, num.EXCEPTION, num.GROUP_NO, num.CREATE_DATETIME, num.START_DATETIME, num.END_DATETIME, num.DOCUMENT_URL, num.CONVERT_PATH, MarkusLink, num.RECONVERTER); |
||
836 | |||
837 | 3bde451b | semi | if (collection.Count() == 0) |
838 | { |
||
839 | if (statusCodeTypeList.Count() == 1) |
||
840 | b63dcfbb | semi | { |
841 | 3bde451b | semi | foreach (var x in Listitems) |
842 | b63dcfbb | semi | { |
843 | 3bde451b | semi | collection.Add(x); |
844 | b63dcfbb | semi | } |
845 | } |
||
846 | 3bde451b | semi | } |
847 | else |
||
848 | { |
||
849 | |||
850 | ////세미 업데이트 |
||
851 | foreach (var newitem in Listitems) |
||
852 | b63dcfbb | semi | { |
853 | 3bde451b | semi | collection.UpdateWhere(changeitem => |
854 | ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID); |
||
855 | } |
||
856 | b63dcfbb | semi | |
857 | |||
858 | 3bde451b | semi | if (statusCodeTypeList.Count() == 1) |
859 | { |
||
860 | b63dcfbb | semi | |
861 | 3bde451b | semi | //삭제 |
862 | for (int i = collection.Count() - 1; i >= 0; --i) |
||
863 | b63dcfbb | semi | { |
864 | 3bde451b | semi | var item = collection[i]; |
865 | b63dcfbb | semi | |
866 | 3bde451b | semi | if (Listitems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0) |
867 | b63dcfbb | semi | { |
868 | 3bde451b | semi | collection.RemoveAt(i); |
869 | b63dcfbb | semi | } |
870 | } |
||
871 | 3bde451b | semi | } |
872 | b63dcfbb | semi | |
873 | 3bde451b | semi | if (statusCodeTypeList.Count() == 1) |
874 | { |
||
875 | //추가 convert 후 추가됨 |
||
876 | foreach (var item in Listitems) |
||
877 | b63dcfbb | semi | { |
878 | 3bde451b | semi | if (collection.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0) |
879 | b63dcfbb | semi | { |
880 | 3bde451b | semi | for (int i = 0; i < 200; i++) |
881 | b63dcfbb | semi | { |
882 | 3bde451b | semi | if (i < collection.Count() - 1) |
883 | b63dcfbb | semi | { |
884 | 3bde451b | semi | if (DateTime.Compare(collection[i].CreateTime, item.CreateTime) < 0) |
885 | 218e5002 | semi | { |
886 | 3bde451b | semi | collection.Insert(i, item); |
887 | b63dcfbb | semi | break; |
888 | } |
||
889 | } |
||
890 | 3bde451b | semi | else |
891 | { |
||
892 | collection.Add(item); |
||
893 | break; |
||
894 | } |
||
895 | b63dcfbb | semi | } |
896 | |||
897 | } |
||
898 | |||
899 | 3bde451b | semi | } |
900 | 218e5002 | semi | } |
901 | 3bde451b | semi | |
902 | b63dcfbb | semi | } |
903 | 3bde451b | semi | |
904 | b63dcfbb | semi | } |
905 | |||
906 | } |
||
907 | catch (Exception ex) |
||
908 | { |
||
909 | 31beca73 | semi | MessageBox.Show(ex.ToString()); |
910 | //System.Diagnostics.Debug.WriteLine(ex.ToString()); |
||
911 | b63dcfbb | semi | } |
912 | } |
||
913 | e6281033 | alzkakdixm | /// <summary> |
914 | /// 서비스의 실시간 컨버터 Item |
||
915 | /// </summary> |
||
916 | private async void AliveDataSelect() |
||
917 | a6e5055d | alzkakdixm | { |
918 | e6281033 | alzkakdixm | try |
919 | a6e5055d | alzkakdixm | { |
920 | 2f07b70a | semi | List<ConvertPDF> newitems = new List<ConvertPDF>(); |
921 | 3bde451b | semi | foreach (var client in App.StationClientList) |
922 | e6281033 | alzkakdixm | { |
923 | 3bde451b | semi | if (await SimplePingAsync(client.Endpoint.Address.ToString())) |
924 | e6281033 | alzkakdixm | { |
925 | 3bde451b | semi | try |
926 | e6281033 | alzkakdixm | { |
927 | 2f07b70a | semi | List<ConvertPDF> itemsToList = new List<ConvertPDF>(); |
928 | 3bde451b | semi | var items = await client.AliveConvertListAsync(); |
929 | string result = ""; |
||
930 | 8c128693 | semi | |
931 | 3bde451b | semi | foreach (var item in items) |
932 | { |
||
933 | 2f07b70a | semi | ConvertPDF itemsToEach = new ConvertPDF(); |
934 | 3bde451b | semi | itemsToEach.ServiceID = item.ServiceID; |
935 | itemsToEach.ConvertID = item.ConvertID; |
||
936 | itemsToEach.ProjectNumber = item.ProjectNumber; |
||
937 | 8c128693 | semi | |
938 | ee910e7f | semi | var MarkusLink = "kcom://" + CreateMarkusParam(item.ProjectNumber, item.DocumentID, "doftech"); |
939 | 8c128693 | semi | |
940 | 3bde451b | semi | if (item.ConvertState != null) |
941 | { |
||
942 | itemsToEach.ConvertState = (StatusCodeType)Enum.Parse(typeof(StatusCodeType), item.ConvertState); |
||
943 | e6281033 | alzkakdixm | } |
944 | |||
945 | 3bde451b | semi | if (item.OriginfilePath.Contains("/")) |
946 | { |
||
947 | result = item.OriginfilePath.Substring(item.OriginfilePath.LastIndexOf("/") + 1); |
||
948 | } |
||
949 | else |
||
950 | 8c128693 | semi | { |
951 | 3bde451b | semi | result = item.OriginfilePath.Substring(item.OriginfilePath.LastIndexOf("%") + 1); |
952 | 8c128693 | semi | } |
953 | 3bde451b | semi | itemsToEach.FileName = result; |
954 | |||
955 | itemsToEach.CurrentPageNo = item.CurrentPageNo; |
||
956 | itemsToEach.TotalPage = item.TotalPage; |
||
957 | itemsToEach.OriginfilePath = item.OriginfilePath; |
||
958 | itemsToEach.ConvertPath = item.ConvertPath; |
||
959 | ee910e7f | semi | itemsToEach.MarkusLink = MarkusLink; |
960 | 3bde451b | semi | itemsToEach.UniqueKey = item.UniqueKey;//DocumentNO 없음 |
961 | itemsToEach.GroupNo = item.GroupNo;//없음 |
||
962 | 78683624 | semi | //itemsToEach.ProcessorAffinity = item.ProcessorAffinity; |
963 | 5feff9f0 | semi | itemsToEach.DocumentName = item.DocumnetName; |
964 | ee910e7f | semi | itemsToEach.Revision = item.Revision; //없음 |
965 | 3bde451b | semi | itemsToEach.Exception = item.Exception;//없음 |
966 | ee910e7f | semi | itemsToEach.ConvertPath = item.ConvertPath; |
967 | 3bde451b | semi | itemsToEach.CreateTime = item.CreateTime; |
968 | itemsToEach.ReConverter = item.ReConverter; |
||
969 | itemsToEach.DocumentID = item.DocumentID; |
||
970 | itemsToEach.StartTime = item.StartTime; |
||
971 | itemsToEach.EndTime = item.EndTime; |
||
972 | |||
973 | itemsToList.Add(itemsToEach); |
||
974 | e6281033 | alzkakdixm | } |
975 | 3bde451b | semi | newitems.AddRange(itemsToList); |
976 | System.Diagnostics.Trace.WriteLine($"{client.Endpoint.Address} ping"); |
||
977 | |||
978 | if (items.Count() == 0) |
||
979 | e6281033 | alzkakdixm | { |
980 | 3bde451b | semi | System.Diagnostics.Trace.WriteLine($"{client.Endpoint.Address} Alive Items is zero."); |
981 | e6281033 | alzkakdixm | } |
982 | } |
||
983 | 3bde451b | semi | catch (Exception ex) |
984 | e6281033 | alzkakdixm | { |
985 | 3bde451b | semi | System.Diagnostics.Trace.Fail($"{client.Endpoint.Address} {ex.Message}"); |
986 | e6281033 | alzkakdixm | } |
987 | } |
||
988 | 3bde451b | semi | else |
989 | { |
||
990 | System.Diagnostics.Trace.Fail($"{client.Endpoint.Address} ping Error"); |
||
991 | } |
||
992 | |||
993 | e6281033 | alzkakdixm | } |
994 | ItemsUpdate(newitems); |
||
995 | await System.Windows.Application.Current.Dispatcher.InvokeAsync(() => ItemsUpdate(newitems)); |
||
996 | } |
||
997 | catch (Exception ex) |
||
998 | { |
||
999 | System.Diagnostics.Debug.WriteLine(ex.ToString()); |
||
1000 | a6e5055d | alzkakdixm | } |
1001 | } |
||
1002 | |||
1003 | e6281033 | alzkakdixm | /// <summary> |
1004 | /// AliveDataSelect의 Data Update |
||
1005 | /// </summary> |
||
1006 | /// <param name="newitems"></param> |
||
1007 | 2f07b70a | semi | private void ItemsUpdate(List<ConvertPDF> newitems) |
1008 | a6e5055d | alzkakdixm | { |
1009 | |||
1010 | e6281033 | alzkakdixm | foreach (var item in newitems) |
1011 | { |
||
1012 | item.OriginfilePath = HttpUtility.UrlDecode(item.OriginfilePath); |
||
1013 | } |
||
1014 | |||
1015 | if (AliveItems == null) |
||
1016 | { |
||
1017 | 2f07b70a | semi | AliveItems = new System.Collections.ObjectModel.ObservableCollection<ConvertPDF>(); |
1018 | e6281033 | alzkakdixm | |
1019 | foreach (var item in newitems) |
||
1020 | { |
||
1021 | AliveItems.Add(item); |
||
1022 | } |
||
1023 | } |
||
1024 | else |
||
1025 | a6e5055d | alzkakdixm | { |
1026 | e6281033 | alzkakdixm | /// 데이터 업데이트 |
1027 | newitems.ForEach(newitem => |
||
1028 | { |
||
1029 | AliveItems.UpdateWhere(changeitem => ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID); |
||
1030 | }); |
||
1031 | |||
1032 | // 추가 |
||
1033 | foreach (var item in newitems) |
||
1034 | { |
||
1035 | if (AliveItems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0) |
||
1036 | { |
||
1037 | AliveItems.Add(item); |
||
1038 | } |
||
1039 | } |
||
1040 | a6e5055d | alzkakdixm | |
1041 | e6281033 | alzkakdixm | /// 삭제 |
1042 | 2decfbdf | alzkakdixm | |
1043 | e6281033 | alzkakdixm | for (int i = AliveItems.Count() - 1; i > -1; --i) |
1044 | { |
||
1045 | var item = AliveItems[i]; |
||
1046 | a6e5055d | alzkakdixm | |
1047 | e6281033 | alzkakdixm | if (newitems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0) |
1048 | { |
||
1049 | try |
||
1050 | { |
||
1051 | AliveItems.RemoveAt(i); |
||
1052 | } |
||
1053 | catch (Exception ex) |
||
1054 | { |
||
1055 | System.Diagnostics.Debug.WriteLine(ex.ToString()); |
||
1056 | } |
||
1057 | } |
||
1058 | } |
||
1059 | 2decfbdf | alzkakdixm | } |
1060 | a6e5055d | alzkakdixm | } |
1061 | |||
1062 | |||
1063 | e6281033 | alzkakdixm | public static async Task<bool> SimplePingAsync(string uri) |
1064 | a6e5055d | alzkakdixm | { |
1065 | e6281033 | alzkakdixm | bool result = false; |
1066 | |||
1067 | try |
||
1068 | { |
||
1069 | using (System.Net.Http.HttpClient Client = new System.Net.Http.HttpClient()) |
||
1070 | { |
||
1071 | Client.Timeout = new TimeSpan(0, 0, 60); |
||
1072 | |||
1073 | var message = await Client.GetAsync(uri); |
||
1074 | |||
1075 | System.Net.HttpStatusCode StatusCode = message.StatusCode; |
||
1076 | |||
1077 | switch (StatusCode) |
||
1078 | { |
||
1079 | |||
1080 | case System.Net.HttpStatusCode.Accepted: |
||
1081 | case System.Net.HttpStatusCode.OK: |
||
1082 | result = true; |
||
1083 | break; |
||
1084 | } |
||
1085 | } |
||
1086 | } |
||
1087 | catch (Exception ex) |
||
1088 | { |
||
1089 | result = false; |
||
1090 | System.Diagnostics.Debug.WriteLine(ex.ToString()); |
||
1091 | } |
||
1092 | |||
1093 | return result; |
||
1094 | a6e5055d | alzkakdixm | } |
1095 | |||
1096 | e6281033 | alzkakdixm | #endregion |
1097 | |||
1098 | #region Data Convert |
||
1099 | a6e5055d | alzkakdixm | |
1100 | e6281033 | alzkakdixm | private void DataConvert(object obj) |
1101 | { |
||
1102 | 80391351 | semi | if (SelectFilterConvertList == null) |
1103 | e6281033 | alzkakdixm | { |
1104 | MessageBox.Show("왼쪽 버튼 클릭 후 Converter 해주세요!"); |
||
1105 | } |
||
1106 | else |
||
1107 | a6e5055d | alzkakdixm | { |
1108 | e6281033 | alzkakdixm | var resultRealConvert = 0; |
1109 | var resultFiltertConvert = 0; |
||
1110 | if (SelectRealConvert != null) |
||
1111 | { |
||
1112 | 3bde451b | semi | resultRealConvert = SetCleanUpItem(SelectRealConvert);//ConvertDataBase |
1113 | e6281033 | alzkakdixm | } |
1114 | 80391351 | semi | if (SelectFilterConvertList != null) |
1115 | a6e5055d | alzkakdixm | { |
1116 | 80391351 | semi | foreach (var SelectFilterConvert in SelectFilterConvertList) |
1117 | { |
||
1118 | resultFiltertConvert = SetCleanUpItem(SelectFilterConvert); |
||
1119 | } |
||
1120 | e6281033 | alzkakdixm | } |
1121 | System.Diagnostics.Debug.WriteLine(resultRealConvert + " " + resultFiltertConvert); |
||
1122 | |||
1123 | 30680747 | semi | using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString)) |
1124 | e6281033 | alzkakdixm | { |
1125 | 80391351 | semi | foreach (var SelectFilterConvert in SelectFilterConvertList) |
1126 | { |
||
1127 | var items = entities.SELECT_CONVERT_ITEM(SelectFilterConvert.ConvertID, null, null, null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null); //프로시저 이용 |
||
1128 | 3bde451b | semi | |
1129 | |||
1130 | 80391351 | semi | foreach (var x in items) |
1131 | { |
||
1132 | var MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech"); |
||
1133 | 3bde451b | semi | |
1134 | 80391351 | semi | ConvertPDF AddItem = new ConvertPDF(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE, x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME |
1135 | , x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER); |
||
1136 | 3bde451b | semi | |
1137 | 80391351 | semi | RealConvertSource.Add(AddItem); |
1138 | 3bde451b | semi | |
1139 | 80391351 | semi | if (RealConvertSource.Count() == 1) |
1140 | { |
||
1141 | ConvertShow = true; |
||
1142 | } |
||
1143 | 3bde451b | semi | } |
1144 | 8c7d1ea1 | alzkakdixm | } |
1145 | 3bde451b | semi | |
1146 | a6e5055d | alzkakdixm | } |
1147 | 80391351 | semi | |
1148 | 3bde451b | semi | } |
1149 | } |
||
1150 | |||
1151 | |||
1152 | 2f07b70a | semi | public int SetCleanUpItem(ConvertPDF _ConvertItem) |
1153 | 3bde451b | semi | { |
1154 | 30680747 | semi | using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString)) |
1155 | 3bde451b | semi | { |
1156 | int result = 0; |
||
1157 | |||
1158 | 30680747 | semi | var items = entities.SELECT_CONVERT_ITEM(_ConvertItem.ConvertID, null, null, null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null).ToList(); |
1159 | 3bde451b | semi | |
1160 | if (items.Count() > 0) |
||
1161 | { |
||
1162 | var item = items.First(); |
||
1163 | |||
1164 | var _RECONVERTER = item.RECONVERTER - _ConvertItem.ReConverter; |
||
1165 | var _CREATE_DATETIME = DateTime.Now; |
||
1166 | var _STATUS = (int)StatusCodeType.None; |
||
1167 | |||
1168 | e139272d | semi | entities.SELECT_RERECONVERT_ITEM(_ConvertItem.ConvertID, _RECONVERTER, _CREATE_DATETIME, _STATUS, null);//_END_DATETIME = null 에러 |
1169 | 3bde451b | semi | |
1170 | } |
||
1171 | |||
1172 | return result; |
||
1173 | } |
||
1174 | } |
||
1175 | |||
1176 | e6281033 | alzkakdixm | |
1177 | 2c634aed | semi | public static string CreateMarkusParam(string projectNo, string documentID, string userID) |
1178 | { |
||
1179 | ViewInfo viewInfo = new ViewInfo(); |
||
1180 | |||
1181 | viewInfo.DocumentItemID = documentID; |
||
1182 | viewInfo.ProjectNO = projectNo; |
||
1183 | viewInfo.UserID = userID; |
||
1184 | |||
1185 | return ParamEncoding(JsonConvert.SerializeObject(viewInfo)); |
||
1186 | |||
1187 | } |
||
1188 | |||
1189 | public static string ParamEncoding(string EncodingText, System.Text.Encoding oEncoding = null) |
||
1190 | { |
||
1191 | |||
1192 | if (oEncoding == null) |
||
1193 | oEncoding = System.Text.Encoding.UTF8; |
||
1194 | |||
1195 | return Convert.ToBase64String(oEncoding.GetBytes(EncodingText)); |
||
1196 | |||
1197 | } |
||
1198 | |||
1199 | e6281033 | alzkakdixm | |
1200 | 3bde451b | semi | #endregion |
1201 | |||
1202 | e6281033 | alzkakdixm | #region Validation |
1203 | a6e5055d | alzkakdixm | |
1204 | e6281033 | alzkakdixm | private void DataValidate(object obj) |
1205 | { |
||
1206 | 80391351 | semi | if (SelectFilterConvertList.Count() > 1) |
1207 | e6281033 | alzkakdixm | { |
1208 | 80391351 | semi | MessageBox.Show("하나만 클릭해 주세요"); |
1209 | e6281033 | alzkakdixm | } |
1210 | 80391351 | semi | else |
1211 | a6e5055d | alzkakdixm | { |
1212 | 80391351 | semi | bool result = false; |
1213 | WebRequest webRequest = WebRequest.Create(SelectFilterConvertList[0].OriginfilePath); |
||
1214 | webRequest.Timeout = 1200; // miliseconds |
||
1215 | webRequest.Method = "HEAD"; |
||
1216 | |||
1217 | HttpWebResponse response = null; |
||
1218 | |||
1219 | try |
||
1220 | a6e5055d | alzkakdixm | { |
1221 | 80391351 | semi | response = (HttpWebResponse)webRequest.GetResponse(); |
1222 | result = true; |
||
1223 | } |
||
1224 | catch (WebException webException) |
||
1225 | { |
||
1226 | MessageBox.Show(SelectFilterConvert.FileName + " doesn't exist: " + webException.Message); |
||
1227 | result = true; |
||
1228 | } |
||
1229 | finally |
||
1230 | { |
||
1231 | if (response != null) |
||
1232 | { |
||
1233 | response.Close(); |
||
1234 | } |
||
1235 | } |
||
1236 | if (result == true) |
||
1237 | { |
||
1238 | MessageBox.Show("File exists"); |
||
1239 | a6e5055d | alzkakdixm | } |
1240 | 2decfbdf | alzkakdixm | } |
1241 | 80391351 | semi | |
1242 | e6281033 | alzkakdixm | } |
1243 | |||
1244 | #endregion |
||
1245 | |||
1246 | b63dcfbb | semi | #region DataFilter |
1247 | |||
1248 | public void DataFilter(object obj) |
||
1249 | { |
||
1250 | dispatcherTimer.Tick -= new EventHandler(Timer_Tick); |
||
1251 | c7955b40 | semi | dispatcherTimer.Tick += new EventHandler(SearchTimer_Tick); |
1252 | b63dcfbb | semi | } |
1253 | |||
1254 | #endregion |
||
1255 | |||
1256 | e78f0871 | alzkakdixm | #region MarkusLink |
1257 | |||
1258 | 80391351 | semi | private void MarkusLink(object obj) |
1259 | e78f0871 | alzkakdixm | { |
1260 | 2f07b70a | semi | if (obj is ConvertPDF) |
1261 | e78f0871 | alzkakdixm | { |
1262 | 80391351 | semi | |
1263 | e78f0871 | alzkakdixm | if (obj != null) |
1264 | { |
||
1265 | 2f07b70a | semi | var convertitem = obj as ConvertPDF; |
1266 | e78f0871 | alzkakdixm | |
1267 | 80391351 | semi | SelectFilterConvertList[0] = convertitem; |
1268 | e78f0871 | alzkakdixm | |
1269 | SelectRealConvert = convertitem; |
||
1270 | |||
1271 | ProcessStartInfo startInfo = null; |
||
1272 | |||
1273 | startInfo = new ProcessStartInfo("iexplore.exe", convertitem.MarkusLink); |
||
1274 | |||
1275 | Process.Start(startInfo); |
||
1276 | } |
||
1277 | 80391351 | semi | |
1278 | e78f0871 | alzkakdixm | } |
1279 | } |
||
1280 | |||
1281 | #endregion |
||
1282 | |||
1283 | e6281033 | alzkakdixm | #region Data Delete |
1284 | |||
1285 | private void DataDelete(object obj) |
||
1286 | { |
||
1287 | 80391351 | semi | RadWindow.Alert("Do you want to delete it??", this.OnClosed); |
1288 | e6281033 | alzkakdixm | } |
1289 | |||
1290 | private void OnClosed(object sender, WindowClosedEventArgs e) |
||
1291 | { |
||
1292 | 30680747 | semi | using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString)) |
1293 | e6281033 | alzkakdixm | { |
1294 | 3bde451b | semi | var result = e.DialogResult; |
1295 | if (result == true) |
||
1296 | { |
||
1297 | 80391351 | semi | if (SelectFilterConvertList.Count() > 1) |
1298 | 3bde451b | semi | { |
1299 | 80391351 | semi | MessageBox.Show("하나만 클릭해 주세요!"); |
1300 | 3bde451b | semi | } |
1301 | 80391351 | semi | else |
1302 | 3bde451b | semi | { |
1303 | 80391351 | semi | if (SelectRealConvert != null) |
1304 | { |
||
1305 | entities.SELECT_CONVERT_DELETE(SelectRealConvert.ConvertID); |
||
1306 | } |
||
1307 | if (SelectFilterConvertList != null) |
||
1308 | { |
||
1309 | entities.SELECT_CONVERT_DELETE(SelectFilterConvertList[0].ConvertID); |
||
1310 | } |
||
1311 | 3bde451b | semi | } |
1312 | } |
||
1313 | e6281033 | alzkakdixm | } |
1314 | } |
||
1315 | |||
1316 | |||
1317 | #endregion |
||
1318 | |||
1319 | #region Data Export |
||
1320 | |||
1321 | |||
1322 | /// <summary> |
||
1323 | /// 필터된 상단 그리드 엑셀로 출력 |
||
1324 | /// </summary> |
||
1325 | |||
1326 | public void DataExportData(object obj) |
||
1327 | { |
||
1328 | SaveFileDialog saveFileDialog = new SaveFileDialog(); |
||
1329 | |||
1330 | saveFileDialog.FileName = "Document"; // Default file name |
||
1331 | saveFileDialog.DefaultExt = ".txt"; // Default file extension |
||
1332 | saveFileDialog.Filter = "Csv documents (.Csv)|*.csv|Excel(2017~2019)Worksheets|*.xlsx"; // Filter files by extension |
||
1333 | |||
1334 | |||
1335 | if (saveFileDialog.ShowDialog() == true) |
||
1336 | 2decfbdf | alzkakdixm | { |
1337 | e6281033 | alzkakdixm | |
1338 | |||
1339 | if (!string.IsNullOrWhiteSpace(saveFileDialog.FileName)) |
||
1340 | 0cb12397 | alzkakdixm | { |
1341 | e6281033 | alzkakdixm | |
1342 | var extension = new System.IO.FileInfo(saveFileDialog.FileName).Extension; |
||
1343 | |||
1344 | if (extension == ".xlsx" || extension == ".csv") |
||
1345 | { |
||
1346 | |||
1347 | var headers = new List<HeaderMember> |
||
1348 | { |
||
1349 | new HeaderMember{HeaderName = "ServiceID", Property = "ServiceID" }, |
||
1350 | new HeaderMember{HeaderName = "ConvertID", Property = "ConvertID" }, |
||
1351 | new HeaderMember{HeaderName = "ProjectNumber", Property = "ProjectNumber" }, |
||
1352 | new HeaderMember{HeaderName = "ConvertState", Property = "ConvertState" }, |
||
1353 | new HeaderMember{HeaderName = "CurrentPageNo", Property = "CurrentPageNo" }, |
||
1354 | new HeaderMember{HeaderName = "TotalPage", Property = "TotalPage" }, |
||
1355 | new HeaderMember{HeaderName = "OriginfilePath", Property = "OriginfilePath" }, |
||
1356 | new HeaderMember{HeaderName = "ConvertPath", Property = "ConvertPath" }, |
||
1357 | new HeaderMember{HeaderName = "CreateTime", Property = "CreateTime" }, |
||
1358 | new HeaderMember{HeaderName = "Exception", Property = "Exception" }, |
||
1359 | new HeaderMember{HeaderName = "ProcessorAffinity", Property = "ProcessorAffinity" }, |
||
1360 | new HeaderMember{HeaderName = "ReConverter", Property = "ReConverter" }, |
||
1361 | new HeaderMember{HeaderName = "UniqueKey", Property = "UniqueKey" } |
||
1362 | }; |
||
1363 | |||
1364 | |||
1365 | DataExport dataExport = new DataExport(); |
||
1366 | dataExport.DataExportExcel(saveFileDialog.FileName, "Hello world", FilterConvertSource, headers); |
||
1367 | } |
||
1368 | 0cb12397 | alzkakdixm | } |
1369 | 2decfbdf | alzkakdixm | } |
1370 | } |
||
1371 | e6281033 | alzkakdixm | |
1372 | #endregion |
||
1373 | |||
1374 | b63dcfbb | semi | #region Data Search |
1375 | 902f397c | semi | |
1376 | b63dcfbb | semi | public void RemoveCreateTimeFilter(object obj) |
1377 | { |
||
1378 | DefaultCreateTime = DateTime.Now; |
||
1379 | SelectedCreateTimeBegin = DefaultCreateTime; |
||
1380 | SelectedCreateTimeEnd = DefaultCreateTime; |
||
1381 | } |
||
1382 | |||
1383 | #endregion |
||
1384 | |||
1385 | #region Reset |
||
1386 | |||
1387 | /// <summary> |
||
1388 | /// 그리드 상단 원상복귀 버튼 |
||
1389 | /// 필터를 끝낸 후 다시 복귀 |
||
1390 | /// </summary> |
||
1391 | |||
1392 | public void Reset(object obj) |
||
1393 | 5a954acc | semi | { |
1394 | e139272d | semi | ProjectNumberFilter= null; |
1395 | 3bde451b | semi | UniqueKeyFilter = null; |
1396 | Service_IDFilter = null; |
||
1397 | Document_NameFilter = null; |
||
1398 | Docuemnt_NOFilter = null; |
||
1399 | ReconverterFilter = null; |
||
1400 | RevisionFilter = null; |
||
1401 | GroupNOFilter = null; |
||
1402 | 30680747 | semi | DOCUMENT_URLFilter = null; |
1403 | 3bde451b | semi | DefaultCreateTime = DateTime.Now; |
1404 | SelectedCreateTimeBegin = DefaultCreateTime; |
||
1405 | SelectedCreateTimeEnd = DefaultCreateTime; |
||
1406 | c7955b40 | semi | dispatcherTimer.Tick -= new EventHandler(SearchTimer_Tick); |
1407 | b63dcfbb | semi | dispatcherTimer.Tick += new EventHandler(Timer_Tick); |
1408 | e139272d | semi | ProjectNames.Clear(); |
1409 | using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString)) |
||
1410 | { |
||
1411 | foreach (var x in entities.SELECT_RUN_PROJECTS(0)) |
||
1412 | { |
||
1413 | ProjectName projectName = new ProjectName(x.PROJECT_NO, x.PROJECT_NAME); |
||
1414 | ProjectNames.Add(projectName); |
||
1415 | } |
||
1416 | } |
||
1417 | 5a954acc | semi | } |
1418 | |||
1419 | 902f397c | semi | #endregion |
1420 | |||
1421 | 8c128693 | semi | #region ConvertAddDialog |
1422 | 218e5002 | semi | |
1423 | /// <summary> |
||
1424 | /// 그리드 상단 Conver 추가 버튼 |
||
1425 | /// ProjectNo, DocumentURL, DocumentID, 입력해서 저장 프로시저에서 추가 |
||
1426 | /// </summary> |
||
1427 | |||
1428 | public void ConverAdd(object obj) |
||
1429 | { |
||
1430 | 8c128693 | semi | dispatcherTimer.Tick -= new EventHandler(Timer_Tick); |
1431 | 43b2e236 | semi | |
1432 | Views.ConvertAddDialog convertAddDialog = new Views.ConvertAddDialog(); |
||
1433 | 8c128693 | semi | |
1434 | 3bde451b | semi | convertAddDialog.WindowStartupLocation = WindowStartupLocation.CenterOwner; |
1435 | |||
1436 | 43b2e236 | semi | convertAddDialog.ShowDialog(); |
1437 | 218e5002 | semi | |
1438 | 8c128693 | semi | dispatcherTimer.Tick += new EventHandler(Timer_Tick); |
1439 | 218e5002 | semi | } |
1440 | |||
1441 | #endregion |
||
1442 | |||
1443 | 78683624 | semi | |
1444 | #region ConvertPathFileSearch |
||
1445 | |||
1446 | /// <summary> |
||
1447 | /// ConvertPath 파일 탐색기로 열리는 아이콘 |
||
1448 | /// </summary> |
||
1449 | |||
1450 | public void ConvertPathFileSearch(object obj) |
||
1451 | { |
||
1452 | 2f07b70a | semi | if (obj is ConvertPDF) |
1453 | 78683624 | semi | { |
1454 | if (obj != null) |
||
1455 | { |
||
1456 | 2f07b70a | semi | var convertitem = obj as ConvertPDF; |
1457 | 78683624 | semi | |
1458 | 2f07b70a | semi | string filePath = "@" + convertitem.ConvertPath; |
1459 | 78683624 | semi | |
1460 | c7955b40 | semi | System.Diagnostics.Process.Start("explorer.exe", filePath); |
1461 | 78683624 | semi | } |
1462 | } |
||
1463 | } |
||
1464 | |||
1465 | #endregion |
||
1466 | |||
1467 | e6281033 | alzkakdixm | #endregion |
1468 | a6e5055d | alzkakdixm | } |
1469 | } |