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