프로젝트

일반

사용자정보

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

markus / KCOM / Common / ViewerDataModel.cs @ a1142a6b

이력 | 보기 | 이력해설 | 다운로드 (31.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.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<MarkupUserInfo> markupUserList = new ObservableCollection<MarkupUserInfo>();
48
        
49
        private ObservableCollection<IKCOM.MarkupInfoItem> markupInfoRevList = new ObservableCollection<IKCOM.MarkupInfoItem>();
50

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

    
56
        private StrokeCollection markupPens = new StrokeCollection();
57

    
58
        //private ObservableCollection<RectangleData> rectangles = new ObservableCollection<RectangleData>();
59

    
60

    
61
        private double contentScale = 1;
62

    
63
        private double contentOffsetY = 0;
64

    
65
        private double contentOffsetX = 0;
66

    
67
        private double Sync_contentScale = 1;
68

    
69
        private double Sync_contentOffsetY = 0;
70

    
71
        private double Sync_contentOffsetX = 0;
72

    
73
        private double contentViewportHeight = 0;
74

    
75
        private double contentViewportWidth = 0;
76

    
77
        private double contentWidth = 0;
78

    
79
        private MessageCollection _k_talkMessageSet;
80

    
81
        private double contentHeight = 0;
82

    
83
        private double angle = 0;
84

    
85
        private double angleOffsetX = 0;
86

    
87
        private double angleOffsetY = 0;
88

    
89
        private ImageBrush backgroundImage;
90

    
91
        //private RasterImage _rasterimage;
92

    
93

    
94
        #endregion Data Members
95

    
96
        #region Property Member
97

    
98
        public bool IsWheelPageChanage = false;
99

    
100
        public static ViewerDataModel Instance
101
        {
102
            get
103
            {
104
                return instance;
105
            }
106
        }
107

    
108
        private bool isDownloadOriginal;
109
        public bool IsDownloadOriginal
110
        {
111
            get => isDownloadOriginal;
112
            set
113
            {
114
                if (isDownloadOriginal != value)
115
                {
116
                    isDownloadOriginal = value;
117
                    OnPropertyChanged("IsDownloadOriginal");
118
                }
119
            }
120
        }
121

    
122
        private bool isDownloadCancel;
123
        public bool IsDownloadCancel
124
        {
125
            get => isDownloadCancel;
126
            set
127
            {
128
                if (isDownloadCancel != value)
129
                {
130
                    isDownloadCancel = value;
131
                    OnPropertyChanged("IsDownloadCancel");
132
                }
133
            }
134
        }
135

    
136
        private int downloadFileProgress;
137
        public int DownloadFileProgress
138
        {
139
            get => downloadFileProgress;
140
            set
141
            {
142
                if (downloadFileProgress != value)
143
                {
144
                    downloadFileProgress = value;
145
                    OnPropertyChanged("DownloadFileProgress");
146
                }
147
            }
148
        }
149

    
150
        private string originalTempFile;
151
        public string OriginalTempFile
152
        {
153
            get => originalTempFile;
154
            set
155
            {
156
                if (originalTempFile != value)
157
                {
158
                    originalTempFile = value;
159
                    OnPropertyChanged("OriginalTempFile");
160
                }
161
            }
162
        }
163

    
164
        private List<IKCOM.MarkupItemEx> _MarkupList_MY { get; set; }
165
        public List<IKCOM.MarkupItemEx> MarkupList_MY
166
        {
167
            get
168
            {
169
                if (_MarkupList_MY == null)
170
                {
171
                    _MarkupList_MY = new List<IKCOM.MarkupItemEx>();
172
                }
173

    
174
                return _MarkupList_MY;
175
            }
176
            set
177
            {
178

    
179
                _MarkupList_MY = value;
180
                OnPropertyChanged("MarkupList_MY");
181
            }
182
        }
183

    
184
        private List<IKCOM.MarkupItemEx> _MarkupList_USER { get; set; }
185
        public List<IKCOM.MarkupItemEx> MyMarkupList
186
        {
187
            get
188
            {
189
                if (_MarkupList_USER == null)
190
                {
191
                    _MarkupList_USER = new List<IKCOM.MarkupItemEx>();
192
                }
193

    
194
                return _MarkupList_USER;
195
            }
196
            set
197
            {
198

    
199
                _MarkupList_USER = value;
200
                OnPropertyChanged("_MarkupList_USER");
201
            }
202
        }
203

    
204
        private List<IKCOM.MarkupItemEx> _MarkupList_Pre { get; set; }
205
        public List<IKCOM.MarkupItemEx> MarkupList_Pre
206
        {
207
            get
208
            {
209
                if (_MarkupList_Pre == null)
210
                {
211
                    _MarkupList_Pre = new List<IKCOM.MarkupItemEx>();
212
                }
213

    
214
                return _MarkupList_Pre;
215
            }
216
            set
217
            {
218

    
219
                _MarkupList_Pre = value;
220
                OnPropertyChanged("MarkupList_Pre");
221
            }
222

    
223
        }
224

    
225
        private System.IO.FileInfo _searchPDF { get; set; }
226
        public System.IO.FileInfo searchPDF
227
        {
228
            get
229
            {
230
                return _searchPDF;
231
            }
232
            set
233
            {
234
                _searchPDF = value;
235
                OnPropertyChanged("searchPDF");
236
            }
237
        }
238

    
239

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

    
257

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

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

    
315
        public bool IsPressShift
316
        {
317
            get
318
            {
319
                return ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Shift) == System.Windows.Input.ModifierKeys.Shift);
320
            }
321
        }
322

    
323
        public bool IsPressCtrl
324
        {
325
            get
326
            {
327
                return ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Control) == System.Windows.Input.ModifierKeys.Control);
328
            }
329
        }
330

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

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

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

    
376

    
377

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

    
392

    
393

    
394
        ///// <summary>
395
        ///// 강인구 추가(Check List관련)
396
        ///// </summary>
397
        //public List<Check_Inferface> Check_Item
398
        //{
399
        //    get
400
        //    {
401
        //        return check_Item;
402
        //    }
403
        //}
404

    
405
        private bool _IsConsolidate { get; set; }
406
        public bool IsConsolidate
407
        {
408
            get
409
            {
410
                return _IsConsolidate;
411
            }
412
            set
413
            {
414
                _IsConsolidate = value;
415
                OnPropertyChanged("IsConsolidate");
416
            }
417
        }
418

    
419
        ////////////////////////////////////////////////
420

    
421

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

    
436
        }
437
        private string _AngleValue { get; set; }
438
        public string AngleValue
439
        {
440
            get
441
            {
442
                return _AngleValue;
443
            }
444
            set
445
            {
446
                _AngleValue = value;
447
                OnPropertyChanged("AngleValue");
448
            }
449
        }
450

    
451
        public double Angle
452
        {
453
            get
454
            {
455
                return angle;
456
            }
457
            set
458
            {
459
                angle = value;
460
                OnPropertyChanged("Angle");
461
            }
462
        }
463

    
464
        private string _HelperContent { get; set; }
465
        public string HelperContent
466
        {
467
            get
468
            {
469
                return _HelperContent;
470
            }
471
            set
472
            {
473
                _HelperContent = value;
474
                OnPropertyChanged("HelperContent");
475
            }
476
        }
477

    
478
        private string _HelperHeader { get; set; }
479
        public string HelperHeader
480
        {
481
            get
482
            {
483
                return _HelperHeader;
484
            }
485
            set
486
            {
487
                _HelperHeader = value;
488
                OnPropertyChanged("HelperHeader");
489
            }
490
        }
491

    
492
        private bool _HelperExit { get; set; }
493
        public bool HelperExit
494
        {
495
            get
496
            {
497
                return _HelperExit;
498
            }
499
            set
500
            {
501
                _HelperExit = value;
502
                OnPropertyChanged("HelperExit");
503
            }
504
        }
505

    
506
        #endregion
507

    
508
        public ObservableCollection<CommentUserInfo> MarkupControls
509
        {
510
            get
511
            {
512
                return markupControls;
513
            }
514
        }
515

    
516
        public ObservableCollection<CommentUserInfo> MarkupControls_Sync
517
        {
518
            get
519
            {
520
                return markupControls_Sync;
521
            }
522
        }
523
        public int current_page_commentcnt = 0;
524
        public ObservableCollection<CommentUserInfo> MarkupControls_USER
525
        {
526
            get
527
            {
528
                return markupControls_User;
529
            }
530
        }
531

    
532
        public ObservableCollection<Undo_data> UndoDataList
533
        {
534
            get
535
            {
536
                return undoDataList;
537
            }
538
        }
539
        
540
        public StrokeCollection MarkupPens
541
        {
542
            get
543
            {
544
                return markupPens;
545
            }
546

    
547
        }
548

    
549
        #region 버튼 여부
550

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

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

    
585
        private double _controlOpacity { get; set; }
586
        public double ControlOpacity
587
        {
588
            get
589
            {
590
                return _controlOpacity;
591
            }
592
            set
593
            {
594

    
595
                _controlOpacity = value;
596
                OnPropertyChanged("ControlOpacity");
597
            }
598
        }
599

    
600
        private MarkupToPDF.Controls.Common.PaintSet _paintSet { get; set; }
601
        public MarkupToPDF.Controls.Common.PaintSet paintSet
602
        {
603
            get
604
            {
605
                return _paintSet;
606
            }
607
            set
608
            {
609
                _paintSet = value;
610
                OnPropertyChanged("paintSet");
611
            }
612
        }
613

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

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

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

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

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

    
702
        /// <summary>
703
        /// 상단 Highlight 버튼이 클릭 되어있는지
704
        /// </summary>
705
        private bool _checkHighlight { get; set; }
706
        public bool checkHighlight
707
        {
708
            get
709
            {
710
                return _checkHighlight;
711
            }
712
            set
713
            {
714
                _checkHighlight = value;
715
                OnPropertyChanged("checkHighlight");
716
            }
717
        }
718

    
719
        /// <summary>
720
        /// 강인구 추가
721
        /// 상단 TextWeight 버튼이 클릭 되어있는지
722
        /// </summary>
723
        private double _TextSize { get; set; }
724
        public double TextSize
725
        {
726
            get
727
            {
728
                return _TextSize;
729
            }
730
            set
731
            {
732
                _TextSize = value;
733
                OnPropertyChanged("TextSize");
734
            }
735
        }
736
        #endregion
737

    
738
        public ImageBrush BackgroundImage
739
        {
740
            get
741
            {
742
                return backgroundImage;
743
            }
744
            set
745
            {
746
                backgroundImage = value;
747
                OnPropertyChanged("BackgroundImage");
748
            }
749
        }
750

    
751
        public ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> Document_Info
752
        {
753
            get
754
            {
755
                return document_Info;
756
            }
757
        }
758

    
759
        public double ContentScale
760
        {
761
            get
762
            {
763
                return contentScale;
764
            }
765
            set
766
            {
767
                contentScale = value;
768

    
769
                double minOffsetX = 0.0;
770
                double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
771
                contentOffsetX = Math.Min(Math.Max(contentOffsetX, minOffsetX), maxOffsetX);
772

    
773
                double minOffsetY = 0.0;
774
                double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
775
                contentOffsetY = Math.Min(Math.Max(contentOffsetY, minOffsetY), maxOffsetY);
776

    
777
                OnPropertyChanged("ContentScale");
778
            }
779
        }
780

    
781
        public double Sync_ContentScale
782
        {
783
            get
784
            {
785
                return Sync_contentScale;
786
            }
787
            set
788
            {
789
                Sync_contentScale = value;
790
                OnPropertyChanged("Sync_ContentScale");
791
            }
792
        }
793

    
794
        public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoList
795
        {
796
            get
797
            {
798
                return markupInfoList;
799
            }
800
            set
801
            {
802
                markupInfoList = value;
803
                OnPropertyChanged("_markupInfoList");
804
            }
805
        }
806

    
807
        public ObservableCollection<MarkupUserInfo> _markupUserList
808
        {
809
            get
810
            {
811
                return markupUserList;
812
            }
813
            set
814
            {
815
                markupUserList = value;
816
                OnPropertyChanged("_markupUserList");
817
            }
818
        }
819

    
820
        public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoRevList
821
        {
822
            get
823
            {
824
                return markupInfoRevList;
825
            }
826
            set
827
            {
828
                markupInfoRevList = value;
829
                OnPropertyChanged("_markupInfoRevList");
830
            }
831
        }
832

    
833
        public double ContentOffsetX
834
        {
835
            get
836
            {
837
                return contentOffsetX;
838
            }
839
            set
840
            {
841
                double minOffsetX = 0.0;
842
                double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
843
                contentOffsetX = Math.Min(Math.Max(value, minOffsetX), maxOffsetX);
844
                OnPropertyChanged("ContentOffsetX");
845
            }
846
        }
847

    
848
        public double ContentOffsetY
849
        {
850
            get
851
            {
852
                return contentOffsetY;
853
            }
854
            set
855
            {
856
                double minOffsetY = 0.0;
857
                double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
858
                contentOffsetY = Math.Min(Math.Max(value, minOffsetY), maxOffsetY);
859
                OnPropertyChanged("ContentOffsetY");
860
            }
861
        }
862

    
863
        public double Sync_ContentOffsetX
864
        {
865
            get
866
            {
867
                return Sync_contentOffsetX;
868
            }
869
            set
870
            {
871
                Sync_contentOffsetX = value;
872
                OnPropertyChanged("Sync_ContentOffsetX");
873
            }
874
        }
875

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

    
889
        public MessageCollection k_talkMessageSet
890
        {
891
            get
892
            {
893
                if (_k_talkMessageSet == null)
894
                {
895
                    _k_talkMessageSet = new MessageCollection();
896
                }
897
                return _k_talkMessageSet;
898
            }
899
            set
900
            {
901
                _k_talkMessageSet = value;
902
                OnPropertyChanged("k_talkMessageSet");
903
            }
904
        }
905

    
906
        public double ContentWidth
907
        {
908
            get
909
            {
910
                return contentWidth;
911
            }
912
            set
913
            {
914
                contentWidth = value;
915
                OnPropertyChanged("ContentWidth");
916
            }
917
        }
918

    
919
        public double ContentHeight
920
        {
921
            get
922
            {
923
                return contentHeight;
924
            }
925
            set
926
            {
927
                contentHeight = value;
928
                OnPropertyChanged("ContentHeight");
929
            }
930
        }
931

    
932
        public double ContentViewportWidth
933
        {
934
            get
935
            {
936
                return contentViewportWidth;
937
            }
938
            set
939
            {
940
                contentViewportWidth = value;
941
                OnPropertyChanged("ContentViewportWidth");
942
            }
943
        }
944

    
945
        public double ContentViewportHeight
946
        {
947
            get
948
            {
949
                return contentViewportHeight;
950
            }
951
            set
952
            {
953
                contentViewportHeight = value;
954
                OnPropertyChanged("ContentViewportHeight");
955
            }
956
        }
957

    
958
        public MainWindow SystemMain { get; set; }
959

    
960
        private bool _PageBalanceMode { get; set; }
961
        public bool PageBalanceMode
962
        {
963
            get
964
            {
965
                return _PageBalanceMode;
966
            }
967
            set
968
            {
969
                _PageBalanceMode = value;
970
                OnPropertyChanged("PageBalanceMode");
971
            }
972
        }
973

    
974
        private int _PageBalanceNumber { get; set; }
975
        public int PageBalanceNumber
976
        {
977
            get
978
            {
979
                return _PageBalanceNumber;
980
            }
981
            set
982
            {
983
                _PageBalanceNumber = value;
984
                OnPropertyChanged("PageBalanceNumber");
985
            }
986
        }
987

    
988
        private int _PageNumber { get; set; }
989
        public int PageNumber
990
        {
991
            get
992
            {
993
                return _PageNumber;
994
            }
995
            set
996
            {
997
                _PageNumber = value;
998
                OnPropertyChanged("PageNumber");
999
            }
1000
        }
1001

    
1002
        public double AngleOffsetX
1003
        {
1004
            get
1005
            {
1006
                return angleOffsetX;
1007
            }
1008
            set
1009
            {
1010
                angleOffsetX = value;
1011
                OnPropertyChanged("AngleOffsetX");
1012
            }
1013
        }
1014

    
1015
        public double AngleOffsetY
1016
        {
1017
            get
1018
            {
1019
                return angleOffsetY;
1020
            }
1021
            set
1022
            {
1023
                angleOffsetY = value;
1024
                OnPropertyChanged("AngleOffsetY");
1025
            }
1026
        }
1027

    
1028
        //강인구 추가(체크리스트)
1029
        private string _CheckList_ID { get; set; }
1030
        public string CheckList_ID
1031
        {
1032
            get
1033
            {
1034
                return _CheckList_ID;
1035
            }
1036
            set
1037
            {
1038
                _CheckList_ID = value;
1039
                OnPropertyChanged("CheckList_ID");
1040
            }
1041
        }
1042
        //강인구 추가(캡쳐 모드)
1043
        private double _Capture_Opacity { get; set; }
1044
        public double Capture_Opacity
1045
        {
1046
            get
1047
            {
1048
                return _Capture_Opacity;
1049
            }
1050
            set
1051
            {
1052
                _Capture_Opacity = value;
1053
                OnPropertyChanged("Capture_Opacity");
1054
            }
1055
        }
1056

    
1057
        private Visibility _ViewVisible { get; set; }
1058
        public Visibility ViewVisible
1059
        {
1060
            get
1061
            {
1062
                return _ViewVisible;
1063
            }
1064
            set
1065
            {
1066
                _ViewVisible = value;
1067
                OnPropertyChanged("ViewVisible");
1068
            }
1069
        }
1070

    
1071
        private bool _IsSync { get; set; }
1072
        public bool IsSync
1073
        {
1074
            get
1075
            {
1076
                return _IsSync;
1077
            }
1078
            set
1079
            {
1080
                _IsSync = value;
1081
                OnPropertyChanged("IsSync");
1082
            }
1083
        }
1084

    
1085
        private System.Windows.Media.Imaging.BitmapImage _ImageViewPath;
1086
        public System.Windows.Media.Imaging.BitmapImage ImageViewPath
1087
        {
1088
            get
1089
            {
1090
                return _ImageViewPath;
1091
            }
1092
            set
1093
            {
1094
                _ImageViewPath = value;
1095
                OnPropertyChanged("ImageViewPath");
1096
            }
1097
        }
1098
        private double _ImageViewWidth { get; set; }
1099
        public double ImageViewWidth
1100
        {
1101
            get
1102
            {
1103
                return _ImageViewWidth;
1104
            }
1105
            set
1106
            {
1107
                _ImageViewWidth = value;
1108
                OnPropertyChanged("ImageViewWidth");
1109
            }
1110
        }
1111
        private double _ImageViewHeight { get; set; }
1112
        public double ImageViewHeight
1113
        {
1114
            get
1115
            {
1116
                return _ImageViewHeight;
1117
            }
1118
            set
1119
            {
1120
                _ImageViewHeight = value;
1121
                OnPropertyChanged("ImageViewHeight");
1122
            }
1123
        }
1124

    
1125
        private System.Windows.Media.Imaging.BitmapImage _ImageViewPath_C { get; set; }
1126
        public System.Windows.Media.Imaging.BitmapImage ImageViewPath_C
1127
        {
1128
            get
1129
            {
1130
                return _ImageViewPath_C;
1131
            }
1132
            set
1133
            {
1134
                _ImageViewPath_C = value;
1135
                OnPropertyChanged("ImageViewPath_C");
1136
            }
1137
        }
1138
        private double _ImageViewWidth_C { get; set; }
1139
        public double ImageViewWidth_C
1140
        {
1141
            get
1142
            {
1143
                return _ImageViewWidth_C;
1144
            }
1145
            set
1146
            {
1147
                _ImageViewWidth_C = value;
1148
                OnPropertyChanged("ImageViewWidth_C");
1149
            }
1150
        }
1151
        private double _ImageViewHeight_C { get; set; }
1152
        public double ImageViewHeight_C
1153
        {
1154
            get
1155
            {
1156
                return _ImageViewHeight_C;
1157
            }
1158
            set
1159
            {
1160
                _ImageViewHeight_C = value;
1161
                OnPropertyChanged("ImageViewHeight_C");
1162
            }
1163
        }
1164

    
1165

    
1166
        #endregion Property Member
1167

    
1168
        public System.IO.Stream GetStreamFromUrl(string url)
1169
        {
1170
            byte[] imageData = null;
1171

    
1172
            using (var wc = new System.Net.WebClient())
1173
                imageData = wc.DownloadData(url);
1174

    
1175
            return new System.IO.MemoryStream(imageData);
1176
        }
1177

    
1178
        public ViewerDataModel()
1179
        {
1180
            //rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
1181
            //rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
1182
            //rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
1183
            //rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
1184

    
1185
            //RectangleControl rect1 = new RectangleControl();
1186
            //rect1.StartPoint = new Point(50, 50);
1187
            //rect1.LeftBottomPoint = new Point(100, 50);
1188
            //rect1.TopRightPoint = new Point(50, 100);
1189
            //rect1.EndPoint = new Point(100, 100);
1190
            //rect1.FillColor = new SolidColorBrush(Colors.Red);
1191
            //rectangles.Add(rect1);
1192
            //
1193
            // Populate the data model with some example data.
1194
            //
1195
            //rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
1196
            //rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
1197
            //rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
1198
            //rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
1199

    
1200
            this.ControlOpacity = 1;
1201

    
1202
            /* Default
1203
             LineSize = 3, TextSize = 30, Interval = 10, ArcLength = 10, SaveInterval = 5
1204
            */            
1205
            this.LineSize = KCOM.Properties.Settings.Default.LineSize;
1206

    
1207
            this.TextSize = KCOM.Properties.Settings.Default.TextSize;
1208

    
1209
            this.Interval = KCOM.Properties.Settings.Default.Interval;
1210

    
1211
            this.ArcLength = KCOM.Properties.Settings.Default.ArcLength;
1212

    
1213
            this.DashSize = new DoubleCollection();
1214

    
1215
            this.SaveInterval = KCOM.Properties.Settings.Default.SaveInterval;
1216
            this.AngleVisibility = Visibility.Collapsed;
1217
        }
1218

    
1219

    
1220
        public List<IKCOM.MarkupInfoItem> SelectedmarkupInfoItems { get; set; }
1221
       
1222
        #region INotifyPropertyChanged Event
1223

    
1224
        private void OnPropertyChanged(string name)
1225
        {
1226
            if (PropertyChanged != null)
1227
            {
1228
                PropertyChanged(this, new PropertyChangedEventArgs(name));
1229
            }
1230
        }
1231

    
1232
        public event PropertyChangedEventHandler PropertyChanged;
1233

    
1234
        #endregion
1235
    }
1236
}
클립보드 이미지 추가 (최대 크기: 500 MB)