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