markus / KCOM / Common / ViewerDataModel.cs @ 5a65e058
이력 | 보기 | 이력해설 | 다운로드 (31.9 KB)
1 |
using KCOM.Events; |
---|---|
2 |
using KCOM.Messenger; |
3 |
using KCOMDataModel.DataModel; |
4 |
//using Leadtools; |
5 |
using MarkupToPDF.Common; |
6 |
using Newtonsoft.Json; |
7 |
using System; |
8 |
using System.Collections; |
9 |
using System.Collections.Generic; |
10 |
using System.Collections.ObjectModel; |
11 |
using System.ComponentModel; |
12 |
using System.IO; |
13 |
using System.Linq; |
14 |
using System.Text; |
15 |
using System.Threading.Tasks; |
16 |
using System.Windows; |
17 |
using System.Windows.Controls; |
18 |
using System.Windows.Ink; |
19 |
using System.Windows.Media; |
20 |
using System.Xml; |
21 |
using System.Xml.Serialization; |
22 |
//using IKCOM; |
23 |
|
24 |
namespace KCOM.Common |
25 |
{ |
26 |
public class ViewerDataModel : INotifyPropertyChanged |
27 |
{ |
28 |
#region Data Members |
29 |
|
30 |
private static ViewerDataModel instance = new ViewerDataModel(); |
31 |
|
32 |
//private ObservableCollection<CommentUserInfo> markupControls_Pre = new ObservableCollection<CommentUserInfo>(); |
33 |
|
34 |
private ObservableCollection<CommentUserInfo> markupControls = new ObservableCollection<CommentUserInfo>(); |
35 |
private ObservableCollection<CommentUserInfo> markupControls_Sync = new ObservableCollection<CommentUserInfo>(); |
36 |
private ObservableCollection<CommentUserInfo> markupControls_User = new ObservableCollection<CommentUserInfo>(); |
37 |
|
38 |
|
39 |
////강인구 추가 |
40 |
//private List<Check_Inferface> check_Item = new List<Check_Inferface>(); |
41 |
private ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> document_Info = new ObservableCollection<KCOMDataModel.DataModel.DOCPAGE>(); |
42 |
private ObservableCollection<Undo_data> undoDataList = new ObservableCollection<Undo_data>(); |
43 |
|
44 |
//public UndoDataList { get; set; } |
45 |
|
46 |
|
47 |
private ObservableCollection<IKCOM.MarkupInfoItem> markupInfoList = new ObservableCollection<IKCOM.MarkupInfoItem>(); |
48 |
private ObservableCollection<MarkupUserInfo> markupUserList = new ObservableCollection<MarkupUserInfo>(); |
49 |
|
50 |
private ObservableCollection<IKCOM.MarkupInfoItem> markupInfoRevList = new ObservableCollection<IKCOM.MarkupInfoItem>(); |
51 |
|
52 |
public List<FAVORITE_DOC> FavoriteSelctedSet = new List<FAVORITE_DOC>(); |
53 |
public List<FAVORITE_DOC> FavoriteSet = new List<FAVORITE_DOC>(); |
54 |
public List<KCOMDataModel.DataModel.DOCPAGE> RotationDocs = new List<KCOMDataModel.DataModel.DOCPAGE>(); |
55 |
//_markupInfoList |
56 |
|
57 |
private StrokeCollection markupPens = new StrokeCollection(); |
58 |
|
59 |
//private ObservableCollection<RectangleData> rectangles = new ObservableCollection<RectangleData>(); |
60 |
|
61 |
|
62 |
private double contentScale = 1; |
63 |
|
64 |
private double contentOffsetY = 0; |
65 |
|
66 |
private double contentOffsetX = 0; |
67 |
|
68 |
private double Sync_contentScale = 1; |
69 |
|
70 |
private double Sync_contentOffsetY = 0; |
71 |
|
72 |
private double Sync_contentOffsetX = 0; |
73 |
|
74 |
private double contentViewportHeight = 0; |
75 |
|
76 |
private double contentViewportWidth = 0; |
77 |
|
78 |
private double contentWidth = 0; |
79 |
|
80 |
private MessageCollection _k_talkMessageSet; |
81 |
|
82 |
private double contentHeight = 0; |
83 |
|
84 |
private double angle = 0; |
85 |
|
86 |
private double angleOffsetX = 0; |
87 |
|
88 |
private double angleOffsetY = 0; |
89 |
|
90 |
private ImageBrush backgroundImage; |
91 |
|
92 |
//private RasterImage _rasterimage; |
93 |
|
94 |
|
95 |
#endregion Data Members |
96 |
|
97 |
#region Property Member |
98 |
|
99 |
public bool IsWheelPageChanage = false; |
100 |
|
101 |
public static ViewerDataModel Instance |
102 |
{ |
103 |
get |
104 |
{ |
105 |
return instance; |
106 |
} |
107 |
} |
108 |
|
109 |
private bool isDownloadOriginal; |
110 |
public bool IsDownloadOriginal |
111 |
{ |
112 |
get => isDownloadOriginal; |
113 |
set |
114 |
{ |
115 |
if (isDownloadOriginal != value) |
116 |
{ |
117 |
isDownloadOriginal = value; |
118 |
OnPropertyChanged("IsDownloadOriginal"); |
119 |
} |
120 |
} |
121 |
} |
122 |
|
123 |
private bool isAdmin; |
124 |
public bool IsAdmin |
125 |
{ |
126 |
get => isAdmin; |
127 |
set |
128 |
{ |
129 |
isAdmin = value; |
130 |
OnPropertyChanged("IsAdmin"); |
131 |
} |
132 |
} |
133 |
|
134 |
private bool isDocumentHistory; |
135 |
public bool IsDocumentHistory |
136 |
{ |
137 |
get => isDocumentHistory; |
138 |
set |
139 |
{ |
140 |
isDocumentHistory = value; |
141 |
OnPropertyChanged("IsDocumentHistory"); |
142 |
} |
143 |
} |
144 |
|
145 |
private bool isDownloadCancel; |
146 |
public bool IsDownloadCancel |
147 |
{ |
148 |
get => isDownloadCancel; |
149 |
set |
150 |
{ |
151 |
if (isDownloadCancel != value) |
152 |
{ |
153 |
isDownloadCancel = value; |
154 |
OnPropertyChanged("IsDownloadCancel"); |
155 |
} |
156 |
} |
157 |
} |
158 |
|
159 |
private int downloadFileProgress; |
160 |
public int DownloadFileProgress |
161 |
{ |
162 |
get => downloadFileProgress; |
163 |
set |
164 |
{ |
165 |
if (downloadFileProgress != value) |
166 |
{ |
167 |
downloadFileProgress = value; |
168 |
OnPropertyChanged("DownloadFileProgress"); |
169 |
} |
170 |
} |
171 |
} |
172 |
|
173 |
private string originalTempFile; |
174 |
public string OriginalTempFile |
175 |
{ |
176 |
get => originalTempFile; |
177 |
set |
178 |
{ |
179 |
if (originalTempFile != value) |
180 |
{ |
181 |
originalTempFile = value; |
182 |
OnPropertyChanged("OriginalTempFile"); |
183 |
} |
184 |
} |
185 |
} |
186 |
|
187 |
private List<IKCOM.MarkupItemEx> _MarkupList_MY { get; set; } |
188 |
public List<IKCOM.MarkupItemEx> MarkupList_MY |
189 |
{ |
190 |
get |
191 |
{ |
192 |
if (_MarkupList_MY == null) |
193 |
{ |
194 |
_MarkupList_MY = new List<IKCOM.MarkupItemEx>(); |
195 |
} |
196 |
|
197 |
return _MarkupList_MY; |
198 |
} |
199 |
set |
200 |
{ |
201 |
|
202 |
_MarkupList_MY = value; |
203 |
OnPropertyChanged("MarkupList_MY"); |
204 |
} |
205 |
} |
206 |
|
207 |
private List<IKCOM.MarkupItemEx> _MarkupList_USER { get; set; } |
208 |
public List<IKCOM.MarkupItemEx> MyMarkupList |
209 |
{ |
210 |
get |
211 |
{ |
212 |
if (_MarkupList_USER == null) |
213 |
{ |
214 |
_MarkupList_USER = new List<IKCOM.MarkupItemEx>(); |
215 |
} |
216 |
|
217 |
return _MarkupList_USER; |
218 |
} |
219 |
set |
220 |
{ |
221 |
|
222 |
_MarkupList_USER = value; |
223 |
OnPropertyChanged("_MarkupList_USER"); |
224 |
} |
225 |
} |
226 |
|
227 |
private List<IKCOM.MarkupItemEx> _MarkupList_Pre { get; set; } |
228 |
public List<IKCOM.MarkupItemEx> MarkupList_Pre |
229 |
{ |
230 |
get |
231 |
{ |
232 |
if (_MarkupList_Pre == null) |
233 |
{ |
234 |
_MarkupList_Pre = new List<IKCOM.MarkupItemEx>(); |
235 |
} |
236 |
|
237 |
return _MarkupList_Pre; |
238 |
} |
239 |
set |
240 |
{ |
241 |
|
242 |
_MarkupList_Pre = value; |
243 |
OnPropertyChanged("MarkupList_Pre"); |
244 |
} |
245 |
|
246 |
} |
247 |
|
248 |
private System.IO.FileInfo _searchPDF { get; set; } |
249 |
public System.IO.FileInfo searchPDF |
250 |
{ |
251 |
get |
252 |
{ |
253 |
return _searchPDF; |
254 |
} |
255 |
set |
256 |
{ |
257 |
_searchPDF = value; |
258 |
OnPropertyChanged("searchPDF"); |
259 |
} |
260 |
} |
261 |
|
262 |
|
263 |
/// <summary> |
264 |
/// 현재 상단 메뉴에서 선택된 컨트롤 |
265 |
/// </summary> |
266 |
private string _SelectedControl { get; set; } |
267 |
public string SelectedControl |
268 |
{ |
269 |
get |
270 |
{ |
271 |
return _SelectedControl; |
272 |
} |
273 |
set |
274 |
{ |
275 |
_SelectedControl = value; |
276 |
OnPropertyChanged("SelectedControl"); |
277 |
} |
278 |
} |
279 |
|
280 |
|
281 |
/// <summary> |
282 |
/// 현재 상단 메뉴의 선 굵기값 |
283 |
/// </summary> |
284 |
private double _LineSize { get; set; } |
285 |
public double LineSize |
286 |
{ |
287 |
get |
288 |
{ |
289 |
return _LineSize; |
290 |
} |
291 |
set |
292 |
{ |
293 |
_LineSize = value; |
294 |
OnPropertyChanged("LineSize"); |
295 |
} |
296 |
} |
297 |
|
298 |
private double _Interval { get; set; } |
299 |
public double Interval |
300 |
{ |
301 |
get |
302 |
{ |
303 |
return _Interval; |
304 |
} |
305 |
set |
306 |
{ |
307 |
_Interval = value; |
308 |
OnPropertyChanged("Interval"); |
309 |
} |
310 |
} |
311 |
private double _SaveInterval { get; set; } |
312 |
public double SaveInterval |
313 |
{ |
314 |
get |
315 |
{ |
316 |
return _SaveInterval; |
317 |
} |
318 |
set |
319 |
{ |
320 |
_SaveInterval = value; |
321 |
OnPropertyChanged("SaveInterval"); |
322 |
} |
323 |
} |
324 |
private double _ArcLength { get; set; } |
325 |
public double ArcLength |
326 |
{ |
327 |
get |
328 |
{ |
329 |
return _ArcLength; |
330 |
} |
331 |
set |
332 |
{ |
333 |
_ArcLength = value; |
334 |
OnPropertyChanged("ArcLength"); |
335 |
} |
336 |
} |
337 |
|
338 |
public bool IsPressShift |
339 |
{ |
340 |
get |
341 |
{ |
342 |
return ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Shift) == System.Windows.Input.ModifierKeys.Shift); |
343 |
} |
344 |
} |
345 |
|
346 |
public bool IsPressCtrl |
347 |
{ |
348 |
get |
349 |
{ |
350 |
return ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Control) == System.Windows.Input.ModifierKeys.Control); |
351 |
} |
352 |
} |
353 |
|
354 |
/// <summary> |
355 |
/// Dash 사이즈 |
356 |
/// </summary> |
357 |
private DoubleCollection _DashSize { get; set; } |
358 |
public DoubleCollection DashSize |
359 |
{ |
360 |
get |
361 |
{ |
362 |
return _DashSize; |
363 |
} |
364 |
set |
365 |
{ |
366 |
_DashSize = value; |
367 |
OnPropertyChanged("DashSize"); |
368 |
} |
369 |
} |
370 |
|
371 |
private string _ControlTag { get; set; } |
372 |
public string ControlTag |
373 |
{ |
374 |
get |
375 |
{ |
376 |
return _ControlTag; |
377 |
} |
378 |
set |
379 |
{ |
380 |
_ControlTag = value; |
381 |
OnPropertyChanged("ControlTag"); |
382 |
} |
383 |
} |
384 |
|
385 |
private string _CheckStatus { get; set; } |
386 |
public string CheckStatus |
387 |
{ |
388 |
get |
389 |
{ |
390 |
return _CheckStatus; |
391 |
} |
392 |
set |
393 |
{ |
394 |
_CheckStatus = value; |
395 |
OnPropertyChanged("CheckStatus"); |
396 |
} |
397 |
} |
398 |
|
399 |
|
400 |
|
401 |
//private bool _IsPageChanged { get; set; } |
402 |
//public bool IsPageChanged |
403 |
//{ |
404 |
// get |
405 |
// { |
406 |
// return _IsPageChanged; |
407 |
// } |
408 |
// set |
409 |
// { |
410 |
// _IsPageChanged = value; |
411 |
// OnPropertyChanged("IsPageChanged"); |
412 |
// } |
413 |
//} |
414 |
|
415 |
|
416 |
|
417 |
///// <summary> |
418 |
///// 강인구 추가(Check List관련) |
419 |
///// </summary> |
420 |
//public List<Check_Inferface> Check_Item |
421 |
//{ |
422 |
// get |
423 |
// { |
424 |
// return check_Item; |
425 |
// } |
426 |
//} |
427 |
|
428 |
private bool _IsConsolidate { get; set; } |
429 |
public bool IsConsolidate |
430 |
{ |
431 |
get |
432 |
{ |
433 |
return _IsConsolidate; |
434 |
} |
435 |
set |
436 |
{ |
437 |
_IsConsolidate = value; |
438 |
OnPropertyChanged("IsConsolidate"); |
439 |
} |
440 |
} |
441 |
|
442 |
//////////////////////////////////////////////// |
443 |
|
444 |
|
445 |
#region Angle 관련 |
446 |
private Visibility _AngleVisibility { get; set; } |
447 |
public Visibility AngleVisibility |
448 |
{ |
449 |
get |
450 |
{ |
451 |
return _AngleVisibility; |
452 |
} |
453 |
set |
454 |
{ |
455 |
_AngleVisibility = value; |
456 |
OnPropertyChanged("AngleVisibility"); |
457 |
} |
458 |
|
459 |
} |
460 |
|
461 |
public double Angle |
462 |
{ |
463 |
get |
464 |
{ |
465 |
return angle; |
466 |
} |
467 |
set |
468 |
{ |
469 |
angle = value; |
470 |
OnPropertyChanged("Angle"); |
471 |
} |
472 |
} |
473 |
|
474 |
private string _HelperContent { get; set; } |
475 |
public string HelperContent |
476 |
{ |
477 |
get |
478 |
{ |
479 |
return _HelperContent; |
480 |
} |
481 |
set |
482 |
{ |
483 |
_HelperContent = value; |
484 |
OnPropertyChanged("HelperContent"); |
485 |
} |
486 |
} |
487 |
|
488 |
private string _HelperHeader { get; set; } |
489 |
public string HelperHeader |
490 |
{ |
491 |
get |
492 |
{ |
493 |
return _HelperHeader; |
494 |
} |
495 |
set |
496 |
{ |
497 |
_HelperHeader = value; |
498 |
OnPropertyChanged("HelperHeader"); |
499 |
} |
500 |
} |
501 |
|
502 |
private bool _HelperExit { get; set; } |
503 |
public bool HelperExit |
504 |
{ |
505 |
get |
506 |
{ |
507 |
return _HelperExit; |
508 |
} |
509 |
set |
510 |
{ |
511 |
_HelperExit = value; |
512 |
OnPropertyChanged("HelperExit"); |
513 |
} |
514 |
} |
515 |
|
516 |
#endregion |
517 |
|
518 |
public event EventHandler<EventArgs> PageLoaded; |
519 |
|
520 |
/// <summary> |
521 |
/// 페이지 변경 후 페이지에 해당하는 마크업을 모두 읽었을때 이벤트를 보내도록 한다. |
522 |
/// </summary> |
523 |
public void LoadPageMarkup() |
524 |
{ |
525 |
if(PageLoaded != null) |
526 |
{ |
527 |
PageLoaded(this, new EventArgs()); |
528 |
} |
529 |
} |
530 |
|
531 |
public void SetAngleVisible(Visibility visibility) |
532 |
{ |
533 |
this.AngleVisibility = visibility; |
534 |
} |
535 |
|
536 |
|
537 |
public ObservableCollection<CommentUserInfo> MarkupControls |
538 |
{ |
539 |
get |
540 |
{ |
541 |
return markupControls; |
542 |
} |
543 |
} |
544 |
|
545 |
public ObservableCollection<CommentUserInfo> MarkupControls_Sync |
546 |
{ |
547 |
get |
548 |
{ |
549 |
return markupControls_Sync; |
550 |
} |
551 |
} |
552 |
public int current_page_commentcnt = 0; |
553 |
public ObservableCollection<CommentUserInfo> MarkupControls_USER |
554 |
{ |
555 |
get |
556 |
{ |
557 |
return markupControls_User; |
558 |
} |
559 |
} |
560 |
|
561 |
public ObservableCollection<Undo_data> UndoDataList |
562 |
{ |
563 |
get |
564 |
{ |
565 |
return undoDataList; |
566 |
} |
567 |
} |
568 |
|
569 |
public StrokeCollection MarkupPens |
570 |
{ |
571 |
get |
572 |
{ |
573 |
return markupPens; |
574 |
} |
575 |
|
576 |
} |
577 |
|
578 |
#region 버튼 여부 |
579 |
|
580 |
/// <summary> |
581 |
/// 상단 Fill 버튼이 클릭 되어있는지 |
582 |
/// </summary> |
583 |
private bool _checkFillShape { get; set; } |
584 |
public bool checkFillShape |
585 |
{ |
586 |
get |
587 |
{ |
588 |
return _checkFillShape; |
589 |
} |
590 |
set |
591 |
{ |
592 |
_checkFillShape = value; |
593 |
OnPropertyChanged("checkFillShape"); |
594 |
} |
595 |
} |
596 |
|
597 |
/// <summary> |
598 |
/// 상단 Hatch 버튼이 클릭 되어있는지 |
599 |
/// </summary> |
600 |
private bool _checkHatchShape { get; set; } |
601 |
public bool checkHatchShape |
602 |
{ |
603 |
get |
604 |
{ |
605 |
return _checkHatchShape; |
606 |
} |
607 |
set |
608 |
{ |
609 |
_checkHatchShape = value; |
610 |
OnPropertyChanged("checkHatchShape"); |
611 |
} |
612 |
} |
613 |
|
614 |
private double _controlOpacity { get; set; } |
615 |
public double ControlOpacity |
616 |
{ |
617 |
get |
618 |
{ |
619 |
return _controlOpacity; |
620 |
} |
621 |
set |
622 |
{ |
623 |
|
624 |
_controlOpacity = value; |
625 |
OnPropertyChanged("ControlOpacity"); |
626 |
} |
627 |
} |
628 |
|
629 |
private MarkupToPDF.Controls.Common.PaintSet _paintSet { get; set; } |
630 |
public MarkupToPDF.Controls.Common.PaintSet paintSet |
631 |
{ |
632 |
get |
633 |
{ |
634 |
return _paintSet; |
635 |
} |
636 |
set |
637 |
{ |
638 |
_paintSet = value; |
639 |
OnPropertyChanged("paintSet"); |
640 |
} |
641 |
} |
642 |
|
643 |
/// <summary> |
644 |
/// 강인구 추가 |
645 |
/// 상단 TextStyle 버튼이 클릭 되어있는지 |
646 |
/// </summary> |
647 |
private bool _checkTextStyle { get; set; } |
648 |
public bool checkTextStyle |
649 |
{ |
650 |
get |
651 |
{ |
652 |
return _checkTextStyle; |
653 |
} |
654 |
set |
655 |
{ |
656 |
_checkTextStyle = value; |
657 |
OnPropertyChanged("checkTextStyle"); |
658 |
} |
659 |
} |
660 |
|
661 |
/// <summary> |
662 |
/// 강인구 추가 |
663 |
/// 상단 TextWeight 버튼이 클릭 되어있는지 |
664 |
/// </summary> |
665 |
private bool _checkTextWeight { get; set; } |
666 |
public bool checkTextWeight |
667 |
{ |
668 |
get |
669 |
{ |
670 |
return _checkTextWeight; |
671 |
} |
672 |
set |
673 |
{ |
674 |
_checkTextWeight = value; |
675 |
OnPropertyChanged("checkTextWeight"); |
676 |
} |
677 |
} |
678 |
|
679 |
/// <summary> |
680 |
/// 강인구 추가 |
681 |
/// 상단 UnderLine 버튼이 클릭 되어있는지 |
682 |
/// </summary> |
683 |
private bool _checkUnderLine { get; set; } |
684 |
public bool checkUnderLine |
685 |
{ |
686 |
get |
687 |
{ |
688 |
return _checkUnderLine; |
689 |
} |
690 |
set |
691 |
{ |
692 |
_checkUnderLine = value; |
693 |
OnPropertyChanged("checkUnderLine"); |
694 |
} |
695 |
} |
696 |
|
697 |
/// <summary> |
698 |
/// 상단 Hatch 버튼이 클릭 되어있는지 |
699 |
/// </summary> |
700 |
private bool _checkHighShape { get; set; } |
701 |
public bool checkHighShape |
702 |
{ |
703 |
get |
704 |
{ |
705 |
return _checkHighShape; |
706 |
} |
707 |
set |
708 |
{ |
709 |
_checkHighShape = value; |
710 |
OnPropertyChanged("checkHighShape"); |
711 |
} |
712 |
} |
713 |
|
714 |
/// <summary> |
715 |
/// 상단 Axis 버튼이 클릭 되어있는지 |
716 |
/// </summary> |
717 |
private bool _IsAxisLock { get; set; } |
718 |
public bool IsAxisLock |
719 |
{ |
720 |
get |
721 |
{ |
722 |
return _IsAxisLock; |
723 |
} |
724 |
set |
725 |
{ |
726 |
_IsAxisLock = value; |
727 |
OnPropertyChanged("IsAxisLock"); |
728 |
} |
729 |
} |
730 |
|
731 |
/// <summary> |
732 |
/// 상단 Highlight 버튼이 클릭 되어있는지 |
733 |
/// </summary> |
734 |
private bool _checkHighlight { get; set; } |
735 |
public bool checkHighlight |
736 |
{ |
737 |
get |
738 |
{ |
739 |
return _checkHighlight; |
740 |
} |
741 |
set |
742 |
{ |
743 |
_checkHighlight = value; |
744 |
OnPropertyChanged("checkHighlight"); |
745 |
} |
746 |
} |
747 |
|
748 |
/// <summary> |
749 |
/// 강인구 추가 |
750 |
/// 상단 TextWeight 버튼이 클릭 되어있는지 |
751 |
/// </summary> |
752 |
private double _TextSize { get; set; } |
753 |
public double TextSize |
754 |
{ |
755 |
get |
756 |
{ |
757 |
return _TextSize; |
758 |
} |
759 |
set |
760 |
{ |
761 |
_TextSize = value; |
762 |
OnPropertyChanged("TextSize"); |
763 |
} |
764 |
} |
765 |
#endregion |
766 |
|
767 |
public ImageBrush BackgroundImage |
768 |
{ |
769 |
get |
770 |
{ |
771 |
return backgroundImage; |
772 |
} |
773 |
set |
774 |
{ |
775 |
backgroundImage = value; |
776 |
OnPropertyChanged("BackgroundImage"); |
777 |
} |
778 |
} |
779 |
|
780 |
public ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> Document_Info |
781 |
{ |
782 |
get |
783 |
{ |
784 |
return document_Info; |
785 |
} |
786 |
} |
787 |
|
788 |
public double ContentScale |
789 |
{ |
790 |
get |
791 |
{ |
792 |
return contentScale; |
793 |
} |
794 |
set |
795 |
{ |
796 |
contentScale = value; |
797 |
|
798 |
double minOffsetX = 0.0; |
799 |
double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth); |
800 |
contentOffsetX = Math.Min(Math.Max(contentOffsetX, minOffsetX), maxOffsetX); |
801 |
|
802 |
double minOffsetY = 0.0; |
803 |
double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight); |
804 |
contentOffsetY = Math.Min(Math.Max(contentOffsetY, minOffsetY), maxOffsetY); |
805 |
|
806 |
OnPropertyChanged("ContentScale"); |
807 |
} |
808 |
} |
809 |
|
810 |
public double Sync_ContentScale |
811 |
{ |
812 |
get |
813 |
{ |
814 |
return Sync_contentScale; |
815 |
} |
816 |
set |
817 |
{ |
818 |
Sync_contentScale = value; |
819 |
OnPropertyChanged("Sync_ContentScale"); |
820 |
} |
821 |
} |
822 |
|
823 |
public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoList |
824 |
{ |
825 |
get |
826 |
{ |
827 |
return markupInfoList; |
828 |
} |
829 |
set |
830 |
{ |
831 |
markupInfoList = value; |
832 |
OnPropertyChanged("_markupInfoList"); |
833 |
} |
834 |
} |
835 |
|
836 |
public ObservableCollection<MarkupUserInfo> _markupUserList |
837 |
{ |
838 |
get |
839 |
{ |
840 |
return markupUserList; |
841 |
} |
842 |
set |
843 |
{ |
844 |
markupUserList = value; |
845 |
OnPropertyChanged("_markupUserList"); |
846 |
} |
847 |
} |
848 |
|
849 |
public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoRevList |
850 |
{ |
851 |
get |
852 |
{ |
853 |
return markupInfoRevList; |
854 |
} |
855 |
set |
856 |
{ |
857 |
markupInfoRevList = value; |
858 |
OnPropertyChanged("_markupInfoRevList"); |
859 |
} |
860 |
} |
861 |
|
862 |
public double ContentOffsetX |
863 |
{ |
864 |
get |
865 |
{ |
866 |
return contentOffsetX; |
867 |
} |
868 |
set |
869 |
{ |
870 |
double minOffsetX = 0.0; |
871 |
double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth); |
872 |
contentOffsetX = Math.Min(Math.Max(value, minOffsetX), maxOffsetX); |
873 |
OnPropertyChanged("ContentOffsetX"); |
874 |
} |
875 |
} |
876 |
|
877 |
public double ContentOffsetY |
878 |
{ |
879 |
get |
880 |
{ |
881 |
return contentOffsetY; |
882 |
} |
883 |
set |
884 |
{ |
885 |
double minOffsetY = 0.0; |
886 |
double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight); |
887 |
contentOffsetY = Math.Min(Math.Max(value, minOffsetY), maxOffsetY); |
888 |
OnPropertyChanged("ContentOffsetY"); |
889 |
} |
890 |
} |
891 |
|
892 |
public double Sync_ContentOffsetX |
893 |
{ |
894 |
get |
895 |
{ |
896 |
return Sync_contentOffsetX; |
897 |
} |
898 |
set |
899 |
{ |
900 |
Sync_contentOffsetX = value; |
901 |
OnPropertyChanged("Sync_ContentOffsetX"); |
902 |
} |
903 |
} |
904 |
|
905 |
public double Sync_ContentOffsetY |
906 |
{ |
907 |
get |
908 |
{ |
909 |
return Sync_contentOffsetY; |
910 |
} |
911 |
set |
912 |
{ |
913 |
Sync_contentOffsetY = value; |
914 |
OnPropertyChanged("Sync_ContentOffsetY"); |
915 |
} |
916 |
} |
917 |
|
918 |
public MessageCollection k_talkMessageSet |
919 |
{ |
920 |
get |
921 |
{ |
922 |
if (_k_talkMessageSet == null) |
923 |
{ |
924 |
_k_talkMessageSet = new MessageCollection(); |
925 |
} |
926 |
return _k_talkMessageSet; |
927 |
} |
928 |
set |
929 |
{ |
930 |
_k_talkMessageSet = value; |
931 |
OnPropertyChanged("k_talkMessageSet"); |
932 |
} |
933 |
} |
934 |
|
935 |
public double ContentWidth |
936 |
{ |
937 |
get |
938 |
{ |
939 |
return contentWidth; |
940 |
} |
941 |
set |
942 |
{ |
943 |
contentWidth = value; |
944 |
OnPropertyChanged("ContentWidth"); |
945 |
} |
946 |
} |
947 |
|
948 |
public double ContentHeight |
949 |
{ |
950 |
get |
951 |
{ |
952 |
return contentHeight; |
953 |
} |
954 |
set |
955 |
{ |
956 |
contentHeight = value; |
957 |
OnPropertyChanged("ContentHeight"); |
958 |
} |
959 |
} |
960 |
|
961 |
public double ContentViewportWidth |
962 |
{ |
963 |
get |
964 |
{ |
965 |
return contentViewportWidth; |
966 |
} |
967 |
set |
968 |
{ |
969 |
contentViewportWidth = value; |
970 |
OnPropertyChanged("ContentViewportWidth"); |
971 |
} |
972 |
} |
973 |
|
974 |
public double ContentViewportHeight |
975 |
{ |
976 |
get |
977 |
{ |
978 |
return contentViewportHeight; |
979 |
} |
980 |
set |
981 |
{ |
982 |
contentViewportHeight = value; |
983 |
OnPropertyChanged("ContentViewportHeight"); |
984 |
} |
985 |
} |
986 |
|
987 |
public MainWindow SystemMain { get; set; } |
988 |
|
989 |
private bool _PageBalanceMode { get; set; } |
990 |
public bool PageBalanceMode |
991 |
{ |
992 |
get |
993 |
{ |
994 |
return _PageBalanceMode; |
995 |
} |
996 |
set |
997 |
{ |
998 |
_PageBalanceMode = value; |
999 |
OnPropertyChanged("PageBalanceMode"); |
1000 |
} |
1001 |
} |
1002 |
|
1003 |
private int _PageBalanceNumber { get; set; } |
1004 |
public int PageBalanceNumber |
1005 |
{ |
1006 |
get |
1007 |
{ |
1008 |
return _PageBalanceNumber; |
1009 |
} |
1010 |
set |
1011 |
{ |
1012 |
_PageBalanceNumber = value; |
1013 |
OnPropertyChanged("PageBalanceNumber"); |
1014 |
} |
1015 |
} |
1016 |
|
1017 |
private int _PageNumber { get; set; } |
1018 |
public int PageNumber |
1019 |
{ |
1020 |
get |
1021 |
{ |
1022 |
return _PageNumber; |
1023 |
} |
1024 |
set |
1025 |
{ |
1026 |
_PageNumber = value; |
1027 |
OnPropertyChanged("PageNumber"); |
1028 |
} |
1029 |
} |
1030 |
|
1031 |
public double AngleOffsetX |
1032 |
{ |
1033 |
get |
1034 |
{ |
1035 |
return angleOffsetX; |
1036 |
} |
1037 |
set |
1038 |
{ |
1039 |
angleOffsetX = value; |
1040 |
OnPropertyChanged("AngleOffsetX"); |
1041 |
} |
1042 |
} |
1043 |
|
1044 |
public double AngleOffsetY |
1045 |
{ |
1046 |
get |
1047 |
{ |
1048 |
return angleOffsetY; |
1049 |
} |
1050 |
set |
1051 |
{ |
1052 |
angleOffsetY = value; |
1053 |
OnPropertyChanged("AngleOffsetY"); |
1054 |
} |
1055 |
} |
1056 |
|
1057 |
//강인구 추가(체크리스트) |
1058 |
private string _CheckList_ID { get; set; } |
1059 |
public string CheckList_ID |
1060 |
{ |
1061 |
get |
1062 |
{ |
1063 |
return _CheckList_ID; |
1064 |
} |
1065 |
set |
1066 |
{ |
1067 |
_CheckList_ID = value; |
1068 |
OnPropertyChanged("CheckList_ID"); |
1069 |
} |
1070 |
} |
1071 |
//강인구 추가(캡쳐 모드) |
1072 |
private double _Capture_Opacity { get; set; } |
1073 |
public double Capture_Opacity |
1074 |
{ |
1075 |
get |
1076 |
{ |
1077 |
return _Capture_Opacity; |
1078 |
} |
1079 |
set |
1080 |
{ |
1081 |
_Capture_Opacity = value; |
1082 |
OnPropertyChanged("Capture_Opacity"); |
1083 |
} |
1084 |
} |
1085 |
|
1086 |
private Visibility _ViewVisible { get; set; } |
1087 |
public Visibility ViewVisible |
1088 |
{ |
1089 |
get |
1090 |
{ |
1091 |
return _ViewVisible; |
1092 |
} |
1093 |
set |
1094 |
{ |
1095 |
_ViewVisible = value; |
1096 |
OnPropertyChanged("ViewVisible"); |
1097 |
} |
1098 |
} |
1099 |
|
1100 |
private bool _IsSync { get; set; } |
1101 |
public bool IsSync |
1102 |
{ |
1103 |
get |
1104 |
{ |
1105 |
return _IsSync; |
1106 |
} |
1107 |
set |
1108 |
{ |
1109 |
_IsSync = value; |
1110 |
OnPropertyChanged("IsSync"); |
1111 |
} |
1112 |
} |
1113 |
|
1114 |
private System.Windows.Media.Imaging.BitmapFrame _ImageViewPath; |
1115 |
public System.Windows.Media.Imaging.BitmapFrame ImageViewPath |
1116 |
{ |
1117 |
get |
1118 |
{ |
1119 |
return _ImageViewPath; |
1120 |
} |
1121 |
set |
1122 |
{ |
1123 |
_ImageViewPath = value; |
1124 |
OnPropertyChanged("ImageViewPath"); |
1125 |
} |
1126 |
} |
1127 |
private double _ImageViewWidth { get; set; } |
1128 |
public double ImageViewWidth |
1129 |
{ |
1130 |
get |
1131 |
{ |
1132 |
return _ImageViewWidth; |
1133 |
} |
1134 |
set |
1135 |
{ |
1136 |
_ImageViewWidth = value; |
1137 |
OnPropertyChanged("ImageViewWidth"); |
1138 |
} |
1139 |
} |
1140 |
private double _ImageViewHeight { get; set; } |
1141 |
public double ImageViewHeight |
1142 |
{ |
1143 |
get |
1144 |
{ |
1145 |
return _ImageViewHeight; |
1146 |
} |
1147 |
set |
1148 |
{ |
1149 |
_ImageViewHeight = value; |
1150 |
OnPropertyChanged("ImageViewHeight"); |
1151 |
} |
1152 |
} |
1153 |
|
1154 |
private System.Windows.Media.Imaging.BitmapImage _ImageViewPath_C; |
1155 |
public System.Windows.Media.Imaging.BitmapImage ImageViewPath_C |
1156 |
{ |
1157 |
get |
1158 |
{ |
1159 |
return _ImageViewPath_C; |
1160 |
} |
1161 |
set |
1162 |
{ |
1163 |
_ImageViewPath_C = value; |
1164 |
OnPropertyChanged("ImageViewPath_C"); |
1165 |
} |
1166 |
} |
1167 |
private double _ImageViewWidth_C { get; set; } |
1168 |
public double ImageViewWidth_C |
1169 |
{ |
1170 |
get |
1171 |
{ |
1172 |
return _ImageViewWidth_C; |
1173 |
} |
1174 |
set |
1175 |
{ |
1176 |
_ImageViewWidth_C = value; |
1177 |
OnPropertyChanged("ImageViewWidth_C"); |
1178 |
} |
1179 |
} |
1180 |
private double _ImageViewHeight_C { get; set; } |
1181 |
public double ImageViewHeight_C |
1182 |
{ |
1183 |
get |
1184 |
{ |
1185 |
return _ImageViewHeight_C; |
1186 |
} |
1187 |
set |
1188 |
{ |
1189 |
_ImageViewHeight_C = value; |
1190 |
OnPropertyChanged("ImageViewHeight_C"); |
1191 |
} |
1192 |
} |
1193 |
|
1194 |
|
1195 |
#endregion Property Member |
1196 |
|
1197 |
public System.IO.Stream GetStreamFromUrl(string url) |
1198 |
{ |
1199 |
byte[] imageData = null; |
1200 |
|
1201 |
using (var wc = new System.Net.WebClient()) |
1202 |
imageData = wc.DownloadData(url); |
1203 |
|
1204 |
return new System.IO.MemoryStream(imageData); |
1205 |
} |
1206 |
|
1207 |
public ViewerDataModel() |
1208 |
{ |
1209 |
//rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue)); |
1210 |
//rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green)); |
1211 |
//rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple)); |
1212 |
//rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red)); |
1213 |
|
1214 |
//RectangleControl rect1 = new RectangleControl(); |
1215 |
//rect1.StartPoint = new Point(50, 50); |
1216 |
//rect1.LeftBottomPoint = new Point(100, 50); |
1217 |
//rect1.TopRightPoint = new Point(50, 100); |
1218 |
//rect1.EndPoint = new Point(100, 100); |
1219 |
//rect1.FillColor = new SolidColorBrush(Colors.Red); |
1220 |
//rectangles.Add(rect1); |
1221 |
// |
1222 |
// Populate the data model with some example data. |
1223 |
// |
1224 |
//rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue)); |
1225 |
//rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green)); |
1226 |
//rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple)); |
1227 |
//rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red)); |
1228 |
|
1229 |
this.ControlOpacity = 1; |
1230 |
|
1231 |
/* Default |
1232 |
LineSize = 3, TextSize = 30, Interval = 10, ArcLength = 10, SaveInterval = 5 |
1233 |
*/ |
1234 |
this.LineSize = KCOM.Properties.Settings.Default.LineSize; |
1235 |
|
1236 |
this.TextSize = KCOM.Properties.Settings.Default.TextSize; |
1237 |
|
1238 |
this.Interval = KCOM.Properties.Settings.Default.Interval; |
1239 |
|
1240 |
this.ArcLength = KCOM.Properties.Settings.Default.ArcLength; |
1241 |
|
1242 |
this.DashSize = new DoubleCollection(); |
1243 |
|
1244 |
this.SaveInterval = KCOM.Properties.Settings.Default.SaveInterval; |
1245 |
this.AngleVisibility = Visibility.Collapsed; |
1246 |
} |
1247 |
|
1248 |
|
1249 |
public List<IKCOM.MarkupInfoItem> SelectedmarkupInfoItems { get; set; } |
1250 |
|
1251 |
#region INotifyPropertyChanged Event |
1252 |
|
1253 |
private void OnPropertyChanged(string name) |
1254 |
{ |
1255 |
if (PropertyChanged != null) |
1256 |
{ |
1257 |
PropertyChanged(this, new PropertyChangedEventArgs(name)); |
1258 |
} |
1259 |
} |
1260 |
|
1261 |
public event PropertyChangedEventHandler PropertyChanged; |
1262 |
|
1263 |
#endregion |
1264 |
} |
1265 |
} |