프로젝트

일반

사용자정보

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

markus / KCOM / Common / ViewerDataModel.cs @ f87dfb18

이력 | 보기 | 이력해설 | 다운로드 (31.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.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 static ViewerDataModel Instance
99
        {
100
            get
101
            {
102
                return instance;
103
            }
104
        }
105

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

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

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

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

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

    
172
                return _MarkupList_MY;
173
            }
174
            set
175
            {
176

    
177
                _MarkupList_MY = value;
178
                OnPropertyChanged("MarkupList_MY");
179
            }
180
        }
181

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

    
192
                return _MarkupList_USER;
193
            }
194
            set
195
            {
196

    
197
                _MarkupList_USER = value;
198
                OnPropertyChanged("_MarkupList_USER");
199
            }
200
        }
201

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

    
212
                return _MarkupList_Pre;
213
            }
214
            set
215
            {
216

    
217
                _MarkupList_Pre = value;
218
                OnPropertyChanged("MarkupList_Pre");
219
            }
220

    
221
        }
222

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

    
237

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

    
255

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

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

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

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

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

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

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

    
374

    
375

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

    
390

    
391

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

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

    
417
        ////////////////////////////////////////////////
418

    
419

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

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

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

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

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

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

    
504
        #endregion
505

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

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

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

    
545
        }
546

    
547
        #region 버튼 여부
548

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

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

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

    
593
                _controlOpacity = value;
594
                OnPropertyChanged("ControlOpacity");
595
            }
596
        }
597

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

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

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

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

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

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

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

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

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

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

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

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

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

    
775
                OnPropertyChanged("ContentScale");
776
            }
777
        }
778

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

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

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

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

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

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

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

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

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

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

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

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

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

    
956
        public MainWindow SystemMain { get; set; }
957

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

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

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

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

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

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

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

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

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

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

    
1163

    
1164
        #endregion Property Member
1165

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

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

    
1173
            return new System.IO.MemoryStream(imageData);
1174
        }
1175

    
1176
        public ViewerDataModel()
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
            //RectangleControl rect1 = new RectangleControl();
1184
            //rect1.StartPoint = new Point(50, 50);
1185
            //rect1.LeftBottomPoint = new Point(100, 50);
1186
            //rect1.TopRightPoint = new Point(50, 100);
1187
            //rect1.EndPoint = new Point(100, 100);
1188
            //rect1.FillColor = new SolidColorBrush(Colors.Red);
1189
            //rectangles.Add(rect1);
1190
            //
1191
            // Populate the data model with some example data.
1192
            //
1193
            //rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
1194
            //rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
1195
            //rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
1196
            //rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
1197

    
1198
            this.ControlOpacity = 1;
1199

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

    
1205
            this.TextSize = KCOM.Properties.Settings.Default.TextSize;
1206

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

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

    
1211
            this.DashSize = new DoubleCollection();
1212

    
1213
            this.SaveInterval = KCOM.Properties.Settings.Default.SaveInterval;
1214
            this.AngleVisibility = Visibility.Collapsed;
1215
        }
1216

    
1217

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

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

    
1230
        public event PropertyChangedEventHandler PropertyChanged;
1231

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