프로젝트

일반

사용자정보

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

markus / KCOM / Common / ViewerDataModel.cs @ 6af42ff0

이력 | 보기 | 이력해설 | 다운로드 (30.6 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.Threading.Tasks;
15
using System.Windows;
16
using System.Windows.Controls;
17
using System.Windows.Ink;
18
using System.Windows.Media;
19
using System.Xml;
20
using System.Xml.Serialization;
21
//using IKCOM;
22

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

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

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

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

    
37

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

    
45

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

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

    
54
        private StrokeCollection markupPens = new StrokeCollection();
55

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

    
58

    
59
        private double contentScale = 1;
60

    
61
        private double contentOffsetY = 0;
62

    
63
        private double contentOffsetX = 0;
64

    
65
        private double Sync_contentScale = 1;
66

    
67
        private double Sync_contentOffsetY = 0;
68

    
69
        private double Sync_contentOffsetX = 0;
70

    
71
        private double contentViewportHeight = 0;
72

    
73
        private double contentViewportWidth = 0;
74

    
75
        private double contentWidth = 0;
76

    
77
        private MessageCollection _k_talkMessageSet;
78

    
79
        private double contentHeight = 0;
80

    
81
        private double angle = 0;
82

    
83
        private double angleOffsetX = 0;
84

    
85
        private double angleOffsetY = 0;
86

    
87
        private ImageBrush backgroundImage;
88

    
89
        //private RasterImage _rasterimage;
90

    
91

    
92
        #endregion Data Members
93

    
94
        #region Property Member
95

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

    
104
        private bool isDownloadOriginal;
105
        public bool IsDownloadOriginal
106
        {
107
            get => isDownloadOriginal;
108
            set
109
            {
110
                if (isDownloadOriginal != value)
111
                {
112
                    isDownloadOriginal = value;
113
                    OnPropertyChanged("IsDownloadOriginal");
114
                }
115
            }
116
        }
117

    
118
        private bool isDownloadCancel;
119
        public bool IsDownloadCancel
120
        {
121
            get => isDownloadCancel;
122
            set
123
            {
124
                if (isDownloadCancel != value)
125
                {
126
                    isDownloadCancel = value;
127
                    OnPropertyChanged("IsDownloadCancel");
128
                }
129
            }
130
        }
131

    
132
        private int downloadFileProgress;
133
        public int DownloadFileProgress
134
        {
135
            get => downloadFileProgress;
136
            set
137
            {
138
                if (downloadFileProgress != value)
139
                {
140
                    downloadFileProgress = value;
141
                    OnPropertyChanged("DownloadFileProgress");
142
                }
143
            }
144
        }
145

    
146
        private string originalTempFile;
147
        public string OriginalTempFile
148
        {
149
            get => originalTempFile;
150
            set
151
            {
152
                if (originalTempFile != value)
153
                {
154
                    originalTempFile = value;
155
                    OnPropertyChanged("OriginalTempFile");
156
                }
157
            }
158
        }
159

    
160
        private List<IKCOM.MarkupItemEx> _MarkupList_MY { get; set; }
161
        public List<IKCOM.MarkupItemEx> MarkupList_MY
162
        {
163
            get
164
            {
165
                if (_MarkupList_MY == null)
166
                {
167
                    _MarkupList_MY = new List<IKCOM.MarkupItemEx>();
168
                }
169

    
170
                return _MarkupList_MY;
171
            }
172
            set
173
            {
174

    
175
                _MarkupList_MY = value;
176
                OnPropertyChanged("MarkupList_MY");
177
            }
178
        }
179

    
180
        private List<IKCOM.MarkupItemEx> _MarkupList_USER { get; set; }
181
        public List<IKCOM.MarkupItemEx> MyMarkupList
182
        {
183
            get
184
            {
185
                if (_MarkupList_USER == null)
186
                {
187
                    _MarkupList_USER = new List<IKCOM.MarkupItemEx>();
188
                }
189

    
190
                return _MarkupList_USER;
191
            }
192
            set
193
            {
194

    
195
                _MarkupList_USER = value;
196
                OnPropertyChanged("_MarkupList_USER");
197
            }
198
        }
199

    
200
        private List<IKCOM.MarkupItemEx> _MarkupList_Pre { get; set; }
201
        public List<IKCOM.MarkupItemEx> MarkupList_Pre
202
        {
203
            get
204
            {
205
                if (_MarkupList_Pre == null)
206
                {
207
                    _MarkupList_Pre = new List<IKCOM.MarkupItemEx>();
208
                }
209

    
210
                return _MarkupList_Pre;
211
            }
212
            set
213
            {
214

    
215
                _MarkupList_Pre = value;
216
                OnPropertyChanged("MarkupList_Pre");
217
            }
218

    
219
        }
220

    
221
        private System.IO.FileInfo _searchPDF { get; set; }
222
        public System.IO.FileInfo searchPDF
223
        {
224
            get
225
            {
226
                return _searchPDF;
227
            }
228
            set
229
            {
230
                _searchPDF = value;
231
                OnPropertyChanged("searchPDF");
232
            }
233
        }
234

    
235

    
236
        /// <summary>
237
        /// 현재 상단 메뉴에서 선택된 컨트롤
238
        /// </summary>
239
        private string _SelectedControl { get; set; }
240
        public string SelectedControl
241
        {
242
            get
243
            {
244
                return _SelectedControl;
245
            }
246
            set
247
            {
248
                _SelectedControl = value;
249
                OnPropertyChanged("SelectedControl");
250
            }
251
        }
252

    
253

    
254
        /// <summary>
255
        /// 현재 상단 메뉴의 선 굵기값
256
        /// </summary>
257
        private double _LineSize { get; set; }
258
        public double LineSize
259
        {
260
            get
261
            {
262
                return _LineSize;
263
            }
264
            set
265
            {
266
                _LineSize = value;
267
                OnPropertyChanged("LineSize");
268
            }
269
        }
270

    
271
        private double _Interval { get; set; }
272
        public double Interval
273
        {
274
            get
275
            {
276
                return _Interval;
277
            }
278
            set
279
            {
280
                _Interval = value;
281
                OnPropertyChanged("Interval");
282
            }
283
        }
284
        private double _SaveInterval { get; set; }
285
        public double SaveInterval
286
        {
287
            get
288
            {
289
                return _SaveInterval;
290
            }
291
            set
292
            {
293
                _SaveInterval = value;
294
                OnPropertyChanged("SaveInterval");
295
            }
296
        }
297
        private double _ArcLength { get; set; }
298
        public double ArcLength
299
        {
300
            get
301
            {
302
                return _ArcLength;
303
            }
304
            set
305
            {
306
                _ArcLength = value;
307
                OnPropertyChanged("ArcLength");
308
            }
309
        }
310

    
311
        public bool IsPressShift
312
        {
313
            get
314
            {
315
                return ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Shift) == System.Windows.Input.ModifierKeys.Shift);
316
            }
317
        }
318

    
319
        public bool IsPressCtrl
320
        {
321
            get
322
            {
323
                return ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Control) == System.Windows.Input.ModifierKeys.Control);
324
            }
325
        }
326

    
327
        /// <summary>
328
        /// Dash 사이즈 
329
        /// </summary>
330
        private DoubleCollection _DashSize { get; set; }
331
        public DoubleCollection DashSize
332
        {
333
            get
334
            {
335
                return _DashSize;
336
            }
337
            set
338
            {
339
                _DashSize = value;
340
                OnPropertyChanged("DashSize");
341
            }
342
        }
343

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

    
358
        private string _CheckStatus { get; set; }
359
        public string CheckStatus
360
        {
361
            get
362
            {
363
                return _CheckStatus;
364
            }
365
            set
366
            {
367
                _CheckStatus = value;
368
                OnPropertyChanged("CheckStatus");
369
            }
370
        }
371

    
372

    
373

    
374
        //private bool _IsPageChanged { get; set; }
375
        //public bool IsPageChanged
376
        //{
377
        //    get
378
        //    {
379
        //        return _IsPageChanged;
380
        //    }
381
        //    set
382
        //    {
383
        //        _IsPageChanged = value;
384
        //        OnPropertyChanged("IsPageChanged");
385
        //    }
386
        //}
387

    
388

    
389

    
390
        ///// <summary>
391
        ///// 강인구 추가(Check List관련)
392
        ///// </summary>
393
        //public List<Check_Inferface> Check_Item
394
        //{
395
        //    get
396
        //    {
397
        //        return check_Item;
398
        //    }
399
        //}
400

    
401
        private bool _IsConsolidate { get; set; }
402
        public bool IsConsolidate
403
        {
404
            get
405
            {
406
                return _IsConsolidate;
407
            }
408
            set
409
            {
410
                _IsConsolidate = value;
411
                OnPropertyChanged("IsConsolidate");
412
            }
413
        }
414

    
415
        ////////////////////////////////////////////////
416

    
417

    
418
        #region Angle 관련
419
        private Visibility _AngleVisibility { get; set; }
420
        public Visibility AngleVisibility
421
        {
422
            get
423
            {
424
                return _AngleVisibility;
425
            }
426
            set
427
            {
428
                _AngleVisibility = value;
429
                OnPropertyChanged("AngleVisibility");
430
            }
431

    
432
        }
433
        private string _AngleValue { get; set; }
434
        public string AngleValue
435
        {
436
            get
437
            {
438
                return _AngleValue;
439
            }
440
            set
441
            {
442
                _AngleValue = value;
443
                OnPropertyChanged("AngleValue");
444
            }
445
        }
446

    
447
        private string _HelperContent { get; set; }
448
        public string HelperContent
449
        {
450
            get
451
            {
452
                return _HelperContent;
453
            }
454
            set
455
            {
456
                _HelperContent = value;
457
                OnPropertyChanged("HelperContent");
458
            }
459
        }
460

    
461
        private string _HelperHeader { get; set; }
462
        public string HelperHeader
463
        {
464
            get
465
            {
466
                return _HelperHeader;
467
            }
468
            set
469
            {
470
                _HelperHeader = value;
471
                OnPropertyChanged("HelperHeader");
472
            }
473
        }
474

    
475
        private bool _HelperExit { get; set; }
476
        public bool HelperExit
477
        {
478
            get
479
            {
480
                return _HelperExit;
481
            }
482
            set
483
            {
484
                _HelperExit = value;
485
                OnPropertyChanged("HelperExit");
486
            }
487
        }
488

    
489
        #endregion
490

    
491
        public ObservableCollection<CommentUserInfo> MarkupControls
492
        {
493
            get
494
            {
495
                return markupControls;
496
            }
497
        }
498

    
499
        public ObservableCollection<CommentUserInfo> MarkupControls_Sync
500
        {
501
            get
502
            {
503
                return markupControls_Sync;
504
            }
505
        }
506
        public int current_page_commentcnt = 0;
507
        public ObservableCollection<CommentUserInfo> MarkupControls_USER
508
        {
509
            get
510
            {
511
                return markupControls_User;
512
            }
513
        }
514

    
515
        public ObservableCollection<Undo_data> UndoDataList
516
        {
517
            get
518
            {
519
                return undoDataList;
520
            }
521
        }
522
        
523
        public StrokeCollection MarkupPens
524
        {
525
            get
526
            {
527
                return markupPens;
528
            }
529

    
530
        }
531

    
532
        #region 버튼 여부
533

    
534
        /// <summary>
535
        /// 상단 Fill 버튼이 클릭 되어있는지
536
        /// </summary>
537
        private bool _checkFillShape { get; set; }
538
        public bool checkFillShape
539
        {
540
            get
541
            {
542
                return _checkFillShape;
543
            }
544
            set
545
            {
546
                _checkFillShape = value;
547
                OnPropertyChanged("checkFillShape");
548
            }
549
        }
550

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

    
568
        private double _controlOpacity { get; set; }
569
        public double ControlOpacity
570
        {
571
            get
572
            {
573
                return _controlOpacity;
574
            }
575
            set
576
            {
577

    
578
                _controlOpacity = value;
579
                OnPropertyChanged("ControlOpacity");
580
            }
581
        }
582

    
583
        private MarkupToPDF.Controls.Common.PaintSet _paintSet { get; set; }
584
        public MarkupToPDF.Controls.Common.PaintSet paintSet
585
        {
586
            get
587
            {
588
                return _paintSet;
589
            }
590
            set
591
            {
592
                _paintSet = value;
593
                OnPropertyChanged("paintSet");
594
            }
595
        }
596

    
597
        /// <summary>
598
        /// 강인구 추가
599
        /// 상단 TextStyle 버튼이 클릭 되어있는지
600
        /// </summary>
601
        private bool _checkTextStyle { get; set; }
602
        public bool checkTextStyle
603
        {
604
            get
605
            {
606
                return _checkTextStyle;
607
            }
608
            set
609
            {
610
                _checkTextStyle = value;
611
                OnPropertyChanged("checkTextStyle");
612
            }
613
        }
614

    
615
        /// <summary>
616
        /// 강인구 추가
617
        /// 상단 TextWeight 버튼이 클릭 되어있는지
618
        /// </summary>
619
        private bool _checkTextWeight { get; set; }
620
        public bool checkTextWeight
621
        {
622
            get
623
            {
624
                return _checkTextWeight;
625
            }
626
            set
627
            {
628
                _checkTextWeight = value;
629
                OnPropertyChanged("checkTextWeight");
630
            }
631
        }
632

    
633
        /// <summary>
634
        /// 강인구 추가
635
        /// 상단 UnderLine 버튼이 클릭 되어있는지
636
        /// </summary>
637
        private bool _checkUnderLine { get; set; }
638
        public bool checkUnderLine
639
        {
640
            get
641
            {
642
                return _checkUnderLine;
643
            }
644
            set
645
            {
646
                _checkUnderLine = value;
647
                OnPropertyChanged("checkUnderLine");
648
            }
649
        }
650

    
651
        /// <summary>
652
        /// 상단 Hatch 버튼이 클릭 되어있는지
653
        /// </summary>
654
        private bool _checkHighShape { get; set; }
655
        public bool checkHighShape
656
        {
657
            get
658
            {
659
                return _checkHighShape;
660
            }
661
            set
662
            {
663
                _checkHighShape = value;
664
                OnPropertyChanged("checkHighShape");
665
            }
666
        }
667

    
668
        /// <summary>
669
        /// 상단 Axis 버튼이 클릭 되어있는지
670
        /// </summary>
671
        private bool _checkAxis { get; set; }
672
        public bool checkAxis
673
        {
674
            get
675
            {
676
                return _checkAxis;
677
            }
678
            set
679
            {
680
                _checkAxis = value;
681
                OnPropertyChanged("checkAxis");
682
            }
683
        }
684

    
685
        /// <summary>
686
        /// 상단 Highlight 버튼이 클릭 되어있는지
687
        /// </summary>
688
        private bool _checkHighlight { get; set; }
689
        public bool checkHighlight
690
        {
691
            get
692
            {
693
                return _checkHighlight;
694
            }
695
            set
696
            {
697
                _checkHighlight = value;
698
                OnPropertyChanged("checkHighlight");
699
            }
700
        }
701

    
702
        /// <summary>
703
        /// 강인구 추가
704
        /// 상단 TextWeight 버튼이 클릭 되어있는지
705
        /// </summary>
706
        private double _TextSize { get; set; }
707
        public double TextSize
708
        {
709
            get
710
            {
711
                return _TextSize;
712
            }
713
            set
714
            {
715
                _TextSize = value;
716
                OnPropertyChanged("TextSize");
717
            }
718
        }
719
        #endregion
720

    
721
        public ImageBrush BackgroundImage
722
        {
723
            get
724
            {
725
                return backgroundImage;
726
            }
727
            set
728
            {
729
                backgroundImage = value;
730
                OnPropertyChanged("BackgroundImage");
731
            }
732
        }
733

    
734
        public ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> Document_Info
735
        {
736
            get
737
            {
738
                return document_Info;
739
            }
740
        }
741

    
742
        public double ContentScale
743
        {
744
            get
745
            {
746
                return contentScale;
747
            }
748
            set
749
            {
750
                contentScale = value;
751

    
752
                double minOffsetX = 0.0;
753
                double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
754
                contentOffsetX = Math.Min(Math.Max(contentOffsetX, minOffsetX), maxOffsetX);
755

    
756
                double minOffsetY = 0.0;
757
                double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
758
                contentOffsetY = Math.Min(Math.Max(contentOffsetY, minOffsetY), maxOffsetY);
759

    
760
                OnPropertyChanged("ContentScale");
761
            }
762
        }
763

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

    
777
        public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoList
778
        {
779
            get
780
            {
781
                return markupInfoList;
782
            }
783
            set
784
            {
785
                markupInfoList = value;
786
                OnPropertyChanged("_markupInfoList");
787
            }
788
        }
789

    
790
        public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoRevList
791
        {
792
            get
793
            {
794
                return markupInfoRevList;
795
            }
796
            set
797
            {
798
                markupInfoRevList = value;
799
                OnPropertyChanged("_markupInfoRevList");
800
            }
801
        }
802

    
803
        public double ContentOffsetX
804
        {
805
            get
806
            {
807
                return contentOffsetX;
808
            }
809
            set
810
            {
811
                double minOffsetX = 0.0;
812
                double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
813
                contentOffsetX = Math.Min(Math.Max(value, minOffsetX), maxOffsetX);
814
                OnPropertyChanged("ContentOffsetX");
815
            }
816
        }
817

    
818
        public double ContentOffsetY
819
        {
820
            get
821
            {
822
                return contentOffsetY;
823
            }
824
            set
825
            {
826
                double minOffsetY = 0.0;
827
                double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
828
                contentOffsetY = Math.Min(Math.Max(value, minOffsetY), maxOffsetY);
829
                OnPropertyChanged("ContentOffsetY");
830
            }
831
        }
832

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

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

    
859
        public MessageCollection k_talkMessageSet
860
        {
861
            get
862
            {
863
                if (_k_talkMessageSet == null)
864
                {
865
                    _k_talkMessageSet = new MessageCollection();
866
                }
867
                return _k_talkMessageSet;
868
            }
869
            set
870
            {
871
                _k_talkMessageSet = value;
872
                OnPropertyChanged("k_talkMessageSet");
873
            }
874
        }
875

    
876
        public double ContentWidth
877
        {
878
            get
879
            {
880
                return contentWidth;
881
            }
882
            set
883
            {
884
                contentWidth = value;
885
                OnPropertyChanged("ContentWidth");
886
            }
887
        }
888

    
889
        public double ContentHeight
890
        {
891
            get
892
            {
893
                return contentHeight;
894
            }
895
            set
896
            {
897
                contentHeight = value;
898
                OnPropertyChanged("ContentHeight");
899
            }
900
        }
901

    
902
        public double ContentViewportWidth
903
        {
904
            get
905
            {
906
                return contentViewportWidth;
907
            }
908
            set
909
            {
910
                contentViewportWidth = value;
911
                OnPropertyChanged("ContentViewportWidth");
912
            }
913
        }
914

    
915
        public double ContentViewportHeight
916
        {
917
            get
918
            {
919
                return contentViewportHeight;
920
            }
921
            set
922
            {
923
                contentViewportHeight = value;
924
                OnPropertyChanged("ContentViewportHeight");
925
            }
926
        }
927

    
928
        public MainWindow SystemMain { get; set; }
929

    
930
        public double Angle
931
        {
932
            get
933
            {
934
                return angle;
935
            }
936
            set
937
            {
938
                angle = value;
939
                OnPropertyChanged("Angle");
940
            }
941
        }
942

    
943
        private bool _PageBalanceMode { get; set; }
944
        public bool PageBalanceMode
945
        {
946
            get
947
            {
948
                return _PageBalanceMode;
949
            }
950
            set
951
            {
952
                _PageBalanceMode = value;
953
                OnPropertyChanged("PageBalanceMode");
954
            }
955
        }
956

    
957
        private int _PageBalanceNumber { get; set; }
958
        public int PageBalanceNumber
959
        {
960
            get
961
            {
962
                return _PageBalanceNumber;
963
            }
964
            set
965
            {
966
                _PageBalanceNumber = value;
967
                OnPropertyChanged("PageBalanceNumber");
968
            }
969
        }
970

    
971
        private int _PageNumber { get; set; }
972
        public int PageNumber
973
        {
974
            get
975
            {
976
                return _PageNumber;
977
            }
978
            set
979
            {
980
                _PageNumber = value;
981
                OnPropertyChanged("PageNumber");
982
            }
983
        }
984

    
985
        public double AngleOffsetX
986
        {
987
            get
988
            {
989
                return angleOffsetX;
990
            }
991
            set
992
            {
993
                angleOffsetX = value;
994
                OnPropertyChanged("AngleOffsetX");
995
            }
996
        }
997

    
998
        public double AngleOffsetY
999
        {
1000
            get
1001
            {
1002
                return angleOffsetY;
1003
            }
1004
            set
1005
            {
1006
                angleOffsetY = value;
1007
                OnPropertyChanged("AngleOffsetY");
1008
            }
1009
        }
1010

    
1011
        //강인구 추가(체크리스트)
1012
        private string _CheckList_ID { get; set; }
1013
        public string CheckList_ID
1014
        {
1015
            get
1016
            {
1017
                return _CheckList_ID;
1018
            }
1019
            set
1020
            {
1021
                _CheckList_ID = value;
1022
                OnPropertyChanged("CheckList_ID");
1023
            }
1024
        }
1025
        //강인구 추가(캡쳐 모드)
1026
        private double _Capture_Opacity { get; set; }
1027
        public double Capture_Opacity
1028
        {
1029
            get
1030
            {
1031
                return _Capture_Opacity;
1032
            }
1033
            set
1034
            {
1035
                _Capture_Opacity = value;
1036
                OnPropertyChanged("Capture_Opacity");
1037
            }
1038
        }
1039

    
1040
        private Visibility _ViewVisible { get; set; }
1041
        public Visibility ViewVisible
1042
        {
1043
            get
1044
            {
1045
                return _ViewVisible;
1046
            }
1047
            set
1048
            {
1049
                _ViewVisible = value;
1050
                OnPropertyChanged("ViewVisible");
1051
            }
1052
        }
1053

    
1054
        private bool _IsSync { get; set; }
1055
        public bool IsSync
1056
        {
1057
            get
1058
            {
1059
                return _IsSync;
1060
            }
1061
            set
1062
            {
1063
                _IsSync = value;
1064
                OnPropertyChanged("IsSync");
1065
            }
1066
        }
1067

    
1068
        private System.Windows.Media.Imaging.BitmapImage _ImageViewPath;
1069
        public System.Windows.Media.Imaging.BitmapImage ImageViewPath
1070
        {
1071
            get
1072
            {
1073
                return _ImageViewPath;
1074
            }
1075
            set
1076
            {
1077
                _ImageViewPath = value;
1078
                OnPropertyChanged("ImageViewPath");
1079
            }
1080
        }
1081
        private double _ImageViewWidth { get; set; }
1082
        public double ImageViewWidth
1083
        {
1084
            get
1085
            {
1086
                return _ImageViewWidth;
1087
            }
1088
            set
1089
            {
1090
                _ImageViewWidth = value;
1091
                OnPropertyChanged("ImageViewWidth");
1092
            }
1093
        }
1094
        private double _ImageViewHeight { get; set; }
1095
        public double ImageViewHeight
1096
        {
1097
            get
1098
            {
1099
                return _ImageViewHeight;
1100
            }
1101
            set
1102
            {
1103
                _ImageViewHeight = value;
1104
                OnPropertyChanged("ImageViewHeight");
1105
            }
1106
        }
1107

    
1108
        private System.Windows.Media.Imaging.BitmapImage _ImageViewPath_C { get; set; }
1109
        public System.Windows.Media.Imaging.BitmapImage ImageViewPath_C
1110
        {
1111
            get
1112
            {
1113
                return _ImageViewPath_C;
1114
            }
1115
            set
1116
            {
1117
                _ImageViewPath_C = value;
1118
                OnPropertyChanged("ImageViewPath_C");
1119
            }
1120
        }
1121
        private double _ImageViewWidth_C { get; set; }
1122
        public double ImageViewWidth_C
1123
        {
1124
            get
1125
            {
1126
                return _ImageViewWidth_C;
1127
            }
1128
            set
1129
            {
1130
                _ImageViewWidth_C = value;
1131
                OnPropertyChanged("ImageViewWidth_C");
1132
            }
1133
        }
1134
        private double _ImageViewHeight_C { get; set; }
1135
        public double ImageViewHeight_C
1136
        {
1137
            get
1138
            {
1139
                return _ImageViewHeight_C;
1140
            }
1141
            set
1142
            {
1143
                _ImageViewHeight_C = value;
1144
                OnPropertyChanged("ImageViewHeight_C");
1145
            }
1146
        }
1147

    
1148

    
1149
        #endregion Property Member
1150

    
1151
        public System.IO.Stream GetStreamFromUrl(string url)
1152
        {
1153
            byte[] imageData = null;
1154

    
1155
            using (var wc = new System.Net.WebClient())
1156
                imageData = wc.DownloadData(url);
1157

    
1158
            return new System.IO.MemoryStream(imageData);
1159
        }
1160

    
1161
        public ViewerDataModel()
1162
        {
1163
            //rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
1164
            //rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
1165
            //rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
1166
            //rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
1167

    
1168
            //RectangleControl rect1 = new RectangleControl();
1169
            //rect1.StartPoint = new Point(50, 50);
1170
            //rect1.LeftBottomPoint = new Point(100, 50);
1171
            //rect1.TopRightPoint = new Point(50, 100);
1172
            //rect1.EndPoint = new Point(100, 100);
1173
            //rect1.FillColor = new SolidColorBrush(Colors.Red);
1174
            //rectangles.Add(rect1);
1175
            //
1176
            // Populate the data model with some example data.
1177
            //
1178
            //rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
1179
            //rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
1180
            //rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
1181
            //rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
1182

    
1183
            this.ControlOpacity = 1;
1184

    
1185
            /* Default
1186
             LineSize = 3, TextSize = 30, Interval = 10, ArcLength = 10, SaveInterval = 5
1187
            */            
1188
            this.LineSize = KCOM.Properties.Settings.Default.LineSize;
1189

    
1190
            this.TextSize = KCOM.Properties.Settings.Default.TextSize;
1191

    
1192
            this.Interval = KCOM.Properties.Settings.Default.Interval;
1193

    
1194
            this.ArcLength = KCOM.Properties.Settings.Default.ArcLength;
1195

    
1196
            this.DashSize = new DoubleCollection();
1197

    
1198
            this.SaveInterval = KCOM.Properties.Settings.Default.SaveInterval;
1199

    
1200
        }
1201

    
1202

    
1203
        public List<IKCOM.MarkupInfoItem> SelectedmarkupInfoItems { get; set; }
1204
       
1205
        #region INotifyPropertyChanged Event
1206

    
1207
        private void OnPropertyChanged(string name)
1208
        {
1209
            if (PropertyChanged != null)
1210
            {
1211
                PropertyChanged(this, new PropertyChangedEventArgs(name));
1212
            }
1213
        }
1214

    
1215
        public event PropertyChangedEventHandler PropertyChanged;
1216

    
1217
        #endregion
1218
    }
1219
}
클립보드 이미지 추가 (최대 크기: 500 MB)