프로젝트

일반

사용자정보

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

markus / KCOM / Common / ViewerDataModel.cs @ 168f8027

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

1
using KCOM.Messenger;
2
using KCOMDataModel.DataModel;
3
//using Leadtools;
4
using MarkupToPDF.Common;
5
using Newtonsoft.Json;
6
using System;
7
using System.Collections;
8
using System.Collections.Generic;
9
using System.Collections.ObjectModel;
10
using System.ComponentModel;
11
using System.IO;
12
using System.Linq;
13
using System.Text;
14
using System.Windows;
15
using System.Windows.Controls;
16
using System.Windows.Ink;
17
using System.Windows.Media;
18
using System.Xml;
19
using System.Xml.Serialization;
20
//using IKCOM;
21

    
22
namespace KCOM.Common
23
{
24
    public class ViewerDataModel : INotifyPropertyChanged
25
    {
26
        #region Data Members
27

    
28
        private static ViewerDataModel instance = new ViewerDataModel();
29

    
30
        //private ObservableCollection<CommentUserInfo> markupControls_Pre = new ObservableCollection<CommentUserInfo>();
31

    
32
        private ObservableCollection<CommentUserInfo> markupControls = new ObservableCollection<CommentUserInfo>();
33
        private ObservableCollection<CommentUserInfo> markupControls_Sync = new ObservableCollection<CommentUserInfo>();
34
        private ObservableCollection<CommentUserInfo> markupControls_User = new ObservableCollection<CommentUserInfo>();
35

    
36

    
37
        ////강인구 추가
38
        //private List<Check_Inferface> check_Item = new List<Check_Inferface>();
39
        private ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> document_Info = new ObservableCollection<KCOMDataModel.DataModel.DOCPAGE>();
40
        private ObservableCollection<Undo_data> undoDataList = new ObservableCollection<Undo_data>();
41
        
42
        //public  UndoDataList { get; set; }
43

    
44

    
45
        private ObservableCollection<IKCOM.MarkupInfoItem> markupInfoList = new ObservableCollection<IKCOM.MarkupInfoItem>();
46
        private ObservableCollection<IKCOM.MarkupInfoItem> markupInfoRevList = new ObservableCollection<IKCOM.MarkupInfoItem>();
47

    
48
        public List<FAVORITE_DOC> FavoriteSelctedSet = new List<FAVORITE_DOC>();
49
        public List<FAVORITE_DOC> FavoriteSet = new List<FAVORITE_DOC>();
50
        public List<KCOMDataModel.DataModel.DOCPAGE> RotationDocs = new List<KCOMDataModel.DataModel.DOCPAGE>();
51
        //_markupInfoList
52

    
53
        private StrokeCollection markupPens = new StrokeCollection();
54

    
55
        //private ObservableCollection<RectangleData> rectangles = new ObservableCollection<RectangleData>();
56

    
57

    
58
        private double contentScale = 1;
59

    
60
        private double contentOffsetY = 0;
61

    
62
        private double contentOffsetX = 0;
63

    
64
        private double Sync_contentScale = 1;
65

    
66
        private double Sync_contentOffsetY = 0;
67

    
68
        private double Sync_contentOffsetX = 0;
69

    
70
        private double contentViewportHeight = 0;
71

    
72
        private double contentViewportWidth = 0;
73

    
74
        private double contentWidth = 0;
75

    
76
        private MessageCollection _k_talkMessageSet;
77

    
78
        private double contentHeight = 0;
79

    
80
        private double angle = 0;
81

    
82
        private double angleOffsetX = 0;
83

    
84
        private double angleOffsetY = 0;
85

    
86
        private ImageBrush backgroundImage;
87

    
88
        //private RasterImage _rasterimage;
89

    
90

    
91
        #endregion Data Members
92

    
93
        #region Property Member
94

    
95
        public static ViewerDataModel Instance
96
        {
97
            get
98
            {
99
                return instance;
100
            }
101
        }
102

    
103
        private List<IKCOM.MarkupItemEx> _MarkupList_MY { get; set; }
104
        public List<IKCOM.MarkupItemEx> MarkupList_MY
105
        {
106
            get
107
            {
108
                if (_MarkupList_MY == null)
109
                {
110
                    _MarkupList_MY = new List<IKCOM.MarkupItemEx>();
111
                }
112

    
113
                return _MarkupList_MY;
114
            }
115
            set
116
            {
117

    
118
                _MarkupList_MY = value;
119
                OnPropertyChanged("MarkupList_MY");
120
            }
121
        }
122

    
123
        private List<IKCOM.MarkupItemEx> _MarkupList_USER { get; set; }
124
        public List<IKCOM.MarkupItemEx> MyMarkupList
125
        {
126
            get
127
            {
128
                if (_MarkupList_USER == null)
129
                {
130
                    _MarkupList_USER = new List<IKCOM.MarkupItemEx>();
131
                }
132

    
133
                return _MarkupList_USER;
134
            }
135
            set
136
            {
137

    
138
                _MarkupList_USER = value;
139
                OnPropertyChanged("_MarkupList_USER");
140
            }
141
        }
142

    
143
        private List<IKCOM.MarkupItemEx> _MarkupList_Pre { get; set; }
144
        public List<IKCOM.MarkupItemEx> MarkupList_Pre
145
        {
146
            get
147
            {
148
                if (_MarkupList_Pre == null)
149
                {
150
                    _MarkupList_Pre = new List<IKCOM.MarkupItemEx>();
151
                }
152

    
153
                return _MarkupList_Pre;
154
            }
155
            set
156
            {
157

    
158
                _MarkupList_Pre = value;
159
                OnPropertyChanged("MarkupList_Pre");
160
            }
161

    
162
        }
163

    
164
        private System.IO.FileInfo _searchPDF { get; set; }
165
        public System.IO.FileInfo searchPDF
166
        {
167
            get
168
            {
169
                return _searchPDF;
170
            }
171
            set
172
            {
173
                _searchPDF = value;
174
                OnPropertyChanged("searchPDF");
175
            }
176
        }
177

    
178

    
179
        /// <summary>
180
        /// 현재 상단 메뉴에서 선택된 컨트롤
181
        /// </summary>
182
        private string _SelectedControl { get; set; }
183
        public string SelectedControl
184
        {
185
            get
186
            {
187
                return _SelectedControl;
188
            }
189
            set
190
            {
191
                _SelectedControl = value;
192
                OnPropertyChanged("SelectedControl");
193
            }
194
        }
195

    
196

    
197
        /// <summary>
198
        /// 현재 상단 메뉴의 선 굵기값
199
        /// </summary>
200
        private double _LineSize { get; set; }
201
        public double LineSize
202
        {
203
            get
204
            {
205
                return _LineSize;
206
            }
207
            set
208
            {
209
                _LineSize = value;
210
                OnPropertyChanged("LineSize");
211
            }
212
        }
213

    
214
        private double _Interval { get; set; }
215
        public double Interval
216
        {
217
            get
218
            {
219
                return _Interval;
220
            }
221
            set
222
            {
223
                _Interval = value;
224
                OnPropertyChanged("Interval");
225
            }
226
        }
227
        private double _SaveInterval { get; set; }
228
        public double SaveInterval
229
        {
230
            get
231
            {
232
                return _SaveInterval;
233
            }
234
            set
235
            {
236
                _SaveInterval = value;
237
                OnPropertyChanged("SaveInterval");
238
            }
239
        }
240
        private double _ArcLength { get; set; }
241
        public double ArcLength
242
        {
243
            get
244
            {
245
                return _ArcLength;
246
            }
247
            set
248
            {
249
                _ArcLength = value;
250
                OnPropertyChanged("ArcLength");
251
            }
252
        }
253

    
254
        public bool IsPressShift
255
        {
256
            get
257
            {
258
                return ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Shift) == System.Windows.Input.ModifierKeys.Shift);
259
            }
260
        }
261

    
262
        public bool IsPressCtrl
263
        {
264
            get
265
            {
266
                return ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Control) == System.Windows.Input.ModifierKeys.Control);
267
            }
268
        }
269

    
270
        /// <summary>
271
        /// Dash 사이즈 
272
        /// </summary>
273
        private DoubleCollection _DashSize { get; set; }
274
        public DoubleCollection DashSize
275
        {
276
            get
277
            {
278
                return _DashSize;
279
            }
280
            set
281
            {
282
                _DashSize = value;
283
                OnPropertyChanged("DashSize");
284
            }
285
        }
286

    
287
        private string _ControlTag { get; set; }
288
        public string ControlTag
289
        {
290
            get
291
            {
292
                return _ControlTag;
293
            }
294
            set
295
            {
296
                _ControlTag = value;
297
                OnPropertyChanged("ControlTag");
298
            }
299
        }
300

    
301
        private string _CheckStatus { get; set; }
302
        public string CheckStatus
303
        {
304
            get
305
            {
306
                return _CheckStatus;
307
            }
308
            set
309
            {
310
                _CheckStatus = value;
311
                OnPropertyChanged("CheckStatus");
312
            }
313
        }
314

    
315

    
316

    
317
        //private bool _IsPageChanged { get; set; }
318
        //public bool IsPageChanged
319
        //{
320
        //    get
321
        //    {
322
        //        return _IsPageChanged;
323
        //    }
324
        //    set
325
        //    {
326
        //        _IsPageChanged = value;
327
        //        OnPropertyChanged("IsPageChanged");
328
        //    }
329
        //}
330

    
331

    
332

    
333
        ///// <summary>
334
        ///// 강인구 추가(Check List관련)
335
        ///// </summary>
336
        //public List<Check_Inferface> Check_Item
337
        //{
338
        //    get
339
        //    {
340
        //        return check_Item;
341
        //    }
342
        //}
343

    
344
        private bool _IsConsolidate { get; set; }
345
        public bool IsConsolidate
346
        {
347
            get
348
            {
349
                return _IsConsolidate;
350
            }
351
            set
352
            {
353
                _IsConsolidate = value;
354
                OnPropertyChanged("IsConsolidate");
355
            }
356
        }
357

    
358
        ////////////////////////////////////////////////
359

    
360

    
361
        #region Angle 관련
362
        private Visibility _AngleVisibility { get; set; }
363
        public Visibility AngleVisibility
364
        {
365
            get
366
            {
367
                return _AngleVisibility;
368
            }
369
            set
370
            {
371
                _AngleVisibility = value;
372
                OnPropertyChanged("AngleVisibility");
373
            }
374

    
375
        }
376
        private string _AngleValue { get; set; }
377
        public string AngleValue
378
        {
379
            get
380
            {
381
                return _AngleValue;
382
            }
383
            set
384
            {
385
                _AngleValue = value;
386
                OnPropertyChanged("AngleValue");
387
            }
388
        }
389

    
390
        public double Angle
391
        {
392
            get
393
            {
394
                return angle;
395
            }
396
            set
397
            {
398
                angle = value;
399
                OnPropertyChanged("Angle");
400
            }
401
        }
402

    
403
        private string _HelperContent { get; set; }
404
        public string HelperContent
405
        {
406
            get
407
            {
408
                return _HelperContent;
409
            }
410
            set
411
            {
412
                _HelperContent = value;
413
                OnPropertyChanged("HelperContent");
414
            }
415
        }
416

    
417
        private string _HelperHeader { get; set; }
418
        public string HelperHeader
419
        {
420
            get
421
            {
422
                return _HelperHeader;
423
            }
424
            set
425
            {
426
                _HelperHeader = value;
427
                OnPropertyChanged("HelperHeader");
428
            }
429
        }
430

    
431
        private bool _HelperExit { get; set; }
432
        public bool HelperExit
433
        {
434
            get
435
            {
436
                return _HelperExit;
437
            }
438
            set
439
            {
440
                _HelperExit = value;
441
                OnPropertyChanged("HelperExit");
442
            }
443
        }
444

    
445
        #endregion
446

    
447
        public ObservableCollection<CommentUserInfo> MarkupControls
448
        {
449
            get
450
            {
451
                return markupControls;
452
            }
453
        }
454

    
455
        public ObservableCollection<CommentUserInfo> MarkupControls_Sync
456
        {
457
            get
458
            {
459
                return markupControls_Sync;
460
            }
461
        }
462
        public int current_page_commentcnt = 0;
463
        public ObservableCollection<CommentUserInfo> MarkupControls_USER
464
        {
465
            get
466
            {
467
                return markupControls_User;
468
            }
469
        }
470

    
471
        public ObservableCollection<Undo_data> UndoDataList
472
        {
473
            get
474
            {
475
                return undoDataList;
476
            }
477
        }
478
        
479
        public StrokeCollection MarkupPens
480
        {
481
            get
482
            {
483
                return markupPens;
484
            }
485

    
486
        }
487

    
488
        #region 버튼 여부
489

    
490
        /// <summary>
491
        /// 상단 Fill 버튼이 클릭 되어있는지
492
        /// </summary>
493
        private bool _checkFillShape { get; set; }
494
        public bool checkFillShape
495
        {
496
            get
497
            {
498
                return _checkFillShape;
499
            }
500
            set
501
            {
502
                _checkFillShape = value;
503
                OnPropertyChanged("checkFillShape");
504
            }
505
        }
506

    
507
        /// <summary>
508
        /// 상단 Hatch 버튼이 클릭 되어있는지
509
        /// </summary>
510
        private bool _checkHatchShape { get; set; }
511
        public bool checkHatchShape
512
        {
513
            get
514
            {
515
                return _checkHatchShape;
516
            }
517
            set
518
            {
519
                _checkHatchShape = value;
520
                OnPropertyChanged("checkHatchShape");
521
            }
522
        }
523

    
524
        private double _controlOpacity { get; set; }
525
        public double ControlOpacity
526
        {
527
            get
528
            {
529
                return _controlOpacity;
530
            }
531
            set
532
            {
533

    
534
                _controlOpacity = value;
535
                OnPropertyChanged("ControlOpacity");
536
            }
537
        }
538

    
539
        private MarkupToPDF.Controls.Common.PaintSet _paintSet { get; set; }
540
        public MarkupToPDF.Controls.Common.PaintSet paintSet
541
        {
542
            get
543
            {
544
                return _paintSet;
545
            }
546
            set
547
            {
548
                _paintSet = value;
549
                OnPropertyChanged("paintSet");
550
            }
551
        }
552

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

    
571
        /// <summary>
572
        /// 강인구 추가
573
        /// 상단 TextWeight 버튼이 클릭 되어있는지
574
        /// </summary>
575
        private bool _checkTextWeight { get; set; }
576
        public bool checkTextWeight
577
        {
578
            get
579
            {
580
                return _checkTextWeight;
581
            }
582
            set
583
            {
584
                _checkTextWeight = value;
585
                OnPropertyChanged("checkTextWeight");
586
            }
587
        }
588

    
589
        /// <summary>
590
        /// 강인구 추가
591
        /// 상단 UnderLine 버튼이 클릭 되어있는지
592
        /// </summary>
593
        private bool _checkUnderLine { get; set; }
594
        public bool checkUnderLine
595
        {
596
            get
597
            {
598
                return _checkUnderLine;
599
            }
600
            set
601
            {
602
                _checkUnderLine = value;
603
                OnPropertyChanged("checkUnderLine");
604
            }
605
        }
606

    
607
        /// <summary>
608
        /// 상단 Hatch 버튼이 클릭 되어있는지
609
        /// </summary>
610
        private bool _checkHighShape { get; set; }
611
        public bool checkHighShape
612
        {
613
            get
614
            {
615
                return _checkHighShape;
616
            }
617
            set
618
            {
619
                _checkHighShape = value;
620
                OnPropertyChanged("checkHighShape");
621
            }
622
        }
623

    
624
        /// <summary>
625
        /// 상단 Axis 버튼이 클릭 되어있는지
626
        /// </summary>
627
        private bool _checkAxis { get; set; }
628
        public bool checkAxis
629
        {
630
            get
631
            {
632
                return _checkAxis;
633
            }
634
            set
635
            {
636
                _checkAxis = value;
637
                OnPropertyChanged("checkAxis");
638
            }
639
        }
640

    
641
        /// <summary>
642
        /// 상단 Highlight 버튼이 클릭 되어있는지
643
        /// </summary>
644
        private bool _checkHighlight { get; set; }
645
        public bool checkHighlight
646
        {
647
            get
648
            {
649
                return _checkHighlight;
650
            }
651
            set
652
            {
653
                _checkHighlight = value;
654
                OnPropertyChanged("checkHighlight");
655
            }
656
        }
657

    
658
        /// <summary>
659
        /// 강인구 추가
660
        /// 상단 TextWeight 버튼이 클릭 되어있는지
661
        /// </summary>
662
        private double _TextSize { get; set; }
663
        public double TextSize
664
        {
665
            get
666
            {
667
                return _TextSize;
668
            }
669
            set
670
            {
671
                _TextSize = value;
672
                OnPropertyChanged("TextSize");
673
            }
674
        }
675
        #endregion
676

    
677
        public ImageBrush BackgroundImage
678
        {
679
            get
680
            {
681
                return backgroundImage;
682
            }
683
            set
684
            {
685
                backgroundImage = value;
686
                OnPropertyChanged("BackgroundImage");
687
            }
688
        }
689

    
690
        public ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> Document_Info
691
        {
692
            get
693
            {
694
                return document_Info;
695
            }
696
        }
697

    
698
        public double ContentScale
699
        {
700
            get
701
            {
702
                return contentScale;
703
            }
704
            set
705
            {
706
                contentScale = value;
707

    
708
                double minOffsetX = 0.0;
709
                double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
710
                contentOffsetX = Math.Min(Math.Max(contentOffsetX, minOffsetX), maxOffsetX);
711

    
712
                double minOffsetY = 0.0;
713
                double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
714
                contentOffsetY = Math.Min(Math.Max(contentOffsetY, minOffsetY), maxOffsetY);
715

    
716
                OnPropertyChanged("ContentScale");
717
            }
718
        }
719

    
720
        public double Sync_ContentScale
721
        {
722
            get
723
            {
724
                return Sync_contentScale;
725
            }
726
            set
727
            {
728
                Sync_contentScale = value;
729
                OnPropertyChanged("Sync_ContentScale");
730
            }
731
        }
732

    
733
        public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoList
734
        {
735
            get
736
            {
737
                return markupInfoList;
738
            }
739
            set
740
            {
741
                markupInfoList = value;
742
                OnPropertyChanged("_markupInfoList");
743
            }
744
        }
745

    
746
        public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoRevList
747
        {
748
            get
749
            {
750
                return markupInfoRevList;
751
            }
752
            set
753
            {
754
                markupInfoRevList = value;
755
                OnPropertyChanged("_markupInfoRevList");
756
            }
757
        }
758

    
759
        public double ContentOffsetX
760
        {
761
            get
762
            {
763
                return contentOffsetX;
764
            }
765
            set
766
            {
767
                double minOffsetX = 0.0;
768
                double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
769
                contentOffsetX = Math.Min(Math.Max(value, minOffsetX), maxOffsetX);
770
                OnPropertyChanged("ContentOffsetX");
771
            }
772
        }
773

    
774
        public double ContentOffsetY
775
        {
776
            get
777
            {
778
                return contentOffsetY;
779
            }
780
            set
781
            {
782
                double minOffsetY = 0.0;
783
                double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
784
                contentOffsetY = Math.Min(Math.Max(value, minOffsetY), maxOffsetY);
785
                OnPropertyChanged("ContentOffsetY");
786
            }
787
        }
788

    
789
        public double Sync_ContentOffsetX
790
        {
791
            get
792
            {
793
                return Sync_contentOffsetX;
794
            }
795
            set
796
            {
797
                Sync_contentOffsetX = value;
798
                OnPropertyChanged("Sync_ContentOffsetX");
799
            }
800
        }
801

    
802
        public double Sync_ContentOffsetY
803
        {
804
            get
805
            {
806
                return Sync_contentOffsetY;
807
            }
808
            set
809
            {
810
                Sync_contentOffsetY = value;
811
                OnPropertyChanged("Sync_ContentOffsetY");
812
            }
813
        }
814

    
815
        public MessageCollection k_talkMessageSet
816
        {
817
            get
818
            {
819
                if (_k_talkMessageSet == null)
820
                {
821
                    _k_talkMessageSet = new MessageCollection();
822
                }
823
                return _k_talkMessageSet;
824
            }
825
            set
826
            {
827
                _k_talkMessageSet = value;
828
                OnPropertyChanged("k_talkMessageSet");
829
            }
830
        }
831

    
832
        public double ContentWidth
833
        {
834
            get
835
            {
836
                return contentWidth;
837
            }
838
            set
839
            {
840
                contentWidth = value;
841
                OnPropertyChanged("ContentWidth");
842
            }
843
        }
844

    
845
        public double ContentHeight
846
        {
847
            get
848
            {
849
                return contentHeight;
850
            }
851
            set
852
            {
853
                contentHeight = value;
854
                OnPropertyChanged("ContentHeight");
855
            }
856
        }
857

    
858
        public double ContentViewportWidth
859
        {
860
            get
861
            {
862
                return contentViewportWidth;
863
            }
864
            set
865
            {
866
                contentViewportWidth = value;
867
                OnPropertyChanged("ContentViewportWidth");
868
            }
869
        }
870

    
871
        public double ContentViewportHeight
872
        {
873
            get
874
            {
875
                return contentViewportHeight;
876
            }
877
            set
878
            {
879
                contentViewportHeight = value;
880
                OnPropertyChanged("ContentViewportHeight");
881
            }
882
        }
883

    
884
        public MainWindow SystemMain { get; set; }
885

    
886
        private bool _PageBalanceMode { get; set; }
887
        public bool PageBalanceMode
888
        {
889
            get
890
            {
891
                return _PageBalanceMode;
892
            }
893
            set
894
            {
895
                _PageBalanceMode = value;
896
                OnPropertyChanged("PageBalanceMode");
897
            }
898
        }
899

    
900
        private int _PageBalanceNumber { get; set; }
901
        public int PageBalanceNumber
902
        {
903
            get
904
            {
905
                return _PageBalanceNumber;
906
            }
907
            set
908
            {
909
                _PageBalanceNumber = value;
910
                OnPropertyChanged("PageBalanceNumber");
911
            }
912
        }
913

    
914
        private int _PageNumber { get; set; }
915
        public int PageNumber
916
        {
917
            get
918
            {
919
                return _PageNumber;
920
            }
921
            set
922
            {
923
                _PageNumber = value;
924
                OnPropertyChanged("PageNumber");
925
            }
926
        }
927

    
928
        public double AngleOffsetX
929
        {
930
            get
931
            {
932
                return angleOffsetX;
933
            }
934
            set
935
            {
936
                angleOffsetX = value;
937
                OnPropertyChanged("AngleOffsetX");
938
            }
939
        }
940

    
941
        public double AngleOffsetY
942
        {
943
            get
944
            {
945
                return angleOffsetY;
946
            }
947
            set
948
            {
949
                angleOffsetY = value;
950
                OnPropertyChanged("AngleOffsetY");
951
            }
952
        }
953

    
954
        //강인구 추가(체크리스트)
955
        private string _CheckList_ID { get; set; }
956
        public string CheckList_ID
957
        {
958
            get
959
            {
960
                return _CheckList_ID;
961
            }
962
            set
963
            {
964
                _CheckList_ID = value;
965
                OnPropertyChanged("CheckList_ID");
966
            }
967
        }
968
        //강인구 추가(캡쳐 모드)
969
        private double _Capture_Opacity { get; set; }
970
        public double Capture_Opacity
971
        {
972
            get
973
            {
974
                return _Capture_Opacity;
975
            }
976
            set
977
            {
978
                _Capture_Opacity = value;
979
                OnPropertyChanged("Capture_Opacity");
980
            }
981
        }
982

    
983
        private Visibility _ViewVisible { get; set; }
984
        public Visibility ViewVisible
985
        {
986
            get
987
            {
988
                return _ViewVisible;
989
            }
990
            set
991
            {
992
                _ViewVisible = value;
993
                OnPropertyChanged("ViewVisible");
994
            }
995
        }
996

    
997
        private bool _IsSync { get; set; }
998
        public bool IsSync
999
        {
1000
            get
1001
            {
1002
                return _IsSync;
1003
            }
1004
            set
1005
            {
1006
                _IsSync = value;
1007
                OnPropertyChanged("IsSync");
1008
            }
1009
        }
1010

    
1011
        private System.Windows.Media.Imaging.BitmapImage _ImageViewPath;
1012
        public System.Windows.Media.Imaging.BitmapImage ImageViewPath
1013
        {
1014
            get
1015
            {
1016
                return _ImageViewPath;
1017
            }
1018
            set
1019
            {
1020
                _ImageViewPath = value;
1021
                OnPropertyChanged("ImageViewPath");
1022
            }
1023
        }
1024
        private double _ImageViewWidth { get; set; }
1025
        public double ImageViewWidth
1026
        {
1027
            get
1028
            {
1029
                return _ImageViewWidth;
1030
            }
1031
            set
1032
            {
1033
                _ImageViewWidth = value;
1034
                OnPropertyChanged("ImageViewWidth");
1035
            }
1036
        }
1037
        private double _ImageViewHeight { get; set; }
1038
        public double ImageViewHeight
1039
        {
1040
            get
1041
            {
1042
                return _ImageViewHeight;
1043
            }
1044
            set
1045
            {
1046
                _ImageViewHeight = value;
1047
                OnPropertyChanged("ImageViewHeight");
1048
            }
1049
        }
1050

    
1051
        private System.Windows.Media.Imaging.BitmapImage _ImageViewPath_C { get; set; }
1052
        public System.Windows.Media.Imaging.BitmapImage ImageViewPath_C
1053
        {
1054
            get
1055
            {
1056
                return _ImageViewPath_C;
1057
            }
1058
            set
1059
            {
1060
                _ImageViewPath_C = value;
1061
                OnPropertyChanged("ImageViewPath_C");
1062
            }
1063
        }
1064
        private double _ImageViewWidth_C { get; set; }
1065
        public double ImageViewWidth_C
1066
        {
1067
            get
1068
            {
1069
                return _ImageViewWidth_C;
1070
            }
1071
            set
1072
            {
1073
                _ImageViewWidth_C = value;
1074
                OnPropertyChanged("ImageViewWidth_C");
1075
            }
1076
        }
1077
        private double _ImageViewHeight_C { get; set; }
1078
        public double ImageViewHeight_C
1079
        {
1080
            get
1081
            {
1082
                return _ImageViewHeight_C;
1083
            }
1084
            set
1085
            {
1086
                _ImageViewHeight_C = value;
1087
                OnPropertyChanged("ImageViewHeight_C");
1088
            }
1089
        }
1090

    
1091

    
1092
        #endregion Property Member
1093

    
1094
        public System.IO.Stream GetStreamFromUrl(string url)
1095
        {
1096
            byte[] imageData = null;
1097

    
1098
            using (var wc = new System.Net.WebClient())
1099
                imageData = wc.DownloadData(url);
1100

    
1101
            return new System.IO.MemoryStream(imageData);
1102
        }
1103

    
1104
        public ViewerDataModel()
1105
        {
1106
            //rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
1107
            //rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
1108
            //rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
1109
            //rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
1110

    
1111
            //RectangleControl rect1 = new RectangleControl();
1112
            //rect1.StartPoint = new Point(50, 50);
1113
            //rect1.LeftBottomPoint = new Point(100, 50);
1114
            //rect1.TopRightPoint = new Point(50, 100);
1115
            //rect1.EndPoint = new Point(100, 100);
1116
            //rect1.FillColor = new SolidColorBrush(Colors.Red);
1117
            //rectangles.Add(rect1);
1118
            //
1119
            // Populate the data model with some example data.
1120
            //
1121
            //rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
1122
            //rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
1123
            //rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
1124
            //rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
1125

    
1126
            this.ControlOpacity = 1;
1127

    
1128
            /* Default
1129
             LineSize = 3, TextSize = 30, Interval = 10, ArcLength = 10, SaveInterval = 5
1130
            */            
1131
            this.LineSize = KCOM.Properties.Settings.Default.LineSize;
1132

    
1133
            this.TextSize = KCOM.Properties.Settings.Default.TextSize;
1134

    
1135
            this.Interval = KCOM.Properties.Settings.Default.Interval;
1136

    
1137
            this.ArcLength = KCOM.Properties.Settings.Default.ArcLength;
1138

    
1139
            this.DashSize = new DoubleCollection();
1140

    
1141
            this.SaveInterval = KCOM.Properties.Settings.Default.SaveInterval;
1142
            this.AngleVisibility = Visibility.Collapsed;
1143
        }
1144
        
1145
        public List<IKCOM.MarkupInfoItem> SelectedmarkupInfoItems { get; set; }
1146

    
1147
        #region INotifyPropertyChanged Event
1148

    
1149
        private void OnPropertyChanged(string name)
1150
        {
1151
            if (PropertyChanged != null)
1152
            {
1153
                PropertyChanged(this, new PropertyChangedEventArgs(name));
1154
            }
1155
        }
1156

    
1157
        public event PropertyChangedEventHandler PropertyChanged;
1158

    
1159
        #endregion
1160
    }
1161
}
클립보드 이미지 추가 (최대 크기: 500 MB)