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