프로젝트

일반

사용자정보

개정판 a0bab669

IDa0bab669c4ef11fb91c4e652c68919048d5748f7
상위 7ca218b3
하위 5ce56a3a

KangIngu 이(가) 약 7년 전에 추가함

상단 이미지 변경 추가

차이점 보기:

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

클립보드 이미지 추가 (최대 크기: 500 MB)