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