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