프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / KCOM / Common / ViewerDataModel.cs @ 9f473fb7

이력 | 보기 | 이력해설 | 다운로드 (26.6 KB)

1
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
        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
        private double _ArcLength { get; set; }
203
        public double ArcLength
204
        {
205
            get
206
            {
207
                return _ArcLength;
208
            }
209
            set
210
            {
211
                _ArcLength = value;
212
                OnPropertyChanged("ArcLength");
213
            }
214
        }
215

    
216
        private bool _IsPressShift { get; set; }
217
        public bool IsPressShift
218
        {
219
            get
220
            {
221
                return _IsPressShift;
222
            }
223
            set
224
            {
225
                _IsPressShift = value;
226
                OnPropertyChanged("IsPressShift");
227
            }
228
        }
229

    
230
        //강인구 추가
231
        private bool _IsPressCtrl { get; set; }
232
        public bool IsPressCtrl
233
        {
234
            get
235
            {
236
                return _IsPressCtrl;
237
            }
238
            set
239
            {
240
                _IsPressCtrl = value;
241
                OnPropertyChanged("IsPressCtrl");
242
            }
243
        }
244

    
245
        /// <summary>
246
        /// Dash 사이즈 
247
        /// </summary>
248
        private DoubleCollection _DashSize { get; set; }
249
        public DoubleCollection DashSize
250
        {
251
            get
252
            {
253
                return _DashSize;
254
            }
255
            set
256
            {
257
                _DashSize = value;
258
                OnPropertyChanged("DashSize");
259
            }
260
        }
261

    
262
        private string _ControlTag { get; set; }
263
        public string ControlTag
264
        {
265
            get
266
            {
267
                return _ControlTag;
268
            }
269
            set
270
            {
271
                _ControlTag = value;
272
                OnPropertyChanged("ControlTag");
273
            }
274
        }
275

    
276
        //private bool _IsPageChanged { get; set; }
277
        //public bool IsPageChanged
278
        //{
279
        //    get
280
        //    {
281
        //        return _IsPageChanged;
282
        //    }
283
        //    set
284
        //    {
285
        //        _IsPageChanged = value;
286
        //        OnPropertyChanged("IsPageChanged");
287
        //    }
288
        //}
289

    
290

    
291

    
292
        ///// <summary>
293
        ///// 강인구 추가(Check List관련)
294
        ///// </summary>
295
        //public List<Check_Inferface> Check_Item
296
        //{
297
        //    get
298
        //    {
299
        //        return check_Item;
300
        //    }
301
        //}
302

    
303
        private bool _IsConsolidate { get; set; }
304
        public bool IsConsolidate
305
        {
306
            get
307
            {
308
                return _IsConsolidate;
309
            }
310
            set
311
            {
312
                _IsConsolidate = value;
313
                OnPropertyChanged("IsConsolidate");
314
            }
315
        }
316

    
317
        ////////////////////////////////////////////////
318

    
319

    
320
        #region Angle 관련
321
        private Visibility _AngleVisibility { get; set; }
322
        public Visibility AngleVisibility
323
        {
324
            get
325
            {
326
                return _AngleVisibility;
327
            }
328
            set
329
            {
330
                _AngleVisibility = value;
331
                OnPropertyChanged("AngleVisibility");
332
            }
333

    
334
        }
335
        private string _AngleValue { get; set; }
336
        public string AngleValue
337
        {
338
            get
339
            {
340
                return _AngleValue;
341
            }
342
            set
343
            {
344
                _AngleValue = value;
345
                OnPropertyChanged("AngleValue");
346
            }
347
        }
348

    
349
        private string _HelperContent { get; set; }
350
        public string HelperContent
351
        {
352
            get
353
            {
354
                return _HelperContent;
355
            }
356
            set
357
            {
358
                _HelperContent = value;
359
                OnPropertyChanged("HelperContent");
360
            }
361
        }
362

    
363
        private string _HelperHeader { get; set; }
364
        public string HelperHeader
365
        {
366
            get
367
            {
368
                return _HelperHeader;
369
            }
370
            set
371
            {
372
                _HelperHeader = value;
373
                OnPropertyChanged("HelperHeader");
374
            }
375
        }
376

    
377
        private bool _HelperExit { get; set; }
378
        public bool HelperExit
379
        {
380
            get
381
            {
382
                return _HelperExit;
383
            }
384
            set
385
            {
386
                _HelperExit = value;
387
                OnPropertyChanged("HelperExit");
388
            }
389
        }
390

    
391
        #endregion
392

    
393
        public ObservableCollection<CommentUserInfo> MarkupControls
394
        {
395
            get
396
            {
397
                return markupControls;
398
            }
399
        }
400

    
401
        public ObservableCollection<CommentUserInfo> MarkupControls_Sync
402
        {
403
            get
404
            {
405
                return markupControls_Sync;
406
            }
407
        }
408

    
409
        public ObservableCollection<CommentUserInfo> MarkupControls_USER
410
        {
411
            get
412
            {
413
                return markupControls_User;
414
            }
415
        }
416

    
417
        public ObservableCollection<Undo_data> UndoDataList
418
        {
419
            get
420
            {
421
                return undoDataList;
422
            }
423
        }
424

    
425
        public StrokeCollection MarkupPens
426
        {
427
            get
428
            {
429
                return markupPens;
430
            }
431

    
432
        }
433

    
434
        #region 버튼 여부
435

    
436
        /// <summary>
437
        /// 상단 Fill 버튼이 클릭 되어있는지
438
        /// </summary>
439
        private bool _checkFillShape { get; set; }
440
        public bool checkFillShape
441
        {
442
            get
443
            {
444
                return _checkFillShape;
445
            }
446
            set
447
            {
448
                _checkFillShape = value;
449
                OnPropertyChanged("checkFillShape");
450
            }
451
        }
452

    
453
        /// <summary>
454
        /// 상단 Hatch 버튼이 클릭 되어있는지
455
        /// </summary>
456
        private bool _checkHatchShape { get; set; }
457
        public bool checkHatchShape
458
        {
459
            get
460
            {
461
                return _checkHatchShape;
462
            }
463
            set
464
            {
465
                _checkHatchShape = value;
466
                OnPropertyChanged("checkHatchShape");
467
            }
468
        }
469

    
470
        private double _controlOpacity { get; set; }
471
        public double ControlOpacity
472
        {
473
            get
474
            {
475
                return _controlOpacity;
476
            }
477
            set
478
            {
479
               
480
                _controlOpacity = value;               
481
                OnPropertyChanged("ControlOpacity");
482
            }
483
        }
484

    
485
        private MarkupToPDF.Controls.Common.PaintSet _paintSet { get; set; }
486
        public MarkupToPDF.Controls.Common.PaintSet paintSet
487
        {
488
            get
489
            {
490
                return _paintSet;
491
            }
492
            set
493
            {
494
                _paintSet = value;
495
                OnPropertyChanged("paintSet");
496
            }
497
        }
498

    
499
        /// <summary>
500
        /// 강인구 추가
501
        /// 상단 TextStyle 버튼이 클릭 되어있는지
502
        /// </summary>
503
        private bool _checkTextStyle { get; set; }
504
        public bool checkTextStyle
505
        {
506
            get
507
            {
508
                return _checkTextStyle;
509
            }
510
            set
511
            {
512
                _checkTextStyle = value;
513
                OnPropertyChanged("checkTextStyle");
514
            }
515
        }
516

    
517
        /// <summary>
518
        /// 강인구 추가
519
        /// 상단 TextWeight 버튼이 클릭 되어있는지
520
        /// </summary>
521
        private bool _checkTextWeight { get; set; }
522
        public bool checkTextWeight
523
        {
524
            get
525
            {
526
                return _checkTextWeight;
527
            }
528
            set
529
            {
530
                _checkTextWeight = value;
531
                OnPropertyChanged("checkTextWeight");
532
            }
533
        }
534

    
535
        /// <summary>
536
        /// 강인구 추가
537
        /// 상단 UnderLine 버튼이 클릭 되어있는지
538
        /// </summary>
539
        private bool _checkUnderLine { get; set; }
540
        public bool checkUnderLine
541
        {
542
            get
543
            {
544
                return _checkUnderLine;
545
            }
546
            set
547
            {
548
                _checkUnderLine = value;
549
                OnPropertyChanged("checkUnderLine");
550
            }
551
        }
552

    
553
        /// <summary>
554
        /// 상단 Hatch 버튼이 클릭 되어있는지
555
        /// </summary>
556
        private bool _checkHighShape { get; set; }
557
        public bool checkHighShape
558
        {
559
            get
560
            {
561
                return _checkHighShape;
562
            }
563
            set
564
            {
565
                _checkHighShape = value;
566
                OnPropertyChanged("checkHighShape");
567
            }
568
        }
569

    
570
        /// <summary>
571
        /// 상단 Axis 버튼이 클릭 되어있는지
572
        /// </summary>
573
        private bool _checkAxis { get; set; }
574
        public bool checkAxis
575
        {
576
            get
577
            {
578
                return _checkAxis;
579
            }
580
            set
581
            {
582
                _checkAxis = value;
583
                OnPropertyChanged("checkAxis");
584
            }
585
        }
586

    
587
        /// <summary>
588
        /// 상단 Highlight 버튼이 클릭 되어있는지
589
        /// </summary>
590
        private bool _checkHighlight { get; set; }
591
        public bool checkHighlight
592
        {
593
            get
594
            {
595
                return _checkHighlight;
596
            }
597
            set
598
            {
599
                _checkHighlight = value;
600
                OnPropertyChanged("checkHighlight");
601
            }
602
        }
603

    
604
        /// <summary>
605
        /// 강인구 추가
606
        /// 상단 TextWeight 버튼이 클릭 되어있는지
607
        /// </summary>
608
        private double _TextSize { get; set; }
609
        public double TextSize
610
        {
611
            get
612
            {
613
                return _TextSize;
614
            }
615
            set
616
            {
617
                _TextSize = value;
618
                OnPropertyChanged("TextSize");
619
            }
620
        }
621
        #endregion
622

    
623
        public ImageBrush BackgroundImage
624
        {
625
            get
626
            {
627
                return backgroundImage;
628
            }
629
            set
630
            {
631
                backgroundImage = value;
632
                OnPropertyChanged("BackgroundImage");
633
            }
634
        }
635

    
636
        public ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> Document_Info
637
        {
638
            get
639
            {
640
                return document_Info;
641
            }
642
        }
643

    
644
        public double ContentScale
645
        {
646
            get
647
            {
648
                return contentScale;
649
            }
650
            set
651
            {
652
                contentScale = value;
653

    
654
                double minOffsetX = 0.0;
655
                double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
656
                contentOffsetX = Math.Min(Math.Max(contentOffsetX, minOffsetX), maxOffsetX);
657

    
658
                double minOffsetY = 0.0;
659
                double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
660
                contentOffsetY = Math.Min(Math.Max(contentOffsetY, minOffsetY), maxOffsetY);
661

    
662
                OnPropertyChanged("ContentScale");
663
            }
664
        }
665

    
666
        public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoList
667
        {
668
            get
669
            {
670
                return markupInfoList;
671
            }
672
            set
673
            {
674
                markupInfoList = value;
675
                OnPropertyChanged("_markupInfoList");
676
            }
677
        }
678

    
679
        public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoRevList
680
        {
681
            get
682
            {
683
                return markupInfoRevList;
684
            }
685
            set
686
            {
687
                markupInfoRevList = value;
688
                OnPropertyChanged("_markupInfoRevList");
689
            }
690
        }
691

    
692
        public double ContentOffsetX
693
        {
694
            get
695
            {
696
                return contentOffsetX;
697
            }
698
            set
699
            {
700
                double minOffsetX = 0.0;
701
                double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
702
                contentOffsetX = Math.Min(Math.Max(value, minOffsetX), maxOffsetX);
703
                OnPropertyChanged("ContentOffsetX");
704
            }
705
        }
706

    
707
        public double ContentOffsetY
708
        {
709
            get
710
            {
711
                return contentOffsetY;
712
            }
713
            set
714
            {
715
                double minOffsetY = 0.0;
716
                double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
717
                contentOffsetY = Math.Min(Math.Max(value, minOffsetY), maxOffsetY);
718
                OnPropertyChanged("ContentOffsetY");
719
            }
720
        }
721

    
722
        public MessageCollection k_talkMessageSet
723
        {
724
            get
725
            {
726
                if (_k_talkMessageSet ==null)
727
                {
728
                    _k_talkMessageSet = new MessageCollection();
729
                }
730
                return _k_talkMessageSet;
731
            }
732
            set
733
            {
734
                _k_talkMessageSet = value;
735
                OnPropertyChanged("k_talkMessageSet");
736
            }
737
        }
738

    
739
        public double ContentWidth
740
        {
741
            get
742
            {
743
                return contentWidth;
744
            }
745
            set
746
            {
747
                contentWidth = value;
748
                OnPropertyChanged("ContentWidth");
749
            }
750
        }
751

    
752
        public double ContentHeight
753
        {
754
            get
755
            {
756
                return contentHeight;
757
            }
758
            set
759
            {
760
                contentHeight = value;
761
                OnPropertyChanged("ContentHeight");
762
            }
763
        }
764

    
765
        public double ContentViewportWidth
766
        {
767
            get
768
            {
769
                return contentViewportWidth;
770
            }
771
            set
772
            {
773
                contentViewportWidth = value;
774
                OnPropertyChanged("ContentViewportWidth");
775
            }
776
        }
777

    
778
        public double ContentViewportHeight
779
        {
780
            get
781
            {
782
                return contentViewportHeight;
783
            }
784
            set
785
            {
786
                contentViewportHeight = value;
787
                OnPropertyChanged("ContentViewportHeight");
788
            }
789
        }
790

    
791
        public MainWindow SystemMain { get; set; }
792

    
793
        public double Angle
794
        {
795
            get
796
            {
797
                return angle;
798
            }
799
            set
800
            {
801
                angle = value;
802
                OnPropertyChanged("Angle");
803
            }
804
        }
805

    
806
        private bool _PageBalanceMode { get; set; }
807
        public bool PageBalanceMode
808
        {
809
            get
810
            {
811
                return _PageBalanceMode;
812
            }
813
            set
814
            {
815
                _PageBalanceMode = value;
816
                OnPropertyChanged("PageBalanceMode");
817
            }
818
        }
819

    
820
        private int _PageBalanceNumber { get; set; }
821
        public int PageBalanceNumber
822
        {
823
            get
824
            {
825
                return _PageBalanceNumber;
826
            }
827
            set
828
            {
829
                _PageBalanceNumber = value;
830
                OnPropertyChanged("PageBalanceNumber");
831
            }
832
        }
833

    
834
        private int _PageNumber { get; set; }
835
        public int PageNumber
836
        {
837
            get
838
            {
839
                return _PageNumber;
840
            }
841
            set
842
            {
843
                _PageNumber = value;
844
                OnPropertyChanged("PageNumber");
845
            }
846
        }
847

    
848
        public double AngleOffsetX
849
        {
850
            get
851
            {
852
                return angleOffsetX;
853
            }
854
            set
855
            {
856
                angleOffsetX = value;
857
                OnPropertyChanged("AngleOffsetX");
858
            }
859
        }
860

    
861
        public double AngleOffsetY
862
        {
863
            get
864
            {
865
                return angleOffsetY;
866
            }
867
            set
868
            {
869
                angleOffsetY = value;
870
                OnPropertyChanged("AngleOffsetY");
871
            }
872
        }
873

    
874
        //강인구 추가(체크리스트)
875
        private string _CheckList_ID { get; set; }
876
        public string CheckList_ID
877
        {
878
            get
879
            {
880
                return _CheckList_ID;
881
            }
882
            set
883
            {
884
                _CheckList_ID = value;
885
                OnPropertyChanged("CheckList_ID");
886
            }
887
        }
888
        //강인구 추가(캡쳐 모드)
889
        private double _Capture_Opacity { get; set; }
890
        public double Capture_Opacity
891
        {
892
            get
893
            {
894
                return _Capture_Opacity;
895
            }
896
            set
897
            {
898
                _Capture_Opacity = value;
899
                OnPropertyChanged("Capture_Opacity");
900
            }
901
        }
902

    
903
        private Visibility _ViewVisible { get; set; }
904
        public Visibility ViewVisible
905
        {
906
            get
907
            {
908
                return _ViewVisible;
909
            }
910
            set
911
            {
912
                _ViewVisible = value;
913
                OnPropertyChanged("ViewVisible");
914
            }
915
        }
916

    
917
        private bool _IsSync { get; set; }
918
        public bool IsSync
919
        {
920
            get
921
            {
922
                return _IsSync;
923
            }
924
            set
925
            {
926
                _IsSync = value;
927
                OnPropertyChanged("IsSync");
928
            }
929
        }
930

    
931
        private System.Windows.Media.Imaging.BitmapImage _ImageViewPath { get; set;}
932
        public System.Windows.Media.Imaging.BitmapImage ImageViewPath
933
        {
934
            get
935
            {
936
                return _ImageViewPath;
937
            }
938
            set
939
            {
940
                _ImageViewPath = value;
941
                OnPropertyChanged("ImageViewPath");
942
            }
943
        }
944
        private double _ImageViewWidth { get; set; }
945
        public double ImageViewWidth
946
        {
947
            get
948
            {
949
                return _ImageViewWidth;
950
            }
951
            set
952
            {
953
                _ImageViewWidth = value;
954
                OnPropertyChanged("ImageViewWidth");
955
            }
956
        }
957
        private double _ImageViewHeight { get; set; }
958
        public double ImageViewHeight
959
        {
960
            get
961
            {
962
                return _ImageViewHeight;
963
            }
964
            set
965
            {
966
                _ImageViewHeight = value;
967
                OnPropertyChanged("ImageViewHeight");
968
            }
969
        }
970

    
971
        private System.Windows.Media.Imaging.BitmapImage _ImageViewPath_C { get; set; }
972
        public System.Windows.Media.Imaging.BitmapImage ImageViewPath_C
973
        {
974
            get
975
            {
976
                return _ImageViewPath_C;
977
            }
978
            set
979
            {
980
                _ImageViewPath_C = value;
981
                OnPropertyChanged("ImageViewPath_C");
982
            }
983
        }
984
        private double _ImageViewWidth_C { get; set; }
985
        public double ImageViewWidth_C
986
        {
987
            get
988
            {
989
                return _ImageViewWidth_C;
990
            }
991
            set
992
            {
993
                _ImageViewWidth_C = value;
994
                OnPropertyChanged("ImageViewWidth_C");
995
            }
996
        }
997
        private double _ImageViewHeight_C { get; set; }
998
        public double ImageViewHeight_C
999
        {
1000
            get
1001
            {
1002
                return _ImageViewHeight_C;
1003
            }
1004
            set
1005
            {
1006
                _ImageViewHeight_C = value;
1007
                OnPropertyChanged("ImageViewHeight_C");
1008
            }
1009
        }
1010

    
1011

    
1012
        #endregion Property Member
1013

    
1014
        public System.IO.Stream GetStreamFromUrl(string url)
1015
        {
1016
            byte[] imageData = null;
1017

    
1018
            using (var wc = new System.Net.WebClient())
1019
                imageData = wc.DownloadData(url);
1020

    
1021
            return new System.IO.MemoryStream(imageData);
1022
        }
1023

    
1024
        public ViewerDataModel()
1025
        {
1026
            //rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
1027
            //rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
1028
            //rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
1029
            //rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
1030

    
1031
            //RectangleControl rect1 = new RectangleControl();
1032
            //rect1.StartPoint = new Point(50, 50);
1033
            //rect1.LeftBottomPoint = new Point(100, 50);
1034
            //rect1.TopRightPoint = new Point(50, 100);
1035
            //rect1.EndPoint = new Point(100, 100);
1036
            //rect1.FillColor = new SolidColorBrush(Colors.Red);
1037
            //rectangles.Add(rect1);
1038
            //
1039
            // Populate the data model with some example data.
1040
            //
1041
            //rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
1042
            //rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
1043
            //rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
1044
            //rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
1045

    
1046
            this.ControlOpacity = 1;
1047
            //강인구 추가
1048
            
1049
            this.LineSize = 3;
1050

    
1051
            this.TextSize = 30;
1052

    
1053
            this.Interval = 10;
1054

    
1055
            this.ArcLength = 10;
1056

    
1057
            this.DashSize = new DoubleCollection(99999999);
1058
        }
1059

    
1060
        #region INotifyPropertyChanged Event
1061

    
1062
        private void OnPropertyChanged(string name)
1063
        {
1064
            if (PropertyChanged != null)
1065
            {
1066
                PropertyChanged(this, new PropertyChangedEventArgs(name));
1067
            }
1068
        }
1069

    
1070
        public event PropertyChangedEventHandler PropertyChanged;
1071

    
1072
        #endregion
1073
    }
1074
}
클립보드 이미지 추가 (최대 크기: 500 MB)