프로젝트

일반

사용자정보

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

markus / KCOM / Common / ViewerDataModel.cs @ 92442e4a

이력 | 보기 | 이력해설 | 다운로드 (29.1 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
        private string _HelperContent { get; set; }
391
        public string HelperContent
392
        {
393
            get
394
            {
395
                return _HelperContent;
396
            }
397
            set
398
            {
399
                _HelperContent = value;
400
                OnPropertyChanged("HelperContent");
401
            }
402
        }
403

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

    
418
        private bool _HelperExit { get; set; }
419
        public bool HelperExit
420
        {
421
            get
422
            {
423
                return _HelperExit;
424
            }
425
            set
426
            {
427
                _HelperExit = value;
428
                OnPropertyChanged("HelperExit");
429
            }
430
        }
431

    
432
        #endregion
433

    
434
        public ObservableCollection<CommentUserInfo> MarkupControls
435
        {
436
            get
437
            {
438
                return markupControls;
439
            }
440
        }
441

    
442
        public ObservableCollection<CommentUserInfo> MarkupControls_Sync
443
        {
444
            get
445
            {
446
                return markupControls_Sync;
447
            }
448
        }
449
        public int current_page_commentcnt = 0;
450
        public ObservableCollection<CommentUserInfo> MarkupControls_USER
451
        {
452
            get
453
            {
454
                return markupControls_User;
455
            }
456
        }
457

    
458
        public ObservableCollection<Undo_data> UndoDataList
459
        {
460
            get
461
            {
462
                return undoDataList;
463
            }
464
        }
465
        
466
        public StrokeCollection MarkupPens
467
        {
468
            get
469
            {
470
                return markupPens;
471
            }
472

    
473
        }
474

    
475
        #region 버튼 여부
476

    
477
        /// <summary>
478
        /// 상단 Fill 버튼이 클릭 되어있는지
479
        /// </summary>
480
        private bool _checkFillShape { get; set; }
481
        public bool checkFillShape
482
        {
483
            get
484
            {
485
                return _checkFillShape;
486
            }
487
            set
488
            {
489
                _checkFillShape = value;
490
                OnPropertyChanged("checkFillShape");
491
            }
492
        }
493

    
494
        /// <summary>
495
        /// 상단 Hatch 버튼이 클릭 되어있는지
496
        /// </summary>
497
        private bool _checkHatchShape { get; set; }
498
        public bool checkHatchShape
499
        {
500
            get
501
            {
502
                return _checkHatchShape;
503
            }
504
            set
505
            {
506
                _checkHatchShape = value;
507
                OnPropertyChanged("checkHatchShape");
508
            }
509
        }
510

    
511
        private double _controlOpacity { get; set; }
512
        public double ControlOpacity
513
        {
514
            get
515
            {
516
                return _controlOpacity;
517
            }
518
            set
519
            {
520

    
521
                _controlOpacity = value;
522
                OnPropertyChanged("ControlOpacity");
523
            }
524
        }
525

    
526
        private MarkupToPDF.Controls.Common.PaintSet _paintSet { get; set; }
527
        public MarkupToPDF.Controls.Common.PaintSet paintSet
528
        {
529
            get
530
            {
531
                return _paintSet;
532
            }
533
            set
534
            {
535
                _paintSet = value;
536
                OnPropertyChanged("paintSet");
537
            }
538
        }
539

    
540
        /// <summary>
541
        /// 강인구 추가
542
        /// 상단 TextStyle 버튼이 클릭 되어있는지
543
        /// </summary>
544
        private bool _checkTextStyle { get; set; }
545
        public bool checkTextStyle
546
        {
547
            get
548
            {
549
                return _checkTextStyle;
550
            }
551
            set
552
            {
553
                _checkTextStyle = value;
554
                OnPropertyChanged("checkTextStyle");
555
            }
556
        }
557

    
558
        /// <summary>
559
        /// 강인구 추가
560
        /// 상단 TextWeight 버튼이 클릭 되어있는지
561
        /// </summary>
562
        private bool _checkTextWeight { get; set; }
563
        public bool checkTextWeight
564
        {
565
            get
566
            {
567
                return _checkTextWeight;
568
            }
569
            set
570
            {
571
                _checkTextWeight = value;
572
                OnPropertyChanged("checkTextWeight");
573
            }
574
        }
575

    
576
        /// <summary>
577
        /// 강인구 추가
578
        /// 상단 UnderLine 버튼이 클릭 되어있는지
579
        /// </summary>
580
        private bool _checkUnderLine { get; set; }
581
        public bool checkUnderLine
582
        {
583
            get
584
            {
585
                return _checkUnderLine;
586
            }
587
            set
588
            {
589
                _checkUnderLine = value;
590
                OnPropertyChanged("checkUnderLine");
591
            }
592
        }
593

    
594
        /// <summary>
595
        /// 상단 Hatch 버튼이 클릭 되어있는지
596
        /// </summary>
597
        private bool _checkHighShape { get; set; }
598
        public bool checkHighShape
599
        {
600
            get
601
            {
602
                return _checkHighShape;
603
            }
604
            set
605
            {
606
                _checkHighShape = value;
607
                OnPropertyChanged("checkHighShape");
608
            }
609
        }
610

    
611
        /// <summary>
612
        /// 상단 Axis 버튼이 클릭 되어있는지
613
        /// </summary>
614
        private bool _checkAxis { get; set; }
615
        public bool checkAxis
616
        {
617
            get
618
            {
619
                return _checkAxis;
620
            }
621
            set
622
            {
623
                _checkAxis = value;
624
                OnPropertyChanged("checkAxis");
625
            }
626
        }
627

    
628
        /// <summary>
629
        /// 상단 Highlight 버튼이 클릭 되어있는지
630
        /// </summary>
631
        private bool _checkHighlight { get; set; }
632
        public bool checkHighlight
633
        {
634
            get
635
            {
636
                return _checkHighlight;
637
            }
638
            set
639
            {
640
                _checkHighlight = value;
641
                OnPropertyChanged("checkHighlight");
642
            }
643
        }
644

    
645
        /// <summary>
646
        /// 강인구 추가
647
        /// 상단 TextWeight 버튼이 클릭 되어있는지
648
        /// </summary>
649
        private double _TextSize { get; set; }
650
        public double TextSize
651
        {
652
            get
653
            {
654
                return _TextSize;
655
            }
656
            set
657
            {
658
                _TextSize = value;
659
                OnPropertyChanged("TextSize");
660
            }
661
        }
662
        #endregion
663

    
664
        public ImageBrush BackgroundImage
665
        {
666
            get
667
            {
668
                return backgroundImage;
669
            }
670
            set
671
            {
672
                backgroundImage = value;
673
                OnPropertyChanged("BackgroundImage");
674
            }
675
        }
676

    
677
        public ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> Document_Info
678
        {
679
            get
680
            {
681
                return document_Info;
682
            }
683
        }
684

    
685
        public double ContentScale
686
        {
687
            get
688
            {
689
                return contentScale;
690
            }
691
            set
692
            {
693
                contentScale = value;
694

    
695
                double minOffsetX = 0.0;
696
                double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
697
                contentOffsetX = Math.Min(Math.Max(contentOffsetX, minOffsetX), maxOffsetX);
698

    
699
                double minOffsetY = 0.0;
700
                double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
701
                contentOffsetY = Math.Min(Math.Max(contentOffsetY, minOffsetY), maxOffsetY);
702

    
703
                OnPropertyChanged("ContentScale");
704
            }
705
        }
706

    
707
        public double Sync_ContentScale
708
        {
709
            get
710
            {
711
                return Sync_contentScale;
712
            }
713
            set
714
            {
715
                Sync_contentScale = value;
716
                OnPropertyChanged("Sync_ContentScale");
717
            }
718
        }
719

    
720
        public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoList
721
        {
722
            get
723
            {
724
                return markupInfoList;
725
            }
726
            set
727
            {
728
                markupInfoList = value;
729
                OnPropertyChanged("_markupInfoList");
730
            }
731
        }
732

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

    
746
        public double ContentOffsetX
747
        {
748
            get
749
            {
750
                return contentOffsetX;
751
            }
752
            set
753
            {
754
                double minOffsetX = 0.0;
755
                double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
756
                contentOffsetX = Math.Min(Math.Max(value, minOffsetX), maxOffsetX);
757
                OnPropertyChanged("ContentOffsetX");
758
            }
759
        }
760

    
761
        public double ContentOffsetY
762
        {
763
            get
764
            {
765
                return contentOffsetY;
766
            }
767
            set
768
            {
769
                double minOffsetY = 0.0;
770
                double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
771
                contentOffsetY = Math.Min(Math.Max(value, minOffsetY), maxOffsetY);
772
                OnPropertyChanged("ContentOffsetY");
773
            }
774
        }
775

    
776
        public double Sync_ContentOffsetX
777
        {
778
            get
779
            {
780
                return Sync_contentOffsetX;
781
            }
782
            set
783
            {
784
                Sync_contentOffsetX = value;
785
                OnPropertyChanged("Sync_ContentOffsetX");
786
            }
787
        }
788

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

    
802
        public MessageCollection k_talkMessageSet
803
        {
804
            get
805
            {
806
                if (_k_talkMessageSet == null)
807
                {
808
                    _k_talkMessageSet = new MessageCollection();
809
                }
810
                return _k_talkMessageSet;
811
            }
812
            set
813
            {
814
                _k_talkMessageSet = value;
815
                OnPropertyChanged("k_talkMessageSet");
816
            }
817
        }
818

    
819
        public double ContentWidth
820
        {
821
            get
822
            {
823
                return contentWidth;
824
            }
825
            set
826
            {
827
                contentWidth = value;
828
                OnPropertyChanged("ContentWidth");
829
            }
830
        }
831

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

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

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

    
871
        public MainWindow SystemMain { get; set; }
872

    
873
        public double Angle
874
        {
875
            get
876
            {
877
                return angle;
878
            }
879
            set
880
            {
881
                angle = value;
882
                OnPropertyChanged("Angle");
883
            }
884
        }
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

    
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)