개정판 a0bab669
상단 이미지 변경 추가
KCOM/Events/Event_KeyEvent.cs | ||
---|---|---|
593 | 593 |
//강인구 추가 |
594 | 594 |
#region Control Move |
595 | 595 |
case Key.Right: |
596 |
{ |
|
597 |
|
|
598 |
} |
|
599 |
break; |
|
600 | 596 |
case Key.Left: |
597 |
case Key.Up: |
|
598 |
case Key.Down: |
|
601 | 599 |
{ |
600 |
if (this.dzMainMenu.SelectLayer.Children.Count > 0) |
|
601 |
{ |
|
602 |
Point control = new Point(0, 0); |
|
603 |
double resultAngle = this.dzMainMenu.rotate.Angle; |
|
604 |
|
|
605 |
switch (e.Key) |
|
606 |
{ |
|
607 |
case Key.Down: |
|
608 |
if (resultAngle == 0) control = new Point(control.X, control.Y + 5); |
|
609 |
if (resultAngle == 90) control = new Point(control.X + 5, control.Y); |
|
610 |
if (resultAngle == 180) control = new Point(control.X, control.Y - 5); |
|
611 |
if (resultAngle == 270) control = new Point(control.X - 5, control.Y); |
|
612 |
break; |
|
613 |
case Key.Up: |
|
614 |
if (resultAngle == 0) control = new Point(control.X, control.Y - 5); |
|
615 |
if (resultAngle == 90) control = new Point(control.X - 5, control.Y); |
|
616 |
if (resultAngle == 180) control = new Point(control.X, control.Y + 5); |
|
617 |
if (resultAngle == 270) control = new Point(control.X + 5, control.Y); |
|
618 |
break; |
|
619 |
case Key.Left: |
|
620 |
if (resultAngle == 0) control = new Point(control.X - 5, control.Y); |
|
621 |
if (resultAngle == 90) control = new Point(control.X, control.Y + 5); |
|
622 |
if (resultAngle == 180) control = new Point(control.X + 5, control.Y); |
|
623 |
if (resultAngle == 270) control = new Point(control.X, control.Y - 5); |
|
624 |
break; |
|
625 |
case Key.Right: |
|
626 |
if (resultAngle == 0) control = new Point(control.X + 5, control.Y); |
|
627 |
if (resultAngle == 90) control = new Point(control.X, control.Y - 5); |
|
628 |
if (resultAngle == 180) control = new Point(control.X - 5, control.Y); |
|
629 |
if (resultAngle == 270) control = new Point(control.X, control.Y + 5); |
|
630 |
break; |
|
631 |
default: |
|
632 |
break; |
|
633 |
} |
|
634 |
|
|
635 |
|
|
636 |
foreach (var item in this.dzMainMenu.SelectLayer.Children) |
|
637 |
{ |
|
638 |
if (item.GetType().Name == "AdornerFinal") |
|
639 |
{ |
|
640 |
if ((Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) |
|
641 |
{ |
|
642 |
(item as Controls.AdornerFinal).MoveRotate(new System.Windows.Controls.Primitives.DragDeltaEventArgs(control.X * 2, control.Y * 2)); |
|
643 |
} |
|
644 |
else |
|
645 |
{ |
|
646 |
(item as Controls.AdornerFinal).MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(control.X, control.Y)); |
|
647 |
} |
|
602 | 648 |
|
649 |
} |
|
650 |
} |
|
651 |
} |
|
603 | 652 |
} |
604 | 653 |
break; |
605 | 654 |
#endregion |
내보내기 Unified diff