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