1
|
using KCOM.Messenger;
|
2
|
//using Leadtools;
|
3
|
using MarkupToPDF.Common;
|
4
|
using System;
|
5
|
using System.Collections.Generic;
|
6
|
using System.Collections.ObjectModel;
|
7
|
using System.ComponentModel;
|
8
|
using System.Linq;
|
9
|
using System.Text;
|
10
|
using System.Windows;
|
11
|
using System.Windows.Controls;
|
12
|
using System.Windows.Ink;
|
13
|
using System.Windows.Media;
|
14
|
//using IKCOM;
|
15
|
|
16
|
namespace KCOM.Common
|
17
|
{
|
18
|
public class ViewerDataModel : INotifyPropertyChanged
|
19
|
{
|
20
|
#region Data Members
|
21
|
|
22
|
private static ViewerDataModel instance = new ViewerDataModel();
|
23
|
|
24
|
//private ObservableCollection<CommentUserInfo> markupControls_Pre = new ObservableCollection<CommentUserInfo>();
|
25
|
|
26
|
private ObservableCollection<CommentUserInfo> markupControls = new ObservableCollection<CommentUserInfo>();
|
27
|
private ObservableCollection<CommentUserInfo> markupControls_Sync = new ObservableCollection<CommentUserInfo>();
|
28
|
private ObservableCollection<CommentUserInfo> markupControls_User = new ObservableCollection<CommentUserInfo>();
|
29
|
|
30
|
|
31
|
////강인구 추가
|
32
|
//private List<Check_Inferface> check_Item = new List<Check_Inferface>();
|
33
|
private ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> document_Info = new ObservableCollection<KCOMDataModel.DataModel.DOCPAGE>();
|
34
|
private ObservableCollection<Undo_data> undoDataList = new ObservableCollection<Undo_data>();
|
35
|
//public UndoDataList { get; set; }
|
36
|
|
37
|
|
38
|
private ObservableCollection<IKCOM.MarkupInfoItem> markupInfoList = new ObservableCollection<IKCOM.MarkupInfoItem>();
|
39
|
private ObservableCollection<IKCOM.MarkupInfoItem> markupInfoRevList = new ObservableCollection<IKCOM.MarkupInfoItem>();
|
40
|
|
41
|
|
42
|
|
43
|
//_markupInfoList
|
44
|
|
45
|
private StrokeCollection markupPens = new StrokeCollection();
|
46
|
|
47
|
//private ObservableCollection<RectangleData> rectangles = new ObservableCollection<RectangleData>();
|
48
|
|
49
|
|
50
|
private double contentScale = 1;
|
51
|
|
52
|
private double contentOffsetY = 0;
|
53
|
|
54
|
private double contentOffsetX = 0;
|
55
|
|
56
|
private double contentViewportHeight = 0;
|
57
|
|
58
|
private double contentViewportWidth = 0;
|
59
|
|
60
|
private double contentWidth = 0;
|
61
|
|
62
|
private MessageCollection _k_talkMessageSet;
|
63
|
|
64
|
private double contentHeight = 0;
|
65
|
|
66
|
private double angle = 0;
|
67
|
|
68
|
private double angleOffsetX = 0;
|
69
|
|
70
|
private double angleOffsetY = 0;
|
71
|
|
72
|
private ImageBrush backgroundImage;
|
73
|
|
74
|
//private RasterImage _rasterimage;
|
75
|
|
76
|
|
77
|
#endregion Data Members
|
78
|
|
79
|
#region Property Member
|
80
|
|
81
|
public static ViewerDataModel Instance
|
82
|
{
|
83
|
get
|
84
|
{
|
85
|
return instance;
|
86
|
}
|
87
|
}
|
88
|
|
89
|
private List<IKCOM.MarkupItemEx> _MarkupList_MY { get; set; }
|
90
|
public List<IKCOM.MarkupItemEx> MarkupList_MY
|
91
|
{
|
92
|
get
|
93
|
{
|
94
|
if (_MarkupList_MY == null)
|
95
|
{
|
96
|
_MarkupList_MY = new List<IKCOM.MarkupItemEx>();
|
97
|
}
|
98
|
|
99
|
return _MarkupList_MY;
|
100
|
}
|
101
|
set
|
102
|
{
|
103
|
|
104
|
_MarkupList_MY = value;
|
105
|
OnPropertyChanged("MarkupList_MY");
|
106
|
}
|
107
|
}
|
108
|
|
109
|
|
110
|
|
111
|
private List<IKCOM.MarkupItemEx> _MarkupList_USER { get; set; }
|
112
|
public List<IKCOM.MarkupItemEx> MarkupList_USER
|
113
|
{
|
114
|
get
|
115
|
{
|
116
|
if (_MarkupList_USER == null)
|
117
|
{
|
118
|
_MarkupList_USER = new List<IKCOM.MarkupItemEx>();
|
119
|
}
|
120
|
|
121
|
return _MarkupList_USER;
|
122
|
}
|
123
|
set
|
124
|
{
|
125
|
|
126
|
_MarkupList_USER = value;
|
127
|
OnPropertyChanged("_MarkupList_USER");
|
128
|
}
|
129
|
}
|
130
|
|
131
|
private List<IKCOM.MarkupItemEx> _MarkupList_Pre { get; set; }
|
132
|
public List<IKCOM.MarkupItemEx> MarkupList_Pre
|
133
|
{
|
134
|
get
|
135
|
{
|
136
|
if (_MarkupList_Pre ==null)
|
137
|
{
|
138
|
_MarkupList_Pre = new List<IKCOM.MarkupItemEx>();
|
139
|
}
|
140
|
|
141
|
return _MarkupList_Pre;
|
142
|
}
|
143
|
set
|
144
|
{
|
145
|
|
146
|
_MarkupList_Pre = value;
|
147
|
OnPropertyChanged("MarkupList_Pre");
|
148
|
}
|
149
|
|
150
|
}
|
151
|
|
152
|
|
153
|
/// <summary>
|
154
|
/// 현재 상단 메뉴에서 선택된 컨트롤
|
155
|
/// </summary>
|
156
|
private string _SelectedControl { get; set; }
|
157
|
public string SelectedControl
|
158
|
{
|
159
|
get
|
160
|
{
|
161
|
return _SelectedControl;
|
162
|
}
|
163
|
set
|
164
|
{
|
165
|
_SelectedControl = value;
|
166
|
OnPropertyChanged("SelectedControl");
|
167
|
}
|
168
|
}
|
169
|
|
170
|
|
171
|
/// <summary>
|
172
|
/// 현재 상단 메뉴의 선 굵기값
|
173
|
/// </summary>
|
174
|
private double _LineSize { get; set; }
|
175
|
public double LineSize
|
176
|
{
|
177
|
get
|
178
|
{
|
179
|
return _LineSize;
|
180
|
}
|
181
|
set
|
182
|
{
|
183
|
_LineSize = value;
|
184
|
OnPropertyChanged("LineSize");
|
185
|
}
|
186
|
}
|
187
|
|
188
|
private bool _IsPressShift { get; set; }
|
189
|
public bool IsPressShift
|
190
|
{
|
191
|
get
|
192
|
{
|
193
|
return _IsPressShift;
|
194
|
}
|
195
|
set
|
196
|
{
|
197
|
_IsPressShift = value;
|
198
|
OnPropertyChanged("IsPressShift");
|
199
|
}
|
200
|
}
|
201
|
|
202
|
//강인구 추가
|
203
|
private bool _IsPressCtrl { get; set; }
|
204
|
public bool IsPressCtrl
|
205
|
{
|
206
|
get
|
207
|
{
|
208
|
return _IsPressCtrl;
|
209
|
}
|
210
|
set
|
211
|
{
|
212
|
_IsPressCtrl = value;
|
213
|
OnPropertyChanged("IsPressCtrl");
|
214
|
}
|
215
|
}
|
216
|
|
217
|
/// <summary>
|
218
|
/// Dash 사이즈
|
219
|
/// </summary>
|
220
|
private DoubleCollection _DashSize { get; set; }
|
221
|
public DoubleCollection DashSize
|
222
|
{
|
223
|
get
|
224
|
{
|
225
|
return _DashSize;
|
226
|
}
|
227
|
set
|
228
|
{
|
229
|
_DashSize = value;
|
230
|
OnPropertyChanged("DashSize");
|
231
|
}
|
232
|
}
|
233
|
|
234
|
private string _ControlTag { get; set; }
|
235
|
public string ControlTag
|
236
|
{
|
237
|
get
|
238
|
{
|
239
|
return _ControlTag;
|
240
|
}
|
241
|
set
|
242
|
{
|
243
|
_ControlTag = value;
|
244
|
OnPropertyChanged("ControlTag");
|
245
|
}
|
246
|
}
|
247
|
|
248
|
//private bool _IsPageChanged { get; set; }
|
249
|
//public bool IsPageChanged
|
250
|
//{
|
251
|
// get
|
252
|
// {
|
253
|
// return _IsPageChanged;
|
254
|
// }
|
255
|
// set
|
256
|
// {
|
257
|
// _IsPageChanged = value;
|
258
|
// OnPropertyChanged("IsPageChanged");
|
259
|
// }
|
260
|
//}
|
261
|
|
262
|
|
263
|
|
264
|
///// <summary>
|
265
|
///// 강인구 추가(Check List관련)
|
266
|
///// </summary>
|
267
|
//public List<Check_Inferface> Check_Item
|
268
|
//{
|
269
|
// get
|
270
|
// {
|
271
|
// return check_Item;
|
272
|
// }
|
273
|
//}
|
274
|
|
275
|
private bool _IsConsolidate { get; set; }
|
276
|
public bool IsConsolidate
|
277
|
{
|
278
|
get
|
279
|
{
|
280
|
return _IsConsolidate;
|
281
|
}
|
282
|
set
|
283
|
{
|
284
|
_IsConsolidate = value;
|
285
|
OnPropertyChanged("IsConsolidate");
|
286
|
}
|
287
|
}
|
288
|
|
289
|
////////////////////////////////////////////////
|
290
|
|
291
|
|
292
|
#region Angle 관련
|
293
|
private Visibility _AngleVisibility { get; set; }
|
294
|
public Visibility AngleVisibility
|
295
|
{
|
296
|
get
|
297
|
{
|
298
|
return _AngleVisibility;
|
299
|
}
|
300
|
set
|
301
|
{
|
302
|
_AngleVisibility = value;
|
303
|
OnPropertyChanged("AngleVisibility");
|
304
|
}
|
305
|
|
306
|
}
|
307
|
private string _AngleValue { get; set; }
|
308
|
public string AngleValue
|
309
|
{
|
310
|
get
|
311
|
{
|
312
|
return _AngleValue;
|
313
|
}
|
314
|
set
|
315
|
{
|
316
|
_AngleValue = value;
|
317
|
OnPropertyChanged("AngleValue");
|
318
|
}
|
319
|
}
|
320
|
|
321
|
private string _HelperContent { get; set; }
|
322
|
public string HelperContent
|
323
|
{
|
324
|
get
|
325
|
{
|
326
|
return _HelperContent;
|
327
|
}
|
328
|
set
|
329
|
{
|
330
|
_HelperContent = value;
|
331
|
OnPropertyChanged("HelperContent");
|
332
|
}
|
333
|
}
|
334
|
|
335
|
private string _HelperHeader { get; set; }
|
336
|
public string HelperHeader
|
337
|
{
|
338
|
get
|
339
|
{
|
340
|
return _HelperHeader;
|
341
|
}
|
342
|
set
|
343
|
{
|
344
|
_HelperHeader = value;
|
345
|
OnPropertyChanged("HelperHeader");
|
346
|
}
|
347
|
}
|
348
|
|
349
|
private bool _HelperExit { get; set; }
|
350
|
public bool HelperExit
|
351
|
{
|
352
|
get
|
353
|
{
|
354
|
return _HelperExit;
|
355
|
}
|
356
|
set
|
357
|
{
|
358
|
_HelperExit = value;
|
359
|
OnPropertyChanged("HelperExit");
|
360
|
}
|
361
|
}
|
362
|
|
363
|
#endregion
|
364
|
|
365
|
public ObservableCollection<CommentUserInfo> MarkupControls
|
366
|
{
|
367
|
get
|
368
|
{
|
369
|
return markupControls;
|
370
|
}
|
371
|
}
|
372
|
|
373
|
public ObservableCollection<CommentUserInfo> MarkupControls_Sync
|
374
|
{
|
375
|
get
|
376
|
{
|
377
|
return markupControls_Sync;
|
378
|
}
|
379
|
}
|
380
|
|
381
|
public ObservableCollection<CommentUserInfo> MarkupControls_USER
|
382
|
{
|
383
|
get
|
384
|
{
|
385
|
return markupControls_User;
|
386
|
}
|
387
|
}
|
388
|
|
389
|
public ObservableCollection<Undo_data> UndoDataList
|
390
|
{
|
391
|
get
|
392
|
{
|
393
|
return undoDataList;
|
394
|
}
|
395
|
}
|
396
|
|
397
|
public StrokeCollection MarkupPens
|
398
|
{
|
399
|
get
|
400
|
{
|
401
|
return markupPens;
|
402
|
}
|
403
|
|
404
|
}
|
405
|
|
406
|
#region 버튼 여부
|
407
|
|
408
|
/// <summary>
|
409
|
/// 상단 Fill 버튼이 클릭 되어있는지
|
410
|
/// </summary>
|
411
|
private bool _checkFillShape { get; set; }
|
412
|
public bool checkFillShape
|
413
|
{
|
414
|
get
|
415
|
{
|
416
|
return _checkFillShape;
|
417
|
}
|
418
|
set
|
419
|
{
|
420
|
_checkFillShape = value;
|
421
|
OnPropertyChanged("checkFillShape");
|
422
|
}
|
423
|
}
|
424
|
|
425
|
/// <summary>
|
426
|
/// 상단 Hatch 버튼이 클릭 되어있는지
|
427
|
/// </summary>
|
428
|
private bool _checkHatchShape { get; set; }
|
429
|
public bool checkHatchShape
|
430
|
{
|
431
|
get
|
432
|
{
|
433
|
return _checkHatchShape;
|
434
|
}
|
435
|
set
|
436
|
{
|
437
|
_checkHatchShape = value;
|
438
|
OnPropertyChanged("checkHatchShape");
|
439
|
}
|
440
|
}
|
441
|
|
442
|
private double _controlOpacity { get; set; }
|
443
|
public double ControlOpacity
|
444
|
{
|
445
|
get
|
446
|
{
|
447
|
return _controlOpacity;
|
448
|
}
|
449
|
set
|
450
|
{
|
451
|
|
452
|
_controlOpacity = value;
|
453
|
OnPropertyChanged("ControlOpacity");
|
454
|
}
|
455
|
}
|
456
|
|
457
|
private MarkupToPDF.Controls.Common.PaintSet _paintSet { get; set; }
|
458
|
public MarkupToPDF.Controls.Common.PaintSet paintSet
|
459
|
{
|
460
|
get
|
461
|
{
|
462
|
return _paintSet;
|
463
|
}
|
464
|
set
|
465
|
{
|
466
|
_paintSet = value;
|
467
|
OnPropertyChanged("paintSet");
|
468
|
}
|
469
|
}
|
470
|
|
471
|
/// <summary>
|
472
|
/// 강인구 추가
|
473
|
/// 상단 TextStyle 버튼이 클릭 되어있는지
|
474
|
/// </summary>
|
475
|
private bool _checkTextStyle { get; set; }
|
476
|
public bool checkTextStyle
|
477
|
{
|
478
|
get
|
479
|
{
|
480
|
return _checkTextStyle;
|
481
|
}
|
482
|
set
|
483
|
{
|
484
|
_checkTextStyle = value;
|
485
|
OnPropertyChanged("checkTextStyle");
|
486
|
}
|
487
|
}
|
488
|
|
489
|
/// <summary>
|
490
|
/// 강인구 추가
|
491
|
/// 상단 TextWeight 버튼이 클릭 되어있는지
|
492
|
/// </summary>
|
493
|
private bool _checkTextWeight { get; set; }
|
494
|
public bool checkTextWeight
|
495
|
{
|
496
|
get
|
497
|
{
|
498
|
return _checkTextWeight;
|
499
|
}
|
500
|
set
|
501
|
{
|
502
|
_checkTextWeight = value;
|
503
|
OnPropertyChanged("checkTextWeight");
|
504
|
}
|
505
|
}
|
506
|
|
507
|
/// <summary>
|
508
|
/// 강인구 추가
|
509
|
/// 상단 UnderLine 버튼이 클릭 되어있는지
|
510
|
/// </summary>
|
511
|
private bool _checkUnderLine { get; set; }
|
512
|
public bool checkUnderLine
|
513
|
{
|
514
|
get
|
515
|
{
|
516
|
return _checkUnderLine;
|
517
|
}
|
518
|
set
|
519
|
{
|
520
|
_checkUnderLine = value;
|
521
|
OnPropertyChanged("checkUnderLine");
|
522
|
}
|
523
|
}
|
524
|
|
525
|
/// <summary>
|
526
|
/// 상단 Hatch 버튼이 클릭 되어있는지
|
527
|
/// </summary>
|
528
|
private bool _checkHighShape { get; set; }
|
529
|
public bool checkHighShape
|
530
|
{
|
531
|
get
|
532
|
{
|
533
|
return _checkHighShape;
|
534
|
}
|
535
|
set
|
536
|
{
|
537
|
_checkHighShape = value;
|
538
|
OnPropertyChanged("checkHighShape");
|
539
|
}
|
540
|
}
|
541
|
|
542
|
/// <summary>
|
543
|
/// 상단 Axis 버튼이 클릭 되어있는지
|
544
|
/// </summary>
|
545
|
private bool _checkAxis { get; set; }
|
546
|
public bool checkAxis
|
547
|
{
|
548
|
get
|
549
|
{
|
550
|
return _checkAxis;
|
551
|
}
|
552
|
set
|
553
|
{
|
554
|
_checkAxis = value;
|
555
|
OnPropertyChanged("checkAxis");
|
556
|
}
|
557
|
}
|
558
|
#endregion
|
559
|
|
560
|
public ImageBrush BackgroundImage
|
561
|
{
|
562
|
get
|
563
|
{
|
564
|
return backgroundImage;
|
565
|
}
|
566
|
set
|
567
|
{
|
568
|
backgroundImage = value;
|
569
|
OnPropertyChanged("BackgroundImage");
|
570
|
}
|
571
|
}
|
572
|
|
573
|
public ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> Document_Info
|
574
|
{
|
575
|
get
|
576
|
{
|
577
|
return document_Info;
|
578
|
}
|
579
|
}
|
580
|
|
581
|
public double ContentScale
|
582
|
{
|
583
|
get
|
584
|
{
|
585
|
return contentScale;
|
586
|
}
|
587
|
set
|
588
|
{
|
589
|
contentScale = value;
|
590
|
|
591
|
double minOffsetX = 0.0;
|
592
|
double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
|
593
|
contentOffsetX = Math.Min(Math.Max(contentOffsetX, minOffsetX), maxOffsetX);
|
594
|
|
595
|
double minOffsetY = 0.0;
|
596
|
double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
|
597
|
contentOffsetY = Math.Min(Math.Max(contentOffsetY, minOffsetY), maxOffsetY);
|
598
|
|
599
|
OnPropertyChanged("ContentScale");
|
600
|
}
|
601
|
}
|
602
|
|
603
|
public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoList
|
604
|
{
|
605
|
get
|
606
|
{
|
607
|
return markupInfoList;
|
608
|
}
|
609
|
set
|
610
|
{
|
611
|
markupInfoList = value;
|
612
|
OnPropertyChanged("_markupInfoList");
|
613
|
}
|
614
|
}
|
615
|
|
616
|
public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoRevList
|
617
|
{
|
618
|
get
|
619
|
{
|
620
|
return markupInfoRevList;
|
621
|
}
|
622
|
set
|
623
|
{
|
624
|
markupInfoRevList = value;
|
625
|
OnPropertyChanged("_markupInfoRevList");
|
626
|
}
|
627
|
}
|
628
|
|
629
|
public double ContentOffsetX
|
630
|
{
|
631
|
get
|
632
|
{
|
633
|
return contentOffsetX;
|
634
|
}
|
635
|
set
|
636
|
{
|
637
|
double minOffsetX = 0.0;
|
638
|
double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth);
|
639
|
contentOffsetX = Math.Min(Math.Max(value, minOffsetX), maxOffsetX);
|
640
|
OnPropertyChanged("ContentOffsetX");
|
641
|
}
|
642
|
}
|
643
|
|
644
|
public double ContentOffsetY
|
645
|
{
|
646
|
get
|
647
|
{
|
648
|
return contentOffsetY;
|
649
|
}
|
650
|
set
|
651
|
{
|
652
|
double minOffsetY = 0.0;
|
653
|
double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight);
|
654
|
contentOffsetY = Math.Min(Math.Max(value, minOffsetY), maxOffsetY);
|
655
|
OnPropertyChanged("ContentOffsetY");
|
656
|
}
|
657
|
}
|
658
|
|
659
|
public MessageCollection k_talkMessageSet
|
660
|
{
|
661
|
get
|
662
|
{
|
663
|
if (_k_talkMessageSet ==null)
|
664
|
{
|
665
|
_k_talkMessageSet = new MessageCollection();
|
666
|
}
|
667
|
return _k_talkMessageSet;
|
668
|
}
|
669
|
set
|
670
|
{
|
671
|
_k_talkMessageSet = value;
|
672
|
OnPropertyChanged("k_talkMessageSet");
|
673
|
}
|
674
|
}
|
675
|
|
676
|
public double ContentWidth
|
677
|
{
|
678
|
get
|
679
|
{
|
680
|
return contentWidth;
|
681
|
}
|
682
|
set
|
683
|
{
|
684
|
contentWidth = value;
|
685
|
OnPropertyChanged("ContentWidth");
|
686
|
}
|
687
|
}
|
688
|
|
689
|
public double ContentHeight
|
690
|
{
|
691
|
get
|
692
|
{
|
693
|
return contentHeight;
|
694
|
}
|
695
|
set
|
696
|
{
|
697
|
contentHeight = value;
|
698
|
OnPropertyChanged("ContentHeight");
|
699
|
}
|
700
|
}
|
701
|
|
702
|
public double ContentViewportWidth
|
703
|
{
|
704
|
get
|
705
|
{
|
706
|
return contentViewportWidth;
|
707
|
}
|
708
|
set
|
709
|
{
|
710
|
contentViewportWidth = value;
|
711
|
OnPropertyChanged("ContentViewportWidth");
|
712
|
}
|
713
|
}
|
714
|
|
715
|
public double ContentViewportHeight
|
716
|
{
|
717
|
get
|
718
|
{
|
719
|
return contentViewportHeight;
|
720
|
}
|
721
|
set
|
722
|
{
|
723
|
contentViewportHeight = value;
|
724
|
OnPropertyChanged("ContentViewportHeight");
|
725
|
}
|
726
|
}
|
727
|
|
728
|
public MainWindow SystemMain { get; set; }
|
729
|
|
730
|
public double Angle
|
731
|
{
|
732
|
get
|
733
|
{
|
734
|
return angle;
|
735
|
}
|
736
|
set
|
737
|
{
|
738
|
angle = value;
|
739
|
OnPropertyChanged("Angle");
|
740
|
}
|
741
|
}
|
742
|
|
743
|
private bool _PageBalanceMode { get; set; }
|
744
|
public bool PageBalanceMode
|
745
|
{
|
746
|
get
|
747
|
{
|
748
|
return _PageBalanceMode;
|
749
|
}
|
750
|
set
|
751
|
{
|
752
|
_PageBalanceMode = value;
|
753
|
OnPropertyChanged("PageBalanceMode");
|
754
|
}
|
755
|
}
|
756
|
|
757
|
private int _PageBalanceNumber { get; set; }
|
758
|
public int PageBalanceNumber
|
759
|
{
|
760
|
get
|
761
|
{
|
762
|
return _PageBalanceNumber;
|
763
|
}
|
764
|
set
|
765
|
{
|
766
|
_PageBalanceNumber = value;
|
767
|
OnPropertyChanged("PageBalanceNumber");
|
768
|
}
|
769
|
}
|
770
|
|
771
|
private int _PageNumber { get; set; }
|
772
|
public int PageNumber
|
773
|
{
|
774
|
get
|
775
|
{
|
776
|
return _PageNumber;
|
777
|
}
|
778
|
set
|
779
|
{
|
780
|
_PageNumber = value;
|
781
|
OnPropertyChanged("PageNumber");
|
782
|
}
|
783
|
}
|
784
|
|
785
|
public double AngleOffsetX
|
786
|
{
|
787
|
get
|
788
|
{
|
789
|
return angleOffsetX;
|
790
|
}
|
791
|
set
|
792
|
{
|
793
|
angleOffsetX = value;
|
794
|
OnPropertyChanged("AngleOffsetX");
|
795
|
}
|
796
|
}
|
797
|
|
798
|
public double AngleOffsetY
|
799
|
{
|
800
|
get
|
801
|
{
|
802
|
return angleOffsetY;
|
803
|
}
|
804
|
set
|
805
|
{
|
806
|
angleOffsetY = value;
|
807
|
OnPropertyChanged("AngleOffsetY");
|
808
|
}
|
809
|
}
|
810
|
|
811
|
//강인구 추가(체크리스트)
|
812
|
private string _CheckList_ID { get; set; }
|
813
|
public string CheckList_ID
|
814
|
{
|
815
|
get
|
816
|
{
|
817
|
return _CheckList_ID;
|
818
|
}
|
819
|
set
|
820
|
{
|
821
|
_CheckList_ID = value;
|
822
|
OnPropertyChanged("CheckList_ID");
|
823
|
}
|
824
|
}
|
825
|
//강인구 추가(캡쳐 모드)
|
826
|
private double _Capture_Opacity { get; set; }
|
827
|
public double Capture_Opacity
|
828
|
{
|
829
|
get
|
830
|
{
|
831
|
return _Capture_Opacity;
|
832
|
}
|
833
|
set
|
834
|
{
|
835
|
_Capture_Opacity = value;
|
836
|
OnPropertyChanged("Capture_Opacity");
|
837
|
}
|
838
|
}
|
839
|
|
840
|
private Visibility _ViewVisible { get; set; }
|
841
|
public Visibility ViewVisible
|
842
|
{
|
843
|
get
|
844
|
{
|
845
|
return _ViewVisible;
|
846
|
}
|
847
|
set
|
848
|
{
|
849
|
_ViewVisible = value;
|
850
|
OnPropertyChanged("ViewVisible");
|
851
|
}
|
852
|
}
|
853
|
|
854
|
private bool _IsSync { get; set; }
|
855
|
public bool IsSync
|
856
|
{
|
857
|
get
|
858
|
{
|
859
|
return _IsSync;
|
860
|
}
|
861
|
set
|
862
|
{
|
863
|
_IsSync = value;
|
864
|
OnPropertyChanged("IsSync");
|
865
|
}
|
866
|
}
|
867
|
|
868
|
private System.Windows.Media.Imaging.BitmapImage _ImageViewPath { get; set;}
|
869
|
public System.Windows.Media.Imaging.BitmapImage ImageViewPath
|
870
|
{
|
871
|
get
|
872
|
{
|
873
|
return _ImageViewPath;
|
874
|
}
|
875
|
set
|
876
|
{
|
877
|
_ImageViewPath = value;
|
878
|
OnPropertyChanged("ImageViewPath");
|
879
|
}
|
880
|
}
|
881
|
private double _ImageViewWidth { get; set; }
|
882
|
public double ImageViewWidth
|
883
|
{
|
884
|
get
|
885
|
{
|
886
|
return _ImageViewWidth;
|
887
|
}
|
888
|
set
|
889
|
{
|
890
|
_ImageViewWidth = value;
|
891
|
OnPropertyChanged("ImageViewWidth");
|
892
|
}
|
893
|
}
|
894
|
private double _ImageViewHeight { get; set; }
|
895
|
public double ImageViewHeight
|
896
|
{
|
897
|
get
|
898
|
{
|
899
|
return _ImageViewHeight;
|
900
|
}
|
901
|
set
|
902
|
{
|
903
|
_ImageViewHeight = value;
|
904
|
OnPropertyChanged("ImageViewHeight");
|
905
|
}
|
906
|
}
|
907
|
|
908
|
private System.Windows.Media.Imaging.BitmapImage _ImageViewPath_C { get; set; }
|
909
|
public System.Windows.Media.Imaging.BitmapImage ImageViewPath_C
|
910
|
{
|
911
|
get
|
912
|
{
|
913
|
return _ImageViewPath_C;
|
914
|
}
|
915
|
set
|
916
|
{
|
917
|
_ImageViewPath_C = value;
|
918
|
OnPropertyChanged("ImageViewPath_C");
|
919
|
}
|
920
|
}
|
921
|
private double _ImageViewWidth_C { get; set; }
|
922
|
public double ImageViewWidth_C
|
923
|
{
|
924
|
get
|
925
|
{
|
926
|
return _ImageViewWidth_C;
|
927
|
}
|
928
|
set
|
929
|
{
|
930
|
_ImageViewWidth_C = value;
|
931
|
OnPropertyChanged("ImageViewWidth_C");
|
932
|
}
|
933
|
}
|
934
|
private double _ImageViewHeight_C { get; set; }
|
935
|
public double ImageViewHeight_C
|
936
|
{
|
937
|
get
|
938
|
{
|
939
|
return _ImageViewHeight_C;
|
940
|
}
|
941
|
set
|
942
|
{
|
943
|
_ImageViewHeight_C = value;
|
944
|
OnPropertyChanged("ImageViewHeight_C");
|
945
|
}
|
946
|
}
|
947
|
|
948
|
|
949
|
#endregion Property Member
|
950
|
|
951
|
public System.IO.Stream GetStreamFromUrl(string url)
|
952
|
{
|
953
|
byte[] imageData = null;
|
954
|
|
955
|
using (var wc = new System.Net.WebClient())
|
956
|
imageData = wc.DownloadData(url);
|
957
|
|
958
|
return new System.IO.MemoryStream(imageData);
|
959
|
}
|
960
|
|
961
|
public ViewerDataModel()
|
962
|
{
|
963
|
//rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
|
964
|
//rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
|
965
|
//rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
|
966
|
//rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
|
967
|
|
968
|
//RectangleControl rect1 = new RectangleControl();
|
969
|
//rect1.StartPoint = new Point(50, 50);
|
970
|
//rect1.LeftBottomPoint = new Point(100, 50);
|
971
|
//rect1.TopRightPoint = new Point(50, 100);
|
972
|
//rect1.EndPoint = new Point(100, 100);
|
973
|
//rect1.FillColor = new SolidColorBrush(Colors.Red);
|
974
|
//rectangles.Add(rect1);
|
975
|
//
|
976
|
// Populate the data model with some example data.
|
977
|
//
|
978
|
//rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue));
|
979
|
//rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green));
|
980
|
//rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple));
|
981
|
//rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red));
|
982
|
|
983
|
this.ControlOpacity = 1;
|
984
|
//강인구 추가
|
985
|
|
986
|
this.LineSize = 3;
|
987
|
|
988
|
this.DashSize = new DoubleCollection(99999999);
|
989
|
}
|
990
|
|
991
|
#region INotifyPropertyChanged Event
|
992
|
|
993
|
private void OnPropertyChanged(string name)
|
994
|
{
|
995
|
if (PropertyChanged != null)
|
996
|
{
|
997
|
PropertyChanged(this, new PropertyChangedEventArgs(name));
|
998
|
}
|
999
|
}
|
1000
|
|
1001
|
public event PropertyChangedEventHandler PropertyChanged;
|
1002
|
|
1003
|
#endregion
|
1004
|
}
|
1005
|
}
|