개정판 959b3ef2
issue #000: add DeleteCommand class
Change-Id: I3edc8872d4351d2e0f7c3b25691631606d20cbd3
KCOM/Common/SelectionSet.cs | ||
---|---|---|
1 |
using KCOM.Common; |
|
2 |
using KCOM.Controls; |
|
3 |
using KCOM.Views; |
|
4 |
using MarkupToPDF.Common; |
|
5 |
using MarkupToPDF.Controls.Parsing; |
|
6 |
using Newtonsoft.Json; |
|
7 |
using Newtonsoft.Json.Converters; |
|
8 |
using Newtonsoft.Json.Linq; |
|
9 |
using Newtonsoft.Json.Serialization; |
|
10 |
using System; |
|
11 |
using System.Collections; |
|
12 |
using System.Collections.Generic; |
|
13 |
using System.ComponentModel; |
|
14 |
using System.Data; |
|
15 |
using System.IO; |
|
16 |
using System.Linq; |
|
17 |
using System.Reflection; |
|
18 |
using System.Runtime.Serialization.Formatters; |
|
19 |
using System.Runtime.Serialization.Formatters.Binary; |
|
20 |
using System.Runtime.Serialization.Json; |
|
21 |
using System.Text; |
|
22 |
using System.Windows; |
|
23 |
using System.Windows.Media; |
|
24 |
using System.Xml; |
|
25 |
using System.Xml.Serialization; |
|
26 |
|
|
27 |
namespace KCOM |
|
28 |
{ |
|
29 |
public class SelectionSet |
|
30 |
{ |
|
31 |
private static readonly SelectionSet _instance = new SelectionSet(); |
|
32 |
|
|
33 |
// Explicit static constructor to tell C# compiler |
|
34 |
// not to mark type as beforefieldinit |
|
35 |
static SelectionSet() |
|
36 |
{ |
|
37 |
} |
|
38 |
|
|
39 |
private SelectionSet() |
|
40 |
{ |
|
41 |
} |
|
42 |
|
|
43 |
public static SelectionSet Instance |
|
44 |
{ |
|
45 |
get |
|
46 |
{ |
|
47 |
return _instance; |
|
48 |
} |
|
49 |
} |
|
50 |
} |
|
51 |
} |
KCOM/Common/ThumbnailItem.cs.bak | ||
---|---|---|
1 |
using IKCOM; |
|
2 |
using System; |
|
3 |
using System.Collections.Generic; |
|
4 |
using System.Linq; |
|
5 |
using System.Text; |
|
6 |
|
|
7 |
namespace KCOM.Common |
|
8 |
{ |
|
9 |
public class ThumbnailItem |
|
10 |
{ |
|
11 |
public ThumbnailItem() |
|
12 |
{ |
|
13 |
DisplayColorItems = new List<SetColorMarkupItem>(); |
|
14 |
} |
|
15 |
public Uri ImageUri { get; set; } |
|
16 |
public List<SetColorMarkupItem> DisplayColorItems { get; set; } |
|
17 |
public int PageNumber { get; set; } |
|
18 |
public int Angle { get; set; } |
|
19 |
} |
|
20 |
|
|
21 |
//public class SetColorMarkupItem |
|
22 |
//{ |
|
23 |
// public string markupID { get; set; } |
|
24 |
// public string DisplayColor { get; set; } |
|
25 |
//} |
|
26 |
} |
KCOM/Common/ViewerDataModel.cs.bak | ||
---|---|---|
1 |
using KCOM.Messenger; |
|
2 |
using Leadtools; |
|
3 |
using MarkupToPDF.Common; |
|
4 |
using System; |
|
5 |
using System.Collections.Generic; |
|
6 |
using System.Collections.ObjectModel; |
|
7 |
using System.ComponentModel; |
|
8 |
using System.Linq; |
|
9 |
using System.Text; |
|
10 |
using System.Windows; |
|
11 |
using System.Windows.Controls; |
|
12 |
using System.Windows.Ink; |
|
13 |
using System.Windows.Media; |
|
14 |
//using IKCOM; |
|
15 |
|
|
16 |
namespace KCOM.Common |
|
17 |
{ |
|
18 |
public class ViewerDataModel : INotifyPropertyChanged |
|
19 |
{ |
|
20 |
#region Data Members |
|
21 |
|
|
22 |
private static ViewerDataModel instance = new ViewerDataModel(); |
|
23 |
|
|
24 |
//private ObservableCollection<CommentUserInfo> markupControls_Pre = new ObservableCollection<CommentUserInfo>(); |
|
25 |
|
|
26 |
private ObservableCollection<CommentUserInfo> markupControls = new ObservableCollection<CommentUserInfo>(); |
|
27 |
private ObservableCollection<CommentUserInfo> markupControls_Sync = new ObservableCollection<CommentUserInfo>(); |
|
28 |
private ObservableCollection<CommentUserInfo> markupControls_User = new ObservableCollection<CommentUserInfo>(); |
|
29 |
|
|
30 |
|
|
31 |
////강인구 추가 |
|
32 |
//private List<Check_Inferface> check_Item = new List<Check_Inferface>(); |
|
33 |
private ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> document_Info = new ObservableCollection<KCOMDataModel.DataModel.DOCPAGE>(); |
|
34 |
|
|
35 |
|
|
36 |
private ObservableCollection<IKCOM.MarkupInfoItem> markupInfoList = new ObservableCollection<IKCOM.MarkupInfoItem>(); |
|
37 |
private ObservableCollection<IKCOM.MarkupInfoItem> markupInfoRevList = new ObservableCollection<IKCOM.MarkupInfoItem>(); |
|
38 |
|
|
39 |
|
|
40 |
//_markupInfoList |
|
41 |
|
|
42 |
private StrokeCollection markupPens = new StrokeCollection(); |
|
43 |
|
|
44 |
//private ObservableCollection<RectangleData> rectangles = new ObservableCollection<RectangleData>(); |
|
45 |
|
|
46 |
|
|
47 |
private double contentScale = 1; |
|
48 |
|
|
49 |
private double contentOffsetY = 0; |
|
50 |
|
|
51 |
private double contentOffsetX = 0; |
|
52 |
|
|
53 |
private double contentViewportHeight = 0; |
|
54 |
|
|
55 |
private double contentViewportWidth = 0; |
|
56 |
|
|
57 |
private double contentWidth = 0; |
|
58 |
|
|
59 |
private MessageCollection _k_talkMessageSet; |
|
60 |
|
|
61 |
private double contentHeight = 0; |
|
62 |
|
|
63 |
private double angle = 0; |
|
64 |
|
|
65 |
private double angleOffsetX = 0; |
|
66 |
|
|
67 |
private double angleOffsetY = 0; |
|
68 |
|
|
69 |
private ImageBrush backgroundImage; |
|
70 |
|
|
71 |
private RasterImage _rasterimage; |
|
72 |
|
|
73 |
|
|
74 |
#endregion Data Members |
|
75 |
|
|
76 |
#region Property Member |
|
77 |
|
|
78 |
public static ViewerDataModel Instance |
|
79 |
{ |
|
80 |
get |
|
81 |
{ |
|
82 |
return instance; |
|
83 |
} |
|
84 |
} |
|
85 |
|
|
86 |
private List<IKCOM.MarkupItemEx> _MarkupList_MY { get; set; } |
|
87 |
public List<IKCOM.MarkupItemEx> MarkupList_MY |
|
88 |
{ |
|
89 |
get |
|
90 |
{ |
|
91 |
if (_MarkupList_MY == null) |
|
92 |
{ |
|
93 |
_MarkupList_MY = new List<IKCOM.MarkupItemEx>(); |
|
94 |
} |
|
95 |
|
|
96 |
return _MarkupList_MY; |
|
97 |
} |
|
98 |
set |
|
99 |
{ |
|
100 |
|
|
101 |
_MarkupList_MY = value; |
|
102 |
OnPropertyChanged("MarkupList_MY"); |
|
103 |
} |
|
104 |
} |
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
private List<IKCOM.MarkupItemEx> _MarkupList_USER { get; set; } |
|
109 |
public List<IKCOM.MarkupItemEx> MarkupList_USER |
|
110 |
{ |
|
111 |
get |
|
112 |
{ |
|
113 |
if (_MarkupList_USER == null) |
|
114 |
{ |
|
115 |
_MarkupList_USER = new List<IKCOM.MarkupItemEx>(); |
|
116 |
} |
|
117 |
|
|
118 |
return _MarkupList_USER; |
|
119 |
} |
|
120 |
set |
|
121 |
{ |
|
122 |
|
|
123 |
_MarkupList_USER = value; |
|
124 |
OnPropertyChanged("_MarkupList_USER"); |
|
125 |
} |
|
126 |
} |
|
127 |
|
|
128 |
private List<IKCOM.MarkupItemEx> _MarkupList_Pre { get; set; } |
|
129 |
public List<IKCOM.MarkupItemEx> MarkupList_Pre |
|
130 |
{ |
|
131 |
get |
|
132 |
{ |
|
133 |
if (_MarkupList_Pre ==null) |
|
134 |
{ |
|
135 |
_MarkupList_Pre = new List<IKCOM.MarkupItemEx>(); |
|
136 |
} |
|
137 |
|
|
138 |
return _MarkupList_Pre; |
|
139 |
} |
|
140 |
set |
|
141 |
{ |
|
142 |
|
|
143 |
_MarkupList_Pre = value; |
|
144 |
OnPropertyChanged("MarkupList_Pre"); |
|
145 |
} |
|
146 |
|
|
147 |
} |
|
148 |
|
|
149 |
|
|
150 |
/// <summary> |
|
151 |
/// 현재 상단 메뉴에서 선택된 컨트롤 |
|
152 |
/// </summary> |
|
153 |
private string _SelectedControl { get; set; } |
|
154 |
public string SelectedControl |
|
155 |
{ |
|
156 |
get |
|
157 |
{ |
|
158 |
return _SelectedControl; |
|
159 |
} |
|
160 |
set |
|
161 |
{ |
|
162 |
_SelectedControl = value; |
|
163 |
OnPropertyChanged("SelectedControl"); |
|
164 |
} |
|
165 |
} |
|
166 |
|
|
167 |
|
|
168 |
/// <summary> |
|
169 |
/// 현재 상단 메뉴의 선 굵기값 |
|
170 |
/// </summary> |
|
171 |
private double _LineSize { get; set; } |
|
172 |
public double LineSize |
|
173 |
{ |
|
174 |
get |
|
175 |
{ |
|
176 |
return _LineSize; |
|
177 |
} |
|
178 |
set |
|
179 |
{ |
|
180 |
_LineSize = value; |
|
181 |
OnPropertyChanged("LineSize"); |
|
182 |
} |
|
183 |
} |
|
184 |
|
|
185 |
private bool _IsPressShift { get; set; } |
|
186 |
public bool IsPressShift |
|
187 |
{ |
|
188 |
get |
|
189 |
{ |
|
190 |
return _IsPressShift; |
|
191 |
} |
|
192 |
set |
|
193 |
{ |
|
194 |
_IsPressShift = value; |
|
195 |
OnPropertyChanged("IsPressShift"); |
|
196 |
} |
|
197 |
} |
|
198 |
|
|
199 |
//강인구 추가 |
|
200 |
private bool _IsPressCtrl { get; set; } |
|
201 |
public bool IsPressCtrl |
|
202 |
{ |
|
203 |
get |
|
204 |
{ |
|
205 |
return _IsPressCtrl; |
|
206 |
} |
|
207 |
set |
|
208 |
{ |
|
209 |
_IsPressCtrl = value; |
|
210 |
OnPropertyChanged("IsPressCtrl"); |
|
211 |
} |
|
212 |
} |
|
213 |
|
|
214 |
/// <summary> |
|
215 |
/// Dash 사이즈 |
|
216 |
/// </summary> |
|
217 |
private DoubleCollection _DashSize { get; set; } |
|
218 |
public DoubleCollection DashSize |
|
219 |
{ |
|
220 |
get |
|
221 |
{ |
|
222 |
return _DashSize; |
|
223 |
} |
|
224 |
set |
|
225 |
{ |
|
226 |
_DashSize = value; |
|
227 |
OnPropertyChanged("DashSize"); |
|
228 |
} |
|
229 |
} |
|
230 |
|
|
231 |
private string _ControlTag { get; set; } |
|
232 |
public string ControlTag |
|
233 |
{ |
|
234 |
get |
|
235 |
{ |
|
236 |
return _ControlTag; |
|
237 |
} |
|
238 |
set |
|
239 |
{ |
|
240 |
_ControlTag = value; |
|
241 |
OnPropertyChanged("ControlTag"); |
|
242 |
} |
|
243 |
} |
|
244 |
|
|
245 |
//private bool _IsPageChanged { get; set; } |
|
246 |
//public bool IsPageChanged |
|
247 |
//{ |
|
248 |
// get |
|
249 |
// { |
|
250 |
// return _IsPageChanged; |
|
251 |
// } |
|
252 |
// set |
|
253 |
// { |
|
254 |
// _IsPageChanged = value; |
|
255 |
// OnPropertyChanged("IsPageChanged"); |
|
256 |
// } |
|
257 |
//} |
|
258 |
|
|
259 |
|
|
260 |
|
|
261 |
///// <summary> |
|
262 |
///// 강인구 추가(Check List관련) |
|
263 |
///// </summary> |
|
264 |
//public List<Check_Inferface> Check_Item |
|
265 |
//{ |
|
266 |
// get |
|
267 |
// { |
|
268 |
// return check_Item; |
|
269 |
// } |
|
270 |
//} |
|
271 |
|
|
272 |
private bool _IsConsolidate { get; set; } |
|
273 |
public bool IsConsolidate |
|
274 |
{ |
|
275 |
get |
|
276 |
{ |
|
277 |
return _IsConsolidate; |
|
278 |
} |
|
279 |
set |
|
280 |
{ |
|
281 |
_IsConsolidate = value; |
|
282 |
OnPropertyChanged("IsConsolidate"); |
|
283 |
} |
|
284 |
} |
|
285 |
|
|
286 |
//////////////////////////////////////////////// |
|
287 |
|
|
288 |
|
|
289 |
#region Angle 관련 |
|
290 |
private Visibility _AngleVisibility { get; set; } |
|
291 |
public Visibility AngleVisibility |
|
292 |
{ |
|
293 |
get |
|
294 |
{ |
|
295 |
return _AngleVisibility; |
|
296 |
} |
|
297 |
set |
|
298 |
{ |
|
299 |
_AngleVisibility = value; |
|
300 |
OnPropertyChanged("AngleVisibility"); |
|
301 |
} |
|
302 |
|
|
303 |
} |
|
304 |
private string _AngleValue { get; set; } |
|
305 |
public string AngleValue |
|
306 |
{ |
|
307 |
get |
|
308 |
{ |
|
309 |
return _AngleValue; |
|
310 |
} |
|
311 |
set |
|
312 |
{ |
|
313 |
_AngleValue = value; |
|
314 |
OnPropertyChanged("AngleValue"); |
|
315 |
} |
|
316 |
} |
|
317 |
|
|
318 |
private string _HelperContent { get; set; } |
|
319 |
public string HelperContent |
|
320 |
{ |
|
321 |
get |
|
322 |
{ |
|
323 |
return _HelperContent; |
|
324 |
} |
|
325 |
set |
|
326 |
{ |
|
327 |
_HelperContent = value; |
|
328 |
OnPropertyChanged("HelperContent"); |
|
329 |
} |
|
330 |
} |
|
331 |
|
|
332 |
private string _HelperHeader { get; set; } |
|
333 |
public string HelperHeader |
|
334 |
{ |
|
335 |
get |
|
336 |
{ |
|
337 |
return _HelperHeader; |
|
338 |
} |
|
339 |
set |
|
340 |
{ |
|
341 |
_HelperHeader = value; |
|
342 |
OnPropertyChanged("HelperHeader"); |
|
343 |
} |
|
344 |
} |
|
345 |
|
|
346 |
private bool _HelperExit { get; set; } |
|
347 |
public bool HelperExit |
|
348 |
{ |
|
349 |
get |
|
350 |
{ |
|
351 |
return _HelperExit; |
|
352 |
} |
|
353 |
set |
|
354 |
{ |
|
355 |
_HelperExit = value; |
|
356 |
OnPropertyChanged("HelperExit"); |
|
357 |
} |
|
358 |
} |
|
359 |
|
|
360 |
#endregion |
|
361 |
|
|
362 |
public ObservableCollection<CommentUserInfo> MarkupControls |
|
363 |
{ |
|
364 |
get |
|
365 |
{ |
|
366 |
return markupControls; |
|
367 |
} |
|
368 |
} |
|
369 |
|
|
370 |
public ObservableCollection<CommentUserInfo> MarkupControls_Sync |
|
371 |
{ |
|
372 |
get |
|
373 |
{ |
|
374 |
return markupControls_Sync; |
|
375 |
} |
|
376 |
} |
|
377 |
|
|
378 |
public ObservableCollection<CommentUserInfo> MarkupControls_USER |
|
379 |
{ |
|
380 |
get |
|
381 |
{ |
|
382 |
return markupControls_User; |
|
383 |
} |
|
384 |
} |
|
385 |
|
|
386 |
public StrokeCollection MarkupPens |
|
387 |
{ |
|
388 |
get |
|
389 |
{ |
|
390 |
return markupPens; |
|
391 |
} |
|
392 |
|
|
393 |
} |
|
394 |
#region 버튼 여부 |
|
395 |
|
|
396 |
/// <summary> |
|
397 |
/// 상단 Fill 버튼이 클릭 되어있는지 |
|
398 |
/// </summary> |
|
399 |
private bool _checkFillShape { get; set; } |
|
400 |
public bool checkFillShape |
|
401 |
{ |
|
402 |
get |
|
403 |
{ |
|
404 |
return _checkFillShape; |
|
405 |
} |
|
406 |
set |
|
407 |
{ |
|
408 |
_checkFillShape = value; |
|
409 |
OnPropertyChanged("checkFillShape"); |
|
410 |
} |
|
411 |
} |
|
412 |
|
|
413 |
/// <summary> |
|
414 |
/// 상단 Hatch 버튼이 클릭 되어있는지 |
|
415 |
/// </summary> |
|
416 |
private bool _checkHatchShape { get; set; } |
|
417 |
public bool checkHatchShape |
|
418 |
{ |
|
419 |
get |
|
420 |
{ |
|
421 |
return _checkHatchShape; |
|
422 |
} |
|
423 |
set |
|
424 |
{ |
|
425 |
_checkHatchShape = value; |
|
426 |
OnPropertyChanged("checkHatchShape"); |
|
427 |
} |
|
428 |
} |
|
429 |
|
|
430 |
private double _controlOpacity { get; set; } |
|
431 |
public double ControlOpacity |
|
432 |
{ |
|
433 |
get |
|
434 |
{ |
|
435 |
return _controlOpacity; |
|
436 |
} |
|
437 |
set |
|
438 |
{ |
|
439 |
|
|
440 |
_controlOpacity = value; |
|
441 |
OnPropertyChanged("ControlOpacity"); |
|
442 |
} |
|
443 |
} |
|
444 |
|
|
445 |
private MarkupToPDF.Controls.Common.PaintSet _paintSet { get; set; } |
|
446 |
public MarkupToPDF.Controls.Common.PaintSet paintSet |
|
447 |
{ |
|
448 |
get |
|
449 |
{ |
|
450 |
return _paintSet; |
|
451 |
} |
|
452 |
set |
|
453 |
{ |
|
454 |
_paintSet = value; |
|
455 |
OnPropertyChanged("paintSet"); |
|
456 |
} |
|
457 |
} |
|
458 |
|
|
459 |
/// <summary> |
|
460 |
/// 강인구 추가 |
|
461 |
/// 상단 TextStyle 버튼이 클릭 되어있는지 |
|
462 |
/// </summary> |
|
463 |
private bool _checkTextStyle { get; set; } |
|
464 |
public bool checkTextStyle |
|
465 |
{ |
|
466 |
get |
|
467 |
{ |
|
468 |
return _checkTextStyle; |
|
469 |
} |
|
470 |
set |
|
471 |
{ |
|
472 |
_checkTextStyle = value; |
|
473 |
OnPropertyChanged("checkTextStyle"); |
|
474 |
} |
|
475 |
} |
|
476 |
|
|
477 |
/// <summary> |
|
478 |
/// 강인구 추가 |
|
479 |
/// 상단 TextWeight 버튼이 클릭 되어있는지 |
|
480 |
/// </summary> |
|
481 |
private bool _checkTextWeight { get; set; } |
|
482 |
public bool checkTextWeight |
|
483 |
{ |
|
484 |
get |
|
485 |
{ |
|
486 |
return _checkTextWeight; |
|
487 |
} |
|
488 |
set |
|
489 |
{ |
|
490 |
_checkTextWeight = value; |
|
491 |
OnPropertyChanged("checkTextWeight"); |
|
492 |
} |
|
493 |
} |
|
494 |
|
|
495 |
/// <summary> |
|
496 |
/// 강인구 추가 |
|
497 |
/// 상단 UnderLine 버튼이 클릭 되어있는지 |
|
498 |
/// </summary> |
|
499 |
private bool _checkUnderLine { get; set; } |
|
500 |
public bool checkUnderLine |
|
501 |
{ |
|
502 |
get |
|
503 |
{ |
|
504 |
return _checkUnderLine; |
|
505 |
} |
|
506 |
set |
|
507 |
{ |
|
508 |
_checkUnderLine = value; |
|
509 |
OnPropertyChanged("checkUnderLine"); |
|
510 |
} |
|
511 |
} |
|
512 |
|
|
513 |
/// <summary> |
|
514 |
/// 상단 Hatch 버튼이 클릭 되어있는지 |
|
515 |
/// </summary> |
|
516 |
private bool _checkHighShape { get; set; } |
|
517 |
public bool checkHighShape |
|
518 |
{ |
|
519 |
get |
|
520 |
{ |
|
521 |
return _checkHighShape; |
|
522 |
} |
|
523 |
set |
|
524 |
{ |
|
525 |
_checkHighShape = value; |
|
526 |
OnPropertyChanged("checkHighShape"); |
|
527 |
} |
|
528 |
} |
|
529 |
|
|
530 |
/// <summary> |
|
531 |
/// 상단 Axis 버튼이 클릭 되어있는지 |
|
532 |
/// </summary> |
|
533 |
private bool _checkAxis { get; set; } |
|
534 |
public bool checkAxis |
|
535 |
{ |
|
536 |
get |
|
537 |
{ |
|
538 |
return _checkAxis; |
|
539 |
} |
|
540 |
set |
|
541 |
{ |
|
542 |
_checkAxis = value; |
|
543 |
OnPropertyChanged("checkAxis"); |
|
544 |
} |
|
545 |
} |
|
546 |
#endregion |
|
547 |
|
|
548 |
public ImageBrush BackgroundImage |
|
549 |
{ |
|
550 |
get |
|
551 |
{ |
|
552 |
return backgroundImage; |
|
553 |
} |
|
554 |
set |
|
555 |
{ |
|
556 |
backgroundImage = value; |
|
557 |
OnPropertyChanged("BackgroundImage"); |
|
558 |
} |
|
559 |
} |
|
560 |
|
|
561 |
public RasterImage rasterimage |
|
562 |
{ |
|
563 |
get |
|
564 |
{ |
|
565 |
return _rasterimage; |
|
566 |
} |
|
567 |
set |
|
568 |
{ |
|
569 |
_rasterimage = value; |
|
570 |
OnPropertyChanged("rasterimage"); |
|
571 |
} |
|
572 |
} |
|
573 |
|
|
574 |
|
|
575 |
public ObservableCollection<KCOMDataModel.DataModel.DOCPAGE> Document_Info |
|
576 |
{ |
|
577 |
get |
|
578 |
{ |
|
579 |
return document_Info; |
|
580 |
} |
|
581 |
} |
|
582 |
|
|
583 |
|
|
584 |
public double ContentScale |
|
585 |
{ |
|
586 |
get |
|
587 |
{ |
|
588 |
return contentScale; |
|
589 |
} |
|
590 |
set |
|
591 |
{ |
|
592 |
contentScale = value; |
|
593 |
|
|
594 |
double minOffsetX = 0.0; |
|
595 |
double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth); |
|
596 |
contentOffsetX = Math.Min(Math.Max(contentOffsetX, minOffsetX), maxOffsetX); |
|
597 |
|
|
598 |
double minOffsetY = 0.0; |
|
599 |
double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight); |
|
600 |
contentOffsetY = Math.Min(Math.Max(contentOffsetY, minOffsetY), maxOffsetY); |
|
601 |
|
|
602 |
OnPropertyChanged("ContentScale"); |
|
603 |
} |
|
604 |
} |
|
605 |
public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoList |
|
606 |
{ |
|
607 |
get |
|
608 |
{ |
|
609 |
return markupInfoList; |
|
610 |
} |
|
611 |
set |
|
612 |
{ |
|
613 |
markupInfoList = value; |
|
614 |
OnPropertyChanged("_markupInfoList"); |
|
615 |
} |
|
616 |
} |
|
617 |
|
|
618 |
public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoRevList |
|
619 |
{ |
|
620 |
get |
|
621 |
{ |
|
622 |
return markupInfoRevList; |
|
623 |
} |
|
624 |
set |
|
625 |
{ |
|
626 |
markupInfoRevList = value; |
|
627 |
OnPropertyChanged("_markupInfoRevList"); |
|
628 |
} |
|
629 |
} |
|
630 |
|
|
631 |
|
|
632 |
public double ContentOffsetX |
|
633 |
{ |
|
634 |
get |
|
635 |
{ |
|
636 |
return contentOffsetX; |
|
637 |
} |
|
638 |
set |
|
639 |
{ |
|
640 |
double minOffsetX = 0.0; |
|
641 |
double maxOffsetX = Math.Max(0.0, ContentWidth - ContentViewportWidth); |
|
642 |
contentOffsetX = Math.Min(Math.Max(value, minOffsetX), maxOffsetX); |
|
643 |
OnPropertyChanged("ContentOffsetX"); |
|
644 |
} |
|
645 |
} |
|
646 |
|
|
647 |
public double ContentOffsetY |
|
648 |
{ |
|
649 |
get |
|
650 |
{ |
|
651 |
return contentOffsetY; |
|
652 |
} |
|
653 |
set |
|
654 |
{ |
|
655 |
double minOffsetY = 0.0; |
|
656 |
double maxOffsetY = Math.Max(0.0, ContentHeight - ContentViewportHeight); |
|
657 |
contentOffsetY = Math.Min(Math.Max(value, minOffsetY), maxOffsetY); |
|
658 |
OnPropertyChanged("ContentOffsetY"); |
|
659 |
} |
|
660 |
} |
|
661 |
|
|
662 |
public MessageCollection k_talkMessageSet |
|
663 |
{ |
|
664 |
get |
|
665 |
{ |
|
666 |
if (_k_talkMessageSet ==null) |
|
667 |
{ |
|
668 |
_k_talkMessageSet = new MessageCollection(); |
|
669 |
} |
|
670 |
return _k_talkMessageSet; |
|
671 |
} |
|
672 |
set |
|
673 |
{ |
|
674 |
_k_talkMessageSet = value; |
|
675 |
OnPropertyChanged("k_talkMessageSet"); |
|
676 |
} |
|
677 |
} |
|
678 |
|
|
679 |
public double ContentWidth |
|
680 |
{ |
|
681 |
get |
|
682 |
{ |
|
683 |
return contentWidth; |
|
684 |
} |
|
685 |
set |
|
686 |
{ |
|
687 |
contentWidth = value; |
|
688 |
OnPropertyChanged("ContentWidth"); |
|
689 |
} |
|
690 |
} |
|
691 |
|
|
692 |
public double ContentHeight |
|
693 |
{ |
|
694 |
get |
|
695 |
{ |
|
696 |
return contentHeight; |
|
697 |
} |
|
698 |
set |
|
699 |
{ |
|
700 |
contentHeight = value; |
|
701 |
OnPropertyChanged("ContentHeight"); |
|
702 |
} |
|
703 |
} |
|
704 |
|
|
705 |
public double ContentViewportWidth |
|
706 |
{ |
|
707 |
get |
|
708 |
{ |
|
709 |
return contentViewportWidth; |
|
710 |
} |
|
711 |
set |
|
712 |
{ |
|
713 |
contentViewportWidth = value; |
|
714 |
OnPropertyChanged("ContentViewportWidth"); |
|
715 |
} |
|
716 |
} |
|
717 |
|
|
718 |
public double ContentViewportHeight |
|
719 |
{ |
|
720 |
get |
|
721 |
{ |
|
722 |
return contentViewportHeight; |
|
723 |
} |
|
724 |
set |
|
725 |
{ |
|
726 |
contentViewportHeight = value; |
|
727 |
OnPropertyChanged("ContentViewportHeight"); |
|
728 |
} |
|
729 |
} |
|
730 |
|
|
731 |
public MainWindow SystemMain { get; set; } |
|
732 |
|
|
733 |
public double Angle |
|
734 |
{ |
|
735 |
get |
|
736 |
{ |
|
737 |
return angle; |
|
738 |
} |
|
739 |
set |
|
740 |
{ |
|
741 |
angle = value; |
|
742 |
OnPropertyChanged("Angle"); |
|
743 |
} |
|
744 |
} |
|
745 |
|
|
746 |
private bool _PageBalanceMode { get; set; } |
|
747 |
public bool PageBalanceMode |
|
748 |
{ |
|
749 |
get |
|
750 |
{ |
|
751 |
return _PageBalanceMode; |
|
752 |
} |
|
753 |
set |
|
754 |
{ |
|
755 |
_PageBalanceMode = value; |
|
756 |
OnPropertyChanged("PageBalanceMode"); |
|
757 |
} |
|
758 |
} |
|
759 |
|
|
760 |
private int _PageBalanceNumber { get; set; } |
|
761 |
public int PageBalanceNumber |
|
762 |
{ |
|
763 |
get |
|
764 |
{ |
|
765 |
return _PageBalanceNumber; |
|
766 |
} |
|
767 |
set |
|
768 |
{ |
|
769 |
_PageBalanceNumber = value; |
|
770 |
OnPropertyChanged("PageBalanceNumber"); |
|
771 |
} |
|
772 |
} |
|
773 |
|
|
774 |
private int _PageNumber { get; set; } |
|
775 |
public int PageNumber |
|
776 |
{ |
|
777 |
get |
|
778 |
{ |
|
779 |
return _PageNumber; |
|
780 |
} |
|
781 |
set |
|
782 |
{ |
|
783 |
_PageNumber = value; |
|
784 |
OnPropertyChanged("PageNumber"); |
|
785 |
} |
|
786 |
} |
|
787 |
|
|
788 |
public double AngleOffsetX |
|
789 |
{ |
|
790 |
get |
|
791 |
{ |
|
792 |
return angleOffsetX; |
|
793 |
} |
|
794 |
set |
|
795 |
{ |
|
796 |
angleOffsetX = value; |
|
797 |
OnPropertyChanged("AngleOffsetX"); |
|
798 |
} |
|
799 |
} |
|
800 |
|
|
801 |
public double AngleOffsetY |
|
802 |
{ |
|
803 |
get |
|
804 |
{ |
|
805 |
return angleOffsetY; |
|
806 |
} |
|
807 |
set |
|
808 |
{ |
|
809 |
angleOffsetY = value; |
|
810 |
OnPropertyChanged("AngleOffsetY"); |
|
811 |
} |
|
812 |
} |
|
813 |
|
|
814 |
//강인구 추가(체크리스트) |
|
815 |
private string _CheckList_ID { get; set; } |
|
816 |
public string CheckList_ID |
|
817 |
{ |
|
818 |
get |
|
819 |
{ |
|
820 |
return _CheckList_ID; |
|
821 |
} |
|
822 |
set |
|
823 |
{ |
|
824 |
_CheckList_ID = value; |
|
825 |
OnPropertyChanged("CheckList_ID"); |
|
826 |
} |
|
827 |
} |
|
828 |
//강인구 추가(캡쳐 모드) |
|
829 |
private double _Capture_Opacity { get; set; } |
|
830 |
public double Capture_Opacity |
|
831 |
{ |
|
832 |
get |
|
833 |
{ |
|
834 |
return _Capture_Opacity; |
|
835 |
} |
|
836 |
set |
|
837 |
{ |
|
838 |
_Capture_Opacity = value; |
|
839 |
OnPropertyChanged("Capture_Opacity"); |
|
840 |
} |
|
841 |
} |
|
842 |
|
|
843 |
private Visibility _ViewVisible { get; set; } |
|
844 |
public Visibility ViewVisible |
|
845 |
{ |
|
846 |
get |
|
847 |
{ |
|
848 |
return _ViewVisible; |
|
849 |
} |
|
850 |
set |
|
851 |
{ |
|
852 |
_ViewVisible = value; |
|
853 |
OnPropertyChanged("ViewVisible"); |
|
854 |
} |
|
855 |
} |
|
856 |
private bool _IsSync { get; set; } |
|
857 |
public bool IsSync |
|
858 |
{ |
|
859 |
get |
|
860 |
{ |
|
861 |
return _IsSync; |
|
862 |
} |
|
863 |
set |
|
864 |
{ |
|
865 |
_IsSync = value; |
|
866 |
OnPropertyChanged("IsSync"); |
|
867 |
} |
|
868 |
} |
|
869 |
|
|
870 |
|
|
871 |
|
|
872 |
#endregion Property Member |
|
873 |
|
|
874 |
public System.IO.Stream GetStreamFromUrl(string url) |
|
875 |
{ |
|
876 |
byte[] imageData = null; |
|
877 |
|
|
878 |
using (var wc = new System.Net.WebClient()) |
|
879 |
imageData = wc.DownloadData(url); |
|
880 |
|
|
881 |
return new System.IO.MemoryStream(imageData); |
|
882 |
} |
|
883 |
|
|
884 |
public ViewerDataModel() |
|
885 |
{ |
|
886 |
//rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue)); |
|
887 |
//rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green)); |
|
888 |
//rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple)); |
|
889 |
//rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red)); |
|
890 |
|
|
891 |
//RectangleControl rect1 = new RectangleControl(); |
|
892 |
//rect1.StartPoint = new Point(50, 50); |
|
893 |
//rect1.LeftBottomPoint = new Point(100, 50); |
|
894 |
//rect1.TopRightPoint = new Point(50, 100); |
|
895 |
//rect1.EndPoint = new Point(100, 100); |
|
896 |
//rect1.FillColor = new SolidColorBrush(Colors.Red); |
|
897 |
//rectangles.Add(rect1); |
|
898 |
// |
|
899 |
// Populate the data model with some example data. |
|
900 |
// |
|
901 |
//rectangles.Add(new RectangleData(50, 50, 80, 150, Colors.Blue)); |
|
902 |
//rectangles.Add(new RectangleData(550, 350, 80, 150, Colors.Green)); |
|
903 |
//rectangles.Add(new RectangleData(850, 850, 30, 20, Colors.Purple)); |
|
904 |
//rectangles.Add(new RectangleData(1850, 1850, 80, 150, Colors.Red)); |
|
905 |
|
|
906 |
this.ControlOpacity = 1; |
|
907 |
//강인구 추가 |
|
908 |
|
|
909 |
this.LineSize = 3; |
|
910 |
|
|
911 |
this.DashSize = new DoubleCollection(99999999); |
|
912 |
} |
|
913 |
|
|
914 |
#region INotifyPropertyChanged Event |
|
915 |
|
|
916 |
private void OnPropertyChanged(string name) |
|
917 |
{ |
|
918 |
if (PropertyChanged != null) |
|
919 |
{ |
|
920 |
PropertyChanged(this, new PropertyChangedEventArgs(name)); |
|
921 |
} |
|
922 |
} |
|
923 |
|
|
924 |
public event PropertyChangedEventHandler PropertyChanged; |
|
925 |
|
|
926 |
#endregion |
|
927 |
} |
|
928 |
} |
KCOM/Events/DeleteCommand.cs | ||
---|---|---|
1 |
using KCOM.Common; |
|
2 |
using KCOM.Controls; |
|
3 |
using KCOM.Views; |
|
4 |
using MarkupToPDF.Common; |
|
5 |
using MarkupToPDF.Controls.Parsing; |
|
6 |
using Newtonsoft.Json; |
|
7 |
using Newtonsoft.Json.Converters; |
|
8 |
using Newtonsoft.Json.Linq; |
|
9 |
using Newtonsoft.Json.Serialization; |
|
10 |
using System; |
|
11 |
using System.Collections; |
|
12 |
using System.Collections.Generic; |
|
13 |
using System.ComponentModel; |
|
14 |
using System.Data; |
|
15 |
using System.IO; |
|
16 |
using System.Linq; |
|
17 |
using System.Reflection; |
|
18 |
using System.Runtime.Serialization.Formatters; |
|
19 |
using System.Runtime.Serialization.Formatters.Binary; |
|
20 |
using System.Runtime.Serialization.Json; |
|
21 |
using System.Text; |
|
22 |
using System.Windows; |
|
23 |
using System.Windows.Media; |
|
24 |
using System.Xml; |
|
25 |
using System.Xml.Serialization; |
|
26 |
|
|
27 |
namespace KCOM |
|
28 |
{ |
|
29 |
public class DeleteCommand |
|
30 |
{ |
|
31 |
private static readonly DeleteCommand _instance = new DeleteCommand(); |
|
32 |
|
|
33 |
// Explicit static constructor to tell C# compiler |
|
34 |
// not to mark type as beforefieldinit |
|
35 |
static DeleteCommand() |
|
36 |
{ |
|
37 |
} |
|
38 |
|
|
39 |
private DeleteCommand() |
|
40 |
{ |
|
41 |
} |
|
42 |
|
|
43 |
public static DeleteCommand Instance |
|
44 |
{ |
|
45 |
get |
|
46 |
{ |
|
47 |
return _instance; |
|
48 |
} |
|
49 |
} |
|
50 |
|
|
51 |
/// <summary> |
|
52 |
/// delete given comments |
|
53 |
/// </summary> |
|
54 |
/// <author>humkyung</author> |
|
55 |
/// <date>2019.06.12</date> |
|
56 |
/// <param name="comments"></param> |
|
57 |
public void Execute(ICollection<CommentUserInfo> comments) |
|
58 |
{ |
|
59 |
MarkupToPDF.Common.Undo_data UndoData = new Undo_data() |
|
60 |
{ |
|
61 |
IsUndo = false, |
|
62 |
Event = Event_Type.Delete, |
|
63 |
EventTime = DateTime.Now, |
|
64 |
Markup_List = new List<Multi_Undo_data>() |
|
65 |
}; |
|
66 |
|
|
67 |
foreach (var comment in comments) |
|
68 |
{ |
|
69 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data() |
|
70 |
{ |
|
71 |
Markup = comment |
|
72 |
}; |
|
73 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
74 |
|
|
75 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(comment); |
|
76 |
ViewerDataModel.Instance.MarkupControls.Remove(comment); |
|
77 |
|
|
78 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == comment.CommentID).FirstOrDefault(); |
|
79 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
|
80 |
} |
|
81 |
|
|
82 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
|
83 |
{ |
|
84 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
|
85 |
}); |
|
86 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
87 |
} |
|
88 |
} |
|
89 |
} |
KCOM/Events/Event_KeyEvent.cs | ||
---|---|---|
29 | 29 |
|
30 | 30 |
MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn(); |
31 | 31 |
|
32 |
private List<CommentUserInfo> SelectedItems |
|
33 |
{ |
|
34 |
get |
|
35 |
{ |
|
36 |
List<CommentUserInfo> res = new List<CommentUserInfo>(); |
|
37 |
foreach (var item in this.dzMainMenu.SelectLayer.Children) |
|
38 |
{ |
|
39 |
if (item.GetType().Name == "AdornerFinal") |
|
40 |
{ |
|
41 |
foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>()) |
|
42 |
{ |
|
43 |
res.Add(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
|
44 |
} |
|
45 |
} |
|
46 |
} |
|
47 |
|
|
48 |
return res; |
|
49 |
} |
|
50 |
} |
|
32 | 51 |
|
33 | 52 |
public void KeyEventDownAction(object sender, KeyEventArgs e) |
34 | 53 |
{ |
... | ... | |
559 | 578 |
#region 삭제하기(Delete) |
560 | 579 |
case Key.Delete: |
561 | 580 |
{ |
581 |
DeleteCommand.Instance.Execute(this.SelectedItems); |
|
582 |
/* |
|
562 | 583 |
if (this.dzMainMenu.SelectLayer.Children.Count > 0) |
563 | 584 |
{ |
564 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data(); |
|
565 |
|
|
566 | 585 |
UndoData = new Undo_data() |
567 | 586 |
{ |
568 | 587 |
IsUndo = false, |
... | ... | |
575 | 594 |
{ |
576 | 595 |
if (item.GetType().Name == "AdornerFinal") |
577 | 596 |
{ |
578 |
//List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>(); |
|
579 |
|
|
580 | 597 |
(item as Controls.AdornerFinal).unRegister(); |
581 |
|
|
582 | 598 |
foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>()) |
583 | 599 |
{ |
584 |
//if (!ViewerDataModel.Instance.MarkupControls.Contains(InnerItem.DrawingData)) |
|
585 |
if (!ViewerDataModel.Instance.MarkupControls_USER.Contains(InnerItem.DrawingData)) |
|
600 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data() |
|
586 | 601 |
{ |
587 |
//this.dzMainMenu.ReleaseAdorner(); |
|
588 |
|
|
589 |
multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
|
590 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
591 |
multi_Undo_Data = new Multi_Undo_data(); |
|
592 |
|
|
593 |
ViewerDataModel.Instance.MarkupControls.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
|
594 |
|
|
595 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault(); |
|
596 |
//var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.MarkupInfoID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).MarkupInfoID).FirstOrDefault(); |
|
602 |
Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo |
|
603 |
}; |
|
604 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
597 | 605 |
|
598 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
|
606 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
|
607 |
ViewerDataModel.Instance.MarkupControls.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
|
599 | 608 |
|
600 |
//임시파일에서도 삭제한다. |
|
601 |
TempFile.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString()); |
|
602 |
|
|
603 |
//adornerSet.Add((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo)); |
|
609 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault(); |
|
610 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
|
604 | 611 |
|
605 |
} |
|
612 |
//임시파일에서도 삭제한다. |
|
613 |
TempFile.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString()); |
|
606 | 614 |
} |
607 | 615 |
} |
608 | 616 |
|
... | ... | |
611 | 619 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
612 | 620 |
}); |
613 | 621 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
614 |
|
|
615 |
|
|
616 | 622 |
} |
617 | 623 |
} |
624 |
*/ |
|
618 | 625 |
|
619 | 626 |
this.dzMainMenu.SelectLayer.Children.Clear(); |
620 | 627 |
} |
KCOM/Events/Event_KeyEvent.cs.bak | ||
---|---|---|
1 |
using KCOM.Common; |
|
2 |
using MarkupToPDF.Common; |
|
3 |
using System; |
|
4 |
using System.Collections.Generic; |
|
5 |
using System.ComponentModel; |
|
6 |
using System.Linq; |
|
7 |
using System.Text; |
|
8 |
using System.Windows; |
|
9 |
using System.Windows.Controls; |
|
10 |
using System.Windows.Input; |
|
11 |
using Telerik.Windows.Controls; |
|
12 |
|
|
13 |
namespace KCOM |
|
14 |
{ |
|
15 |
public partial class MainWindow : Window |
|
16 |
{ |
|
17 |
public double CumulativeWheel = 0; |
|
18 |
|
|
19 |
public MarkupToPDF.Common.Undo_data UndoData; |
|
20 |
|
|
21 |
//강인구 추가 |
|
22 |
KCOM.Views.MainMenu mainMenu = new Views.MainMenu(); |
|
23 |
//강인구 추가 |
|
24 |
MarkupToPDF.Controls.Parsing.LayerControl layer = new MarkupToPDF.Controls.Parsing.LayerControl(); |
|
25 |
//강인구 추가 |
|
26 |
MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn(); |
|
27 |
|
|
28 |
public void KeyEventDownAction(object sender, KeyEventArgs e) |
|
29 |
{ |
|
30 |
|
|
31 |
layer.ProjectNo = App.ViewInfo.ProjectNO; |
|
32 |
switch (e.Key) |
|
33 |
{ |
|
34 |
//강인구 추가 |
|
35 |
#region Ctrl |
|
36 |
case Key.LeftCtrl: |
|
37 |
{ |
|
38 |
if (!ViewerDataModel.Instance.IsPressCtrl) |
|
39 |
{ |
|
40 |
ViewerDataModel.Instance.IsPressCtrl = true; |
|
41 |
} |
|
42 |
} |
|
43 |
break; |
|
44 |
case Key.RightCtrl: |
|
45 |
{ |
|
46 |
|
|
47 |
} |
|
48 |
break; |
|
49 |
#endregion |
|
50 |
|
|
51 |
#region Shift |
|
52 |
case Key.RightShift: |
|
53 |
{ |
|
54 |
|
|
55 |
} |
|
56 |
break; |
|
57 |
case Key.LeftShift: |
|
58 |
{ |
|
59 |
if (!ViewerDataModel.Instance.IsPressShift) |
|
60 |
{ |
|
61 |
ViewerDataModel.Instance.IsPressShift = true; |
|
62 |
} |
|
63 |
//if (dzMain.deepZoomObject._MouseHelper.isMouseOver && !dzMain.DeepLayer.Drawing) |
|
64 |
//{ |
|
65 |
// dzMain.deepZoomObject._MouseHelper.isPressShift = true; |
|
66 |
// CumulativeWheel += dzMain.deepZoomObject._MouseHelper.wheelDelta; |
|
67 |
// dzMain.deepZoomObject._MouseHelper.wheelDelta = 0; |
|
68 |
// System.Diagnostics.Debug.WriteLine(CumulativeWheel); |
|
69 |
// if (CumulativeWheel == 3 && CumulativeWheel >= 0) |
|
70 |
// { |
|
71 |
// this.dzMain.pageNavigator.pagebeforetMove(); |
|
72 |
// CumulativeWheel = 0; |
|
73 |
// } |
|
74 |
// else if (CumulativeWheel == -3 && CumulativeWheel <= 0) |
|
75 |
// { |
|
76 |
// this.dzMain.pageNavigator.pageNextMove(); |
|
77 |
// CumulativeWheel = 0; |
|
78 |
// } |
|
79 |
//} |
|
80 |
|
|
81 |
} |
|
82 |
break; |
|
83 |
#endregion |
|
84 |
|
|
85 |
//강인구 추가 |
|
86 |
#region 단축키 선택 |
|
87 |
|
|
88 |
#region 전체 선택(Ctrl + A) |
|
89 |
case Key.A: |
|
90 |
{ |
|
91 |
if (ViewerDataModel.Instance.IsPressCtrl) |
|
92 |
{ |
|
93 |
this.dzMainMenu.InkControl_Convert(); |
|
94 |
|
|
95 |
if (Common.ViewerDataModel.Instance.MarkupControls_USER.Count > 0) |
|
96 |
{ |
|
97 |
//전체 선택 시 선택된 토글 해제 |
|
98 |
var TogList = this.dzTopMenu.Parent.ChildrenOfType<RadToggleButton>(); |
|
99 |
this.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.None; |
|
100 |
this.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None; |
|
101 |
|
|
102 |
//컨트롤을 그리는 도중일 경우 컨트롤 삭제 |
|
103 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(this.dzMainMenu.currentControl); |
|
104 |
this.dzMainMenu.currentControl = null; |
|
105 |
|
|
106 |
foreach (var tog in TogList) |
|
107 |
{ |
|
108 |
tog.IsChecked = false; |
|
109 |
} |
|
110 |
|
|
111 |
//선택된 어도너가 있을 시 취소하고 전체 선택 |
|
112 |
this.dzMainMenu.ReleaseAdorner(); |
|
113 |
|
|
114 |
UndoData = new Undo_data() |
|
115 |
{ |
|
116 |
IsUndo = false, |
|
117 |
Event = Event_Type.Select, |
|
118 |
EventTime = DateTime.Now, |
|
119 |
Markup_List = new List<Multi_Undo_data>() |
|
120 |
}; |
|
121 |
|
|
122 |
List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>(); |
|
123 |
var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.GetType().Name != "").ToList(); |
|
124 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data(); |
|
125 |
|
|
126 |
foreach (var item in control) |
|
127 |
{ |
|
128 |
adornerSet.Add(item); |
|
129 |
//multi_Undo_Data.Markup = item; |
|
130 |
multi_Undo_Data = this.dzMainMenu.Control_Style(item); |
|
131 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
132 |
|
|
133 |
multi_Undo_Data = new Multi_Undo_data(); |
|
134 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item); |
|
135 |
|
|
136 |
} |
|
137 |
|
|
138 |
if (adornerSet.Count > 0) |
|
139 |
{ |
|
140 |
Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet); |
|
141 |
this.dzMainMenu.SelectLayer.Children.Add(final); |
|
142 |
} |
|
143 |
|
|
144 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
|
145 |
{ |
|
146 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
|
147 |
}); |
|
148 |
|
|
149 |
|
|
150 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
151 |
} |
|
152 |
} |
|
153 |
} |
|
154 |
break; |
|
155 |
#endregion |
|
156 |
|
|
157 |
#region 복사하기(Ctrl + C) |
|
158 |
case Key.C: |
|
159 |
{ |
|
160 |
if (ViewerDataModel.Instance.IsPressCtrl) |
|
161 |
{ |
|
162 |
if (this.dzMainMenu.SelectLayer.Children.Count > 0) |
|
163 |
{ |
|
164 |
string MarkupData = ""; |
|
165 |
|
|
166 |
foreach (var item in this.dzMainMenu.SelectLayer.Children) |
|
167 |
{ |
|
168 |
if (item.GetType().Name == "AdornerFinal") |
|
169 |
{ |
|
170 |
foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>()) |
|
171 |
|
|
172 |
{ |
|
173 |
if (!ViewerDataModel.Instance.MarkupControls.Contains(InnerItem.DrawingData)) |
|
174 |
{ |
|
175 |
markupReturn = layer.MarkupToString(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo, App.ViewInfo.UserID); |
|
176 |
MarkupData += "|OR|" + markupReturn.ConvertData; |
|
177 |
} |
|
178 |
} |
|
179 |
Clipboard.SetText(MarkupData); |
|
180 |
} |
|
181 |
} |
|
182 |
} |
|
183 |
} |
|
184 |
} |
|
185 |
break; |
|
186 |
#endregion |
|
187 |
|
|
188 |
#region 잘라내기(Ctrl + X) |
|
189 |
case Key.X: |
|
190 |
{ |
|
191 |
if (ViewerDataModel.Instance.IsPressCtrl) |
|
192 |
{ |
|
193 |
if (this.dzMainMenu.SelectLayer.Children.Count > 0) |
|
194 |
{ |
|
195 |
foreach (var item in this.dzMainMenu.SelectLayer.Children) |
|
196 |
{ |
|
197 |
string MarkupData = ""; |
|
198 |
|
|
199 |
if (item.GetType().Name == "AdornerFinal") |
|
200 |
{ |
|
201 |
foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>()) |
|
202 |
{ |
|
203 |
if (!ViewerDataModel.Instance.MarkupControls.Contains(InnerItem.DrawingData)) |
|
204 |
{ |
|
205 |
markupReturn = layer.MarkupToString(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo, App.ViewInfo.UserID); |
|
206 |
MarkupData += "|OR|" + markupReturn.ConvertData; |
|
207 |
} |
|
208 |
} |
|
209 |
Clipboard.SetText(MarkupData); |
|
210 |
} |
|
211 |
} |
|
212 |
this.dzMainMenu.SelectLayer.Children.Clear(); |
|
213 |
} |
|
214 |
} |
|
215 |
} |
|
216 |
break; |
|
217 |
#endregion |
|
218 |
|
|
219 |
#region 붙여넣기(Ctrl + V) |
|
220 |
case Key.V: |
|
221 |
{ |
|
222 |
if (ViewerDataModel.Instance.IsPressCtrl) |
|
223 |
{ |
|
224 |
//마크업 붙여넣기 |
|
225 |
if (Clipboard.GetText().Contains("|DZ|")) |
|
226 |
{ |
|
227 |
List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>(); |
|
228 |
|
|
229 |
string[] delimiterChars = { "|OR|" }; |
|
230 |
string[] data = Clipboard.GetText().Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); |
|
231 |
|
|
232 |
this.dzMainMenu.ReleaseAdorner(); |
|
233 |
|
|
234 |
Multi_Undo_data multi_Undo_Data = new Multi_Undo_data(); |
|
235 |
|
|
236 |
//강인구 Undo/Redo 보류 |
|
237 |
UndoData = new Undo_data() |
|
238 |
{ |
|
239 |
IsUndo = false, |
|
240 |
Event = Event_Type.Create, |
|
241 |
EventTime = DateTime.Now, |
|
242 |
Markup_List = new List<Multi_Undo_data>() |
|
243 |
}; |
|
244 |
|
|
245 |
ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i => |
|
246 |
{ |
|
247 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
|
248 |
}); |
|
249 |
|
|
250 |
foreach (string parse in data) |
|
251 |
{ |
|
252 |
if(parse != "") |
|
253 |
{ |
|
254 |
System.Windows.Controls.Control item = layer.markupParse_Paste(parse, ViewerDataModel.Instance.MarkupControls_USER); |
|
255 |
(item as MarkupToPDF.Common.CommentUserInfo).CommentID = Events.Save.shortGuid(); |
|
256 |
|
|
257 |
ViewerDataModel.Instance.MarkupControls.Remove(item as MarkupToPDF.Common.CommentUserInfo); |
|
258 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item as MarkupToPDF.Common.CommentUserInfo); |
|
259 |
|
|
260 |
adornerSet.Add(item as MarkupToPDF.Common.CommentUserInfo); |
|
261 |
|
|
262 |
//Controls.AdornerFinal final = new Controls.AdornerFinal(item as MarkupToPDF.Common.CommentUserInfo); |
|
263 |
//this.dzMainMenu.SelectLayer.Children.Add(final); |
|
264 |
|
|
265 |
multi_Undo_Data = dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo); |
|
266 |
|
|
267 |
UndoData.Markup_List.Add(multi_Undo_Data); |
|
268 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
269 |
} |
내보내기 Unified diff