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