프로젝트

일반

사용자정보

개정판 ce674e4e

IDce674e4ec8cd101e104cb0d6c6ffbd970d30fe74
상위 8c062d19
하위 060501e2, 4836261b

김동진이(가) 약 6년 전에 추가함

issue #812 control move hotkey modify

차이점 보기:

KCOM/Events/Event_KeyEvent.cs
35 35
        {
36 36

  
37 37
            layer.ProjectNo = App.ViewInfo.ProjectNO;
38
            
38 39
            switch (e.Key)
39 40
            {
40 41
                //강인구 추가
......
694 695
                case Key.Up:
695 696
                case Key.Down:
696 697
                    {
697
                        if (this.dzMainMenu.SelectLayer.Children.Count > 0)
698
                        if(ViewerDataModel.Instance.IsPressShift)
698 699
                        {
699
                            Point control = new Point(0, 0);
700
                            double resultAngle = this.dzMainMenu.rotate.Angle;
701

  
702
                            switch (e.Key)
700
                            if (this.dzMainMenu.SelectLayer.Children.Count > 0)
703 701
                            {
704
                                case Key.Down:
705
                                    if (resultAngle == 0) control = new Point(control.X, control.Y + 5);
706
                                    if (resultAngle == 90) control = new Point(control.X + 5, control.Y);
707
                                    if (resultAngle == 180) control = new Point(control.X, control.Y - 5);
708
                                    if (resultAngle == 270) control = new Point(control.X - 5, control.Y);
709
                                    break;
710
                                case Key.Up:
711
                                    if (resultAngle == 0) control = new Point(control.X, control.Y - 5);
712
                                    if (resultAngle == 90) control = new Point(control.X - 5, control.Y);
713
                                    if (resultAngle == 180) control = new Point(control.X, control.Y + 5);
714
                                    if (resultAngle == 270) control = new Point(control.X + 5, control.Y);
715
                                    break;
716
                                case Key.Left:
717
                                    if (resultAngle == 0) control = new Point(control.X - 5, control.Y);
718
                                    if (resultAngle == 90) control = new Point(control.X, control.Y + 5);
719
                                    if (resultAngle == 180) control = new Point(control.X + 5, control.Y);
720
                                    if (resultAngle == 270) control = new Point(control.X, control.Y - 5);
721
                                    break;
722
                                case Key.Right:
723
                                    if (resultAngle == 0) control = new Point(control.X + 5, control.Y);
724
                                    if (resultAngle == 90) control = new Point(control.X, control.Y - 5);
725
                                    if (resultAngle == 180) control = new Point(control.X - 5, control.Y);
726
                                    if (resultAngle == 270) control = new Point(control.X, control.Y + 5);
727
                                    break;
728
                                default:
729
                                    break;
730
                            }
702
                                Point control = new Point(0, 0);
703
                                double resultAngle = this.dzMainMenu.rotate.Angle;
704

  
705
                                switch (e.Key)
706
                                {
707
                                    case Key.Down:
708
                                        if (resultAngle == 0) control = new Point(control.X, control.Y + 5);
709
                                        if (resultAngle == 90) control = new Point(control.X + 5, control.Y);
710
                                        if (resultAngle == 180) control = new Point(control.X, control.Y - 5);
711
                                        if (resultAngle == 270) control = new Point(control.X - 5, control.Y);
712
                                        break;
713
                                    case Key.Up:
714
                                        if (resultAngle == 0) control = new Point(control.X, control.Y - 5);
715
                                        if (resultAngle == 90) control = new Point(control.X - 5, control.Y);
716
                                        if (resultAngle == 180) control = new Point(control.X, control.Y + 5);
717
                                        if (resultAngle == 270) control = new Point(control.X + 5, control.Y);
718
                                        break;
719
                                    case Key.Left:
720
                                        if (resultAngle == 0) control = new Point(control.X - 5, control.Y);
721
                                        if (resultAngle == 90) control = new Point(control.X, control.Y + 5);
722
                                        if (resultAngle == 180) control = new Point(control.X + 5, control.Y);
723
                                        if (resultAngle == 270) control = new Point(control.X, control.Y - 5);
724
                                        break;
725
                                    case Key.Right:
726
                                        if (resultAngle == 0) control = new Point(control.X + 5, control.Y);
727
                                        if (resultAngle == 90) control = new Point(control.X, control.Y - 5);
728
                                        if (resultAngle == 180) control = new Point(control.X - 5, control.Y);
729
                                        if (resultAngle == 270) control = new Point(control.X, control.Y + 5);
730
                                        break;
731
                                    default:
732
                                        break;
733
                                }
731 734

  
732 735

  
733
                            foreach (var item in this.dzMainMenu.SelectLayer.Children)
734
                            {
735
                                if (item.GetType().Name == "AdornerFinal")
736
                                foreach (var item in this.dzMainMenu.SelectLayer.Children)
736 737
                                {
737
                                    if ((Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control)
738
                                    {
739
                                        (item as Controls.AdornerFinal).MoveRotate(new System.Windows.Controls.Primitives.DragDeltaEventArgs(control.X * 2, control.Y * 2));
740
                                    }
741
                                    else
738
                                    if (item.GetType().Name == "AdornerFinal")
742 739
                                    {
743
                                        (item as Controls.AdornerFinal).MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(control.X, control.Y));
744
                                    }
740
                                        if ((Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control)
741
                                        {
742
                                            (item as Controls.AdornerFinal).MoveRotate(new System.Windows.Controls.Primitives.DragDeltaEventArgs(control.X * 2, control.Y * 2));
743
                                        }
744
                                        else
745
                                        {
746
                                            (item as Controls.AdornerFinal).MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(control.X, control.Y));
747
                                        }
745 748

  
749
                                    }
746 750
                                }
747 751
                            }
748 752
                        }

내보내기 Unified diff

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