프로젝트

일반

사용자정보

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

markus / KCOM / Common / ViewerDataModel.cs @ b9df9ab0

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

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

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

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

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

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

    
36

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

    
44

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

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

    
53
        private StrokeCollection markupPens = new StrokeCollection();
54

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

    
57

    
58
        private double contentScale = 1;
59

    
60
        private double contentOffsetY = 0;
61

    
62
        private double contentOffsetX = 0;
63

    
64
        private double Sync_contentScale = 1;
65

    
66
        private double Sync_contentOffsetY = 0;
67

    
68
        private double Sync_contentOffsetX = 0;
69

    
70
        private double contentViewportHeight = 0;
71

    
72
        private double contentViewportWidth = 0;
73

    
74
        private double contentWidth = 0;
75

    
76
        private MessageCollection _k_talkMessageSet;
77

    
78
        private double contentHeight = 0;
79

    
80
        private double angle = 0;
81

    
82
        private double pageAngle = 0;
83

    
84
        private double angleOffsetX = 0;
85

    
86
        private double angleOffsetY = 0;
87

    
88
        private ImageBrush backgroundImage;
89

    
90
        // ViewModel.RequirementViewModel에서 페이지가 모두 로딩되는 시점을 가져오기 위해서 추가
91
        // 김태성 
92
        #region   
93

    
94
        public event EventHandler<EventArgs> OnLoadPaged;
95

    
96
        public void OnLoadPage()
97
        {
98
            if(OnLoadPaged != null)
99
            {
100
                OnLoadPaged(this, new EventArgs());
101
            }
102
        }
103
        #endregion
104

    
105
        //private RasterImage _rasterimage;
106

    
107

    
108
        #endregion Data Members
109

    
110
        #region Property Member
111

    
112
        public static ViewerDataModel Instance
113
        {
114
            get
115
            {
116
                return instance;
117
            }
118
        }
119

    
120
        private List<IKCOM.MarkupItemEx> _MarkupList_MY { get; set; }
121
        public List<IKCOM.MarkupItemEx> MarkupList_MY
122
        {
123
            get
124
            {
125
                if (_MarkupList_MY == null)
126
                {
127
                    _MarkupList_MY = new List<IKCOM.MarkupItemEx>();
128
                }
129

    
130
                return _MarkupList_MY;
131
            }
132
            set
133
            {
134

    
135
                _MarkupList_MY = value;
136
                OnPropertyChanged("MarkupList_MY");
137
            }
138
        }
139

    
140
        private List<IKCOM.MarkupItemEx> _MarkupList_USER { get; set; }
141
        public List<IKCOM.MarkupItemEx> MyMarkupList
142
        {
143
            get
144
            {
145
                if (_MarkupList_USER == null)
146
                {
147
                    _MarkupList_USER = new List<IKCOM.MarkupItemEx>();
148
                }
149

    
150
                return _MarkupList_USER;
151
            }
152
            set
153
            {
154

    
155
                _MarkupList_USER = value;
156
                OnPropertyChanged("_MarkupList_USER");
157
            }
158
        }
159

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

    
170
                return _MarkupList_Pre;
171
            }
172
            set
173
            {
174

    
175
                _MarkupList_Pre = value;
176
                OnPropertyChanged("MarkupList_Pre");
177
            }
178

    
179
        }
180

    
181
        private System.IO.FileInfo _searchPDF { get; set; }
182
        public System.IO.FileInfo searchPDF
183
        {
184
            get
185
            {
186
                return _searchPDF;
187
            }
188
            set
189
            {
190
                _searchPDF = value;
191
                OnPropertyChanged("searchPDF");
192
            }
193
        }
194

    
195

    
196
        /// <summary>
197
        /// 현재 상단 메뉴에서 선택된 컨트롤
198
        /// </summary>
199
        private string _SelectedControl { get; set; }
200
        public string SelectedControl
201
        {
202
            get
203
            {
204
                return _SelectedControl;
205
            }
206
            set
207
            {
208
                _SelectedControl = value;
209
                OnPropertyChanged("SelectedControl");
210
            }
211
        }
212

    
213

    
214
        /// <summary>
215
        /// 현재 상단 메뉴의 선 굵기값
216
        /// </summary>
217
        private double _LineSize { get; set; }
218
        public double LineSize
219
        {
220
            get
221
            {
222
                return _LineSize;
223
            }
224
            set
225
            {
226
                _LineSize = value;
227
                OnPropertyChanged("LineSize");
228
            }
229
        }
230

    
231
        private double _Interval { get; set; }
232
        public double Interval
233
        {
234
            get
235
            {
236
                return _Interval;
237
            }
238
            set
239
            {
240
                _Interval = value;
241
                OnPropertyChanged("Interval");
242
            }
243
        }
244
        private double _SaveInterval { get; set; }
245
        public double SaveInterval
246
        {
247
            get
248
            {
249
                return _SaveInterval;
250
            }
251
            set
252
            {
253
                _SaveInterval = value;
254
                OnPropertyChanged("SaveInterval");
255
            }
256
        }
257
        private double _ArcLength { get; set; }
258
        public double ArcLength
259
        {
260
            get
261
            {
262
                return _ArcLength;
263
            }
264
            set
265
            {
266
                _ArcLength = value;
267
                OnPropertyChanged("ArcLength");
268
            }
269
        }
270

    
271
        public bool IsPressShift
272
        {
273
            get
274
            {
275
                return ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Shift) == System.Windows.Input.ModifierKeys.Shift);
276
            }
277
        }
278

    
279
        public bool IsPressCtrl
280
        {
281
            get
282
            {
283
                return ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Control) == System.Windows.Input.ModifierKeys.Control);
284
            }
285
        }
286

    
287
        /// <summary>
288
        /// Dash 사이즈 
289
        /// </summary>
290
        private DoubleCollection _DashSize { get; set; }
291
        public DoubleCollection DashSize
292
        {
293
            get
294
            {
295
                return _DashSize;
296
            }
297
            set
298
            {
299
                _DashSize = value;
300
                OnPropertyChanged("DashSize");
301
            }
302
        }
303

    
304
        private string _ControlTag { get; set; }
305
        public string ControlTag
306
        {
307
            get
308
            {
309
                return _ControlTag;
310
            }
311
            set
312
            {
313
                _ControlTag = value;
314
                OnPropertyChanged("ControlTag");
315
            }
316
        }
317

    
318
        private string _CheckStatus { get; set; }
319
        public string CheckStatus
320
        {
321
            get
322
            {
323
                return _CheckStatus;
324
            }
325
            set
326
            {
327
                _CheckStatus = value;
328
                OnPropertyChanged("CheckStatus");
329
            }
330
        }
331

    
332

    
333

    
334
        //private bool _IsPageChanged { get; set; }
335
        //public bool IsPageChanged
336
        //{
337
        //    get
338
        //    {
339
        //        return _IsPageChanged;
340
        //    }
341
        //    set
342
        //    {
343
        //        _IsPageChanged = value;
344
        //        OnPropertyChanged("IsPageChanged");
345
        //    }
346
        //}
347

    
348

    
349

    
350
        ///// <summary>
351
        ///// 강인구 추가(Check List관련)
352
        ///// </summary>
353
        //public List<Check_Inferface> Check_Item
354
        //{
355
        //    get
356
        //    {
357
        //        return check_Item;
358
        //    }
359
        //}
360

    
361
        private bool _IsConsolidate { get; set; }
362
        public bool IsConsolidate
363
        {
364
            get
365
            {
366
                return _IsConsolidate;
367
            }
368
            set
369
            {
370
                _IsConsolidate = value;
371
                OnPropertyChanged("IsConsolidate");
372
            }
373
        }
374

    
375
        ////////////////////////////////////////////////
376

    
377

    
378
        #region Angle 관련
379
        private Visibility _AngleVisibility;
380

    
381
        public Visibility AngleVisibility
382
        {
383
            get
384
            {
385
                return _AngleVisibility;
386
            }
387
            set
388
            {
389
                _AngleVisibility = value;
390
                OnPropertyChanged("AngleVisibility");
391
            }
392

    
393
        }
394
        private string _AngleValue { get; set; }
395
        public string AngleValue
396
        {
397
            get
398
            {
399
                return _AngleValue;
400
            }
401
            set
402
            {
403
                _AngleValue = value;
404
                OnPropertyChanged("AngleValue");
405
            }
406
        }
407

    
408
        private string _HelperContent { get; set; }
409
        public string HelperContent
410
        {
411
            get
412
            {
413
                return _HelperContent;
414
            }
415
            set
416
            {
417
                _HelperContent = value;
418
                OnPropertyChanged("HelperContent");
419
            }
420
        }
421

    
422
        private string _HelperHeader { get; set; }
423
        public string HelperHeader
424
        {
425
            get
426
            {
427
                return _HelperHeader;
428
            }
429
            set
430
            {
431
                _HelperHeader = value;
432
                OnPropertyChanged("HelperHeader");
433
            }
434
        }
435

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

    
450
        #endregion
451

    
452
        public ObservableCollection<CommentUserInfo> MarkupControls
453
        {
454
            get
455
            {
456
                return markupControls;
457
            }
458
        }
459

    
460
        public ObservableCollection<CommentUserInfo> MarkupControls_Sync
461
        {
462
            get
463
            {
464
                return markupControls_Sync;
465
            }
466
        }
467
        public int current_page_commentcnt = 0;
468
        public ObservableCollection<CommentUserInfo> MarkupControls_USER
469
        {
470
            get
471
            {
472
                return markupControls_User;
473
            }
474
        }
475

    
476
        public ObservableCollection<Undo_data> UndoDataList
477
        {
478
            get
479
            {
480
                return undoDataList;
481
            }
482
        }
483
        
484
        public StrokeCollection MarkupPens
485
        {
486
            get
487
            {
488
                return markupPens;
489
            }
490

    
491
        }
492

    
493
        #region 버튼 여부
494

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

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

    
529
        private double _controlOpacity { get; set; }
530
        public double ControlOpacity
531
        {
532
            get
533
            {
534
                return _controlOpacity;
535
            }
536
            set
537
            {
538

    
539
                _controlOpacity = value;
540
                OnPropertyChanged("ControlOpacity");
541
            }
542
        }
543

    
544
        private MarkupToPDF.Controls.Common.PaintSet _paintSet { get; set; }
545
        public MarkupToPDF.Controls.Common.PaintSet paintSet
546
        {
547
            get
548
            {
549
                return _paintSet;
550
            }
551
            set
552
            {
553
                _paintSet = value;
554
                OnPropertyChanged("paintSet");
555
            }
556
        }
557

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

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

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

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

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

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

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

    
682
        public ImageBrush BackgroundImage
683
        {
684
            get
685
            {
686
                return backgroundImage;
687
            }
688
            set
689
            {
690
                backgroundImage = value;
691
                OnPropertyChanged("BackgroundImage");
692
            }
693
        }
694

    
695
        public ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> Document_Info
696
        {
697
            get
698
            {
699
                return document_Info;
700
            }
701
        }
702

    
703
        public double ContentScale
704
        {
705
            get
706
            {
707
                return contentScale;
708
            }
709
            set
710
            {
711
                contentScale = value;
712

    
713
                double minOffsetX = 0.0;
714
                double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
715
                contentOffsetX = Math.Min(Math.Max(contentOffsetX, minOffsetX), maxOffsetX);
716

    
717
                double minOffsetY = 0.0;
718
                double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
719
                contentOffsetY = Math.Min(Math.Max(contentOffsetY, minOffsetY), maxOffsetY);
720

    
721
                OnPropertyChanged("ContentScale");
722
            }
723
        }
724

    
725
        public double Sync_ContentScale
726
        {
727
            get
728
            {
729
                return Sync_contentScale;
730
            }
731
            set
732
            {
733
                Sync_contentScale = value;
734
                OnPropertyChanged("Sync_ContentScale");
735
            }
736
        }
737

    
738
        public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoList
739
        {
740
            get
741
            {
742
                return markupInfoList;
743
            }
744
            set
745
            {
746
                markupInfoList = value;
747
                OnPropertyChanged("_markupInfoList");
748
            }
749
        }
750

    
751
        public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoRevList
752
        {
753
            get
754
            {
755
                return markupInfoRevList;
756
            }
757
            set
758
            {
759
                markupInfoRevList = value;
760
                OnPropertyChanged("_markupInfoRevList");
761
            }
762
        }
763

    
764
        public double ContentOffsetX
765
        {
766
            get
767
            {
768
                return contentOffsetX;
769
            }
770
            set
771
            {
772
                double minOffsetX = 0.0;
773
                double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
774
                contentOffsetX = Math.Min(Math.Max(value, minOffsetX), maxOffsetX);
775
                OnPropertyChanged("ContentOffsetX");
776
            }
777
        }
778

    
779
        public double ContentOffsetY
780
        {
781
            get
782
            {
783
                return contentOffsetY;
784
            }
785
            set
786
            {
787
                double minOffsetY = 0.0;
788
                double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
789
                contentOffsetY = Math.Min(Math.Max(value, minOffsetY), maxOffsetY);
790
                OnPropertyChanged("ContentOffsetY");
791
            }
792
        }
793

    
794
        public double Sync_ContentOffsetX
795
        {
796
            get
797
            {
798
                return Sync_contentOffsetX;
799
            }
800
            set
801
            {
802
                Sync_contentOffsetX = value;
803
                OnPropertyChanged("Sync_ContentOffsetX");
804
            }
805
        }
806

    
807
        public double Sync_ContentOffsetY
808
        {
809
            get
810
            {
811
                return Sync_contentOffsetY;
812
            }
813
            set
814
            {
815
                Sync_contentOffsetY = value;
816
                OnPropertyChanged("Sync_ContentOffsetY");
817
            }
818
        }
819

    
820
        public MessageCollection k_talkMessageSet
821
        {
822
            get
823
            {
824
                if (_k_talkMessageSet == null)
825
                {
826
                    _k_talkMessageSet = new MessageCollection();
827
                }
828
                return _k_talkMessageSet;
829
            }
830
            set
831
            {
832
                _k_talkMessageSet = value;
833
                OnPropertyChanged("k_talkMessageSet");
834
            }
835
        }
836

    
837
        public double ContentWidth
838
        {
839
            get
840
            {
841
                return contentWidth;
842
            }
843
            set
844
            {
845
                contentWidth = value;
846
                OnPropertyChanged("ContentWidth");
847
            }
848
        }
849

    
850
        public double ContentHeight
851
        {
852
            get
853
            {
854
                return contentHeight;
855
            }
856
            set
857
            {
858
                contentHeight = value;
859
                OnPropertyChanged("ContentHeight");
860
            }
861
        }
862

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

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

    
889
        public MainWindow SystemMain { get; set; }
890

    
891
        public double Angle
892
        {
893
            get
894
            {
895
                return angle;
896
            }
897
            set
898
            {
899
                angle = value;
900
                OnPropertyChanged("Angle");
901
            }
902
        }
903

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

    
917
        private bool _PageBalanceMode { get; set; }
918
        public bool PageBalanceMode
919
        {
920
            get
921
            {
922
                return _PageBalanceMode;
923
            }
924
            set
925
            {
926
                _PageBalanceMode = value;
927
                OnPropertyChanged("PageBalanceMode");
928
            }
929
        }
930

    
931
        private int _PageBalanceNumber { get; set; }
932
        public int PageBalanceNumber
933
        {
934
            get
935
            {
936
                return _PageBalanceNumber;
937
            }
938
            set
939
            {
940
                _PageBalanceNumber = value;
941
                OnPropertyChanged("PageBalanceNumber");
942
            }
943
        }
944

    
945
        private int _PageNumber { get; set; }
946
        public int PageNumber
947
        {
948
            get
949
            {
950
                return _PageNumber;
951
            }
952
            set
953
            {
954
                _PageNumber = value;
955
                OnPropertyChanged("PageNumber");
956
            }
957
        }
958

    
959
        public double AngleOffsetX
960
        {
961
            get
962
            {
963
                return angleOffsetX;
964
            }
965
            set
966
            {
967
                angleOffsetX = value;
968
                OnPropertyChanged("AngleOffsetX");
969
            }
970
        }
971

    
972
        public double AngleOffsetY
973
        {
974
            get
975
            {
976
                return angleOffsetY;
977
            }
978
            set
979
            {
980
                angleOffsetY = value;
981
                OnPropertyChanged("AngleOffsetY");
982
            }
983
        }
984

    
985
        //강인구 추가(체크리스트)
986
        private string _CheckList_ID { get; set; }
987
        public string CheckList_ID
988
        {
989
            get
990
            {
991
                return _CheckList_ID;
992
            }
993
            set
994
            {
995
                _CheckList_ID = value;
996
                OnPropertyChanged("CheckList_ID");
997
            }
998
        }
999
        //강인구 추가(캡쳐 모드)
1000
        private double _Capture_Opacity { get; set; }
1001
        public double Capture_Opacity
1002
        {
1003
            get
1004
            {
1005
                return _Capture_Opacity;
1006
            }
1007
            set
1008
            {
1009
                _Capture_Opacity = value;
1010
                OnPropertyChanged("Capture_Opacity");
1011
            }
1012
        }
1013

    
1014
        private Visibility _ViewVisible { get; set; }
1015
        public Visibility ViewVisible
1016
        {
1017
            get
1018
            {
1019
                return _ViewVisible;
1020
            }
1021
            set
1022
            {
1023
                _ViewVisible = value;
1024
                OnPropertyChanged("ViewVisible");
1025
            }
1026
        }
1027

    
1028
        private bool _IsSync { get; set; }
1029
        public bool IsSync
1030
        {
1031
            get
1032
            {
1033
                return _IsSync;
1034
            }
1035
            set
1036
            {
1037
                _IsSync = value;
1038
                OnPropertyChanged("IsSync");
1039
            }
1040
        }
1041

    
1042
        private System.Windows.Media.Imaging.BitmapImage _ImageViewPath;
1043
        public System.Windows.Media.Imaging.BitmapImage ImageViewPath
1044
        {
1045
            get
1046
            {
1047
                return _ImageViewPath;
1048
            }
1049
            set
1050
            {
1051
                _ImageViewPath = value;
1052
                OnPropertyChanged("ImageViewPath");
1053
            }
1054
        }
1055
        private double _ImageViewWidth { get; set; }
1056
        public double ImageViewWidth
1057
        {
1058
            get
1059
            {
1060
                return _ImageViewWidth;
1061
            }
1062
            set
1063
            {
1064
                _ImageViewWidth = value;
1065
                OnPropertyChanged("ImageViewWidth");
1066
            }
1067
        }
1068
        private double _ImageViewHeight { get; set; }
1069
        public double ImageViewHeight
1070
        {
1071
            get
1072
            {
1073
                return _ImageViewHeight;
1074
            }
1075
            set
1076
            {
1077
                _ImageViewHeight = value;
1078
                OnPropertyChanged("ImageViewHeight");
1079
            }
1080
        }
1081

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

    
1122

    
1123
        #endregion Property Member
1124

    
1125
        public System.IO.Stream GetStreamFromUrl(string url)
1126
        {
1127
            byte[] imageData = null;
1128

    
1129
            using (var wc = new System.Net.WebClient())
1130
                imageData = wc.DownloadData(url);
1131

    
1132
            return new System.IO.MemoryStream(imageData);
1133
        }
1134
        
1135
        public void GoToPage(int PageNumber)
1136
        {
1137
            SystemMain.dzMainMenu.pageNavigator.GotoPage(PageNumber);
1138

    
1139
            SystemMain.dzMainMenu.pageNavigator.PageChanged += (snd, evt) =>
1140
            {
1141

    
1142
            };
1143
        }
1144

    
1145
        public ViewerDataModel()
1146
        {
1147
            //rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
1148
            //rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
1149
            //rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
1150
            //rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
1151

    
1152
            //RectangleControl rect1 = new RectangleControl();
1153
            //rect1.StartPoint = new Point(50, 50);
1154
            //rect1.LeftBottomPoint = new Point(100, 50);
1155
            //rect1.TopRightPoint = new Point(50, 100);
1156
            //rect1.EndPoint = new Point(100, 100);
1157
            //rect1.FillColor = new SolidColorBrush(Colors.Red);
1158
            //rectangles.Add(rect1);
1159
            //
1160
            // Populate the data model with some example data.
1161
            //
1162
            //rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
1163
            //rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
1164
            //rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
1165
            //rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
1166

    
1167
            this.ControlOpacity = 1;
1168

    
1169
            /* Default
1170
             LineSize = 3, TextSize = 30, Interval = 10, ArcLength = 10, SaveInterval = 5
1171
            */            
1172
            this.LineSize = KCOM.Properties.Settings.Default.LineSize;
1173

    
1174
            this.TextSize = KCOM.Properties.Settings.Default.TextSize;
1175

    
1176
            this.Interval = KCOM.Properties.Settings.Default.Interval;
1177

    
1178
            this.ArcLength = KCOM.Properties.Settings.Default.ArcLength;
1179

    
1180
            this.DashSize = new DoubleCollection();
1181

    
1182
            this.SaveInterval = KCOM.Properties.Settings.Default.SaveInterval;
1183

    
1184
            this.AngleVisibility = Visibility.Collapsed;
1185
        }
1186
        
1187
        public List<IKCOM.MarkupInfoItem> SelectedmarkupInfoItems { get; set; }
1188

    
1189
        #region INotifyPropertyChanged Event
1190

    
1191
        private void OnPropertyChanged(string name)
1192
        {
1193
            if (PropertyChanged != null)
1194
            {
1195
                PropertyChanged(this, new PropertyChangedEventArgs(name));
1196
            }
1197
        }
1198

    
1199
        public event PropertyChangedEventHandler PropertyChanged;
1200

    
1201
        #endregion
1202
    }
1203
}
클립보드 이미지 추가 (최대 크기: 500 MB)