개정판 e36af3a8
issue #1031: IsPressCtrl, IsPressShift 속성을 현재 키보드 상태를 반환하도록 변경
Change-Id: I992c54b8fbe96c8b0fe923df790b76d7e333214c
KCOM/Common/SelectionSet.cs | ||
---|---|---|
126 | 126 |
try |
127 | 127 |
{ |
128 | 128 |
//Logger.sendCheckLog("pageNavigator_PageChanging_ReleaseAdorner", 1); |
129 |
if (ViewerDataModel.Instance.IsPressCtrl) |
|
130 |
{ |
|
131 |
ViewerDataModel.Instance.IsPressCtrl = false; |
|
132 |
} |
|
133 |
|
|
134 | 129 |
if (mainMenu.SelectLayer.Children.Count > 0) |
135 | 130 |
{ |
136 | 131 |
foreach (var item in mainMenu.SelectLayer.Children) |
KCOM/Common/ViewerDataModel.cs | ||
---|---|---|
251 | 251 |
} |
252 | 252 |
} |
253 | 253 |
|
254 |
private bool _IsPressShift { get; set; } |
|
255 | 254 |
public bool IsPressShift |
256 | 255 |
{ |
257 | 256 |
get |
258 | 257 |
{ |
259 |
return _IsPressShift; |
|
260 |
} |
|
261 |
set |
|
262 |
{ |
|
263 |
_IsPressShift = value; |
|
264 |
OnPropertyChanged("IsPressShift"); |
|
258 |
return ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Shift) == System.Windows.Input.ModifierKeys.Shift); |
|
265 | 259 |
} |
266 | 260 |
} |
267 | 261 |
|
268 |
//강인구 추가 |
|
269 |
private bool _IsPressCtrl { get; set; } |
|
270 | 262 |
public bool IsPressCtrl |
271 | 263 |
{ |
272 | 264 |
get |
273 | 265 |
{ |
274 |
return _IsPressCtrl; |
|
275 |
} |
|
276 |
set |
|
277 |
{ |
|
278 |
_IsPressCtrl = value; |
|
279 |
OnPropertyChanged("IsPressCtrl"); |
|
266 |
return ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Control) == System.Windows.Input.ModifierKeys.Control); |
|
280 | 267 |
} |
281 | 268 |
} |
282 | 269 |
|
KCOM/Events/Event_KeyEvent.cs | ||
---|---|---|
28 | 28 |
switch (e.Key) |
29 | 29 |
{ |
30 | 30 |
//강인구 추가 |
31 |
#region Ctrl |
|
32 |
case Key.LeftCtrl: |
|
33 |
{ |
|
34 |
if (!ViewerDataModel.Instance.IsPressCtrl) |
|
35 |
{ |
|
36 |
ViewerDataModel.Instance.IsPressCtrl = true; |
|
37 |
} |
|
38 |
} |
|
39 |
break; |
|
40 |
case Key.RightCtrl: |
|
41 |
{ |
|
42 |
|
|
43 |
} |
|
44 |
break; |
|
45 |
#endregion |
|
46 |
|
|
47 |
#region Shift |
|
48 |
case Key.RightShift: |
|
49 |
{ |
|
50 |
|
|
51 |
} |
|
52 |
break; |
|
53 |
case Key.LeftShift: |
|
54 |
{ |
|
55 |
if (!ViewerDataModel.Instance.IsPressShift) |
|
56 |
{ |
|
57 |
ViewerDataModel.Instance.IsPressShift = true; |
|
58 |
} |
|
59 |
//if (dzMain.deepZoomObject._MouseHelper.isMouseOver && !dzMain.DeepLayer.Drawing) |
|
60 |
//{ |
|
61 |
// dzMain.deepZoomObject._MouseHelper.isPressShift = true; |
|
62 |
// CumulativeWheel += dzMain.deepZoomObject._MouseHelper.wheelDelta; |
|
63 |
// dzMain.deepZoomObject._MouseHelper.wheelDelta = 0; |
|
64 |
// System.Diagnostics.Debug.WriteLine(CumulativeWheel); |
|
65 |
// if (CumulativeWheel == 3 && CumulativeWheel >= 0) |
|
66 |
// { |
|
67 |
// this.dzMain.pageNavigator.pagebeforetMove(); |
|
68 |
// CumulativeWheel = 0; |
|
69 |
// } |
|
70 |
// else if (CumulativeWheel == -3 && CumulativeWheel <= 0) |
|
71 |
// { |
|
72 |
// this.dzMain.pageNavigator.pageNextMove(); |
|
73 |
// CumulativeWheel = 0; |
|
74 |
// } |
|
75 |
//} |
|
76 |
|
|
77 |
} |
|
78 |
break; |
|
79 |
#endregion |
|
80 |
|
|
81 |
//강인구 추가 |
|
82 | 31 |
#region 단축키 선택 |
83 | 32 |
|
84 | 33 |
#region 전체 선택(Ctrl + A) |
... | ... | |
299 | 248 |
if (this.dzMainMenu.SelectLayer.Children.Count > 0) |
300 | 249 |
{ |
301 | 250 |
Point? control = null; |
302 |
if ((((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift) && (e.Key == Key.NumPad5)) || |
|
303 |
(e.Key == Key.Down)) |
|
251 |
if ((ViewerDataModel.Instance.IsPressShift && (e.Key == Key.NumPad5)) || (e.Key == Key.Down)) |
|
304 | 252 |
{ |
305 | 253 |
control = new Point(0, 5); |
306 | 254 |
} |
307 |
else if ((((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift) && (e.Key == Key.NumPad8)) || |
|
308 |
(e.Key == Key.Up)) |
|
255 |
else if ((ViewerDataModel.Instance.IsPressShift && (e.Key == Key.NumPad8)) || (e.Key == Key.Up)) |
|
309 | 256 |
{ |
310 | 257 |
control = new Point(0, -5); |
311 | 258 |
} |
312 |
else if ((((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift) && (e.Key == Key.NumPad4)) || |
|
313 |
(e.Key == Key.Left)) |
|
259 |
else if ((ViewerDataModel.Instance.IsPressShift && (e.Key == Key.NumPad4)) || (e.Key == Key.Left)) |
|
314 | 260 |
{ |
315 | 261 |
control = new Point(-5, 0); |
316 | 262 |
} |
317 |
else if ((((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift) && (e.Key == Key.NumPad6)) || |
|
318 |
(e.Key == Key.Right)) |
|
263 |
else if ((ViewerDataModel.Instance.IsPressShift && (e.Key == Key.NumPad6)) || (e.Key == Key.Right)) |
|
319 | 264 |
{ |
320 | 265 |
control = new Point(5, 0); |
321 | 266 |
} |
... | ... | |
359 | 304 |
} |
360 | 305 |
} |
361 | 306 |
} |
362 |
|
|
363 |
public void KeyEventUpAction(object sender, KeyEventArgs e) |
|
364 |
{ |
|
365 |
switch (e.Key) |
|
366 |
{ |
|
367 |
//강인구 추가 |
|
368 |
#region Ctrl |
|
369 |
case Key.LeftCtrl: |
|
370 |
{ |
|
371 |
if (ViewerDataModel.Instance.IsPressCtrl) |
|
372 |
{ |
|
373 |
ViewerDataModel.Instance.IsPressCtrl = false; |
|
374 |
} |
|
375 |
} |
|
376 |
break; |
|
377 |
case Key.RightCtrl: |
|
378 |
{ |
|
379 |
|
|
380 |
} |
|
381 |
break; |
|
382 |
#endregion |
|
383 |
|
|
384 |
#region Shift |
|
385 |
case Key.RightShift: |
|
386 |
case Key.LeftShift: |
|
387 |
{ |
|
388 |
ViewerDataModel.Instance.IsPressShift = false; |
|
389 |
} |
|
390 |
break; |
|
391 |
#endregion |
|
392 |
} |
|
393 |
} |
|
394 | 307 |
} |
395 | 308 |
} |
KCOM/Events/Implementation/TopMenuEvent.cs | ||
---|---|---|
333 | 333 |
ViewerDataModel.Instance._markupInfoList.Where(data => data.MarkupInfoID == (item as IKCOM.MarkupInfoItem).MarkupInfoID).FirstOrDefault().UpdateTime = DateTime.Now; |
334 | 334 |
if (!ViewerDataModel.Instance.IsConsolidate && (sender != null)) |
335 | 335 |
{ |
336 |
if (ViewerDataModel.Instance.IsPressCtrl) ViewerDataModel.Instance.IsPressCtrl = false; |
|
337 | 336 |
this.ParentOfType<MainWindow>().DialogMessage_Alert("Save 가 완료되었습니다.", "Alert"); |
338 | 337 |
} |
339 | 338 |
} |
... | ... | |
404 | 403 |
//강인구 추가 |
405 | 404 |
public void Print_Start(string Type) |
406 | 405 |
{ |
407 |
if (ViewerDataModel.Instance.IsPressCtrl) |
|
408 |
{ |
|
409 |
ViewerDataModel.Instance.IsPressCtrl = false; |
|
410 |
} |
|
411 | 406 |
if (ViewerDataModel.Instance.MarkupControls_USER.Count > 0 || this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0) |
412 | 407 |
{ |
413 | 408 |
var menu = this.ParentOfType<MainWindow>().dzMainMenu; |
KCOM/MainWindow.xaml.cs | ||
---|---|---|
49 | 49 |
App.splashString(ISplashMessage.MAINWINDOW); |
50 | 50 |
this.Loaded += MainWindow_Loaded; |
51 | 51 |
this.KeyDown += new KeyEventHandler(KeyEventDownAction); |
52 |
this.KeyUp += new KeyEventHandler(KeyEventUpAction); |
|
53 | 52 |
this.SourceInitialized += new EventHandler(win_SourceInitialized); |
54 | 53 |
} |
55 | 54 |
|
내보내기 Unified diff