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