개정판 5bec847f
Fix: +를 객체의 ZIndex를 높였을때 새로 생성한 객체가 가려지는 오류 수정
Change-Id: I4581a24ddc9e8cee946904494423fbd5d40e27bf
KCOM/Events/Event_KeyEvent.cs | ||
---|---|---|
19 | 19 |
using System.Windows.Media; |
20 | 20 |
using System.Windows.Media.Imaging; |
21 | 21 |
using Telerik.Windows.Controls; |
22 |
//using static KCOM.Views.MainMenu; |
|
23 | 22 |
|
24 | 23 |
namespace KCOM |
25 | 24 |
{ |
26 | 25 |
public partial class MainWindow : KCOM.Controls.CustomizedWindow.CustomWindow |
27 | 26 |
{ |
28 |
public double CumulativeWheel = 0; |
|
29 |
MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn(); |
|
30 |
|
|
31 | 27 |
/// <summary> |
32 | 28 |
/// 입력한 키 처리 |
33 | 29 |
/// </summary> |
... | ... | |
35 | 31 |
/// <param name="e"></param> |
36 | 32 |
public async void KeyEventDownAction(object sender, KeyEventArgs e) |
37 | 33 |
{ |
38 |
//if (e.IsRepeat && !ViewerDataModel.Instance.IsPressCtrl && !ViewerDataModel.Instance.IsPressShift) |
|
39 |
// return; |
|
40 | 34 |
await this.Dispatcher.InvokeAsync(() => { |
41 | 35 |
switch (e.Key) |
42 | 36 |
{ |
... | ... | |
425 | 419 |
} |
426 | 420 |
else |
427 | 421 |
{ |
428 |
//if (ViewerDataModel.Instance.IsPressCtrl) |
|
429 |
//{ |
|
430 |
bool IsMovePossibility = false; |
|
422 |
bool IsMovePossibility = false; |
|
431 | 423 |
|
432 |
var instance = ViewerDataModel.Instance;
|
|
424 |
var instance = ViewerDataModel.Instance; |
|
433 | 425 |
|
434 |
if ((e.Key == Key.NumPad5) || (e.Key == Key.Down)) |
|
426 |
if ((e.Key == Key.NumPad5) || (e.Key == Key.Down)) |
|
427 |
{ |
|
428 |
if (instance.ContentHeight > instance.ContentOffsetY + instance.ContentViewportHeight) |
|
435 | 429 |
{ |
436 |
if (instance.ContentHeight > instance.ContentOffsetY + instance.ContentViewportHeight) |
|
437 |
{ |
|
438 |
IsMovePossibility = true; |
|
439 |
} |
|
430 |
IsMovePossibility = true; |
|
440 | 431 |
} |
441 |
else if ((e.Key == Key.NumPad8) || (e.Key == Key.Up)) |
|
432 |
} |
|
433 |
else if ((e.Key == Key.NumPad8) || (e.Key == Key.Up)) |
|
434 |
{ |
|
435 |
if (0 < instance.ContentOffsetY) |
|
442 | 436 |
{ |
443 |
if (0 < instance.ContentOffsetY) |
|
444 |
{ |
|
445 |
IsMovePossibility = true; |
|
446 |
} |
|
437 |
IsMovePossibility = true; |
|
447 | 438 |
} |
448 |
else if ((e.Key == Key.NumPad4) || (e.Key == Key.Left)) |
|
439 |
} |
|
440 |
else if ((e.Key == Key.NumPad4) || (e.Key == Key.Left)) |
|
441 |
{ |
|
442 |
if (0 < instance.ContentOffsetX) |
|
449 | 443 |
{ |
450 |
if (0 < instance.ContentOffsetX) |
|
451 |
{ |
|
452 |
IsMovePossibility = true; |
|
453 |
} |
|
444 |
IsMovePossibility = true; |
|
454 | 445 |
} |
455 |
else if ((e.Key == Key.NumPad6) || (e.Key == Key.Right)) |
|
446 |
} |
|
447 |
else if ((e.Key == Key.NumPad6) || (e.Key == Key.Right)) |
|
448 |
{ |
|
449 |
if (instance.ContentWidth > instance.ContentOffsetX + instance.ContentViewportWidth) |
|
456 | 450 |
{ |
457 |
if (instance.ContentWidth > instance.ContentOffsetX + instance.ContentViewportWidth) |
|
458 |
{ |
|
459 |
IsMovePossibility = true; |
|
460 |
} |
|
451 |
IsMovePossibility = true; |
|
461 | 452 |
} |
453 |
} |
|
462 | 454 |
|
463 |
if (IsMovePossibility)
|
|
464 |
{
|
|
465 |
Vector dragOffset = new Vector(MovePoint.Value.X * -10, MovePoint.Value.Y * -10);
|
|
455 |
if (IsMovePossibility) |
|
456 |
{ |
|
457 |
Vector dragOffset = new Vector(MovePoint.Value.X * -10, MovePoint.Value.Y * -10); |
|
466 | 458 |
|
467 |
this.dzMainMenu.MoveZoomAndPanControl(dragOffset);
|
|
459 |
this.dzMainMenu.MoveZoomAndPanControl(dragOffset); |
|
468 | 460 |
|
469 |
this.dzMainMenu.MainDocumentPanel.Focus();
|
|
461 |
this.dzMainMenu.MainDocumentPanel.Focus(); |
|
470 | 462 |
|
471 |
System.Diagnostics.Debug.WriteLine(this.dzMainMenu.zoomAndPanControl.ContentOffsetX); |
|
472 |
} |
|
473 |
//} |
|
463 |
System.Diagnostics.Debug.WriteLine(this.dzMainMenu.zoomAndPanControl.ContentOffsetX); |
|
464 |
} |
|
474 | 465 |
} |
475 | 466 |
} |
476 | 467 |
} |
... | ... | |
487 | 478 |
case Key.Add: |
488 | 479 |
foreach (var item in SelectionSet.Instance.SelectedItems) |
489 | 480 |
{ |
490 |
if (item.ZIndex < 100)
|
|
481 |
if (item.ZIndex < 99)
|
|
491 | 482 |
{ |
492 | 483 |
item.ZIndex++; |
493 | 484 |
Canvas.SetZIndex(item, item.ZIndex); |
내보내기 Unified diff