프로젝트

일반

사용자정보

개정판 d543f923

IDd543f923d8f27eab970c366ed692dcdf2299fbf2
상위 4e24ca5f
하위 d3f9ede5, a09852e9

이지연이(가) 5년 이상 전에 추가함

issue #923: 키보드 화살표 키로 컨트롤을 이동할 수 있다.

Change-Id: I06503919a01763fb4a3889ec4fde02b5d45fbf5f

차이점 보기:

KCOM/Events/Event_KeyEvent.cs
290 290
                case Key.NumPad4:
291 291
                case Key.NumPad5:
292 292
                case Key.NumPad6:
293
                case Key.NumPad8:
293
                case Key.NumPad8:               
294 294
                    {
295 295
                        if(ViewerDataModel.Instance.IsPressShift)
296 296
                        {
......
349 349
                        }
350 350
                    }
351 351
                    break;
352
                case Key.Right:
353
                case Key.Left:
354
                case Key.Up:
355
                case Key.Down:
356
                    {
357
                        if (this.dzMainMenu.SelectLayer.Children.Count > 0)
358
                        {
359
                            Point control = new Point(0, 0);
360
                            double resultAngle = this.dzMainMenu.rotate.Angle;
361

  
362
                            switch (e.Key)
363
                            {
364
                                case Key.Down:
365
                                    if (resultAngle == 0) control = new Point(control.X, control.Y + 5);
366
                                    if (resultAngle == 90) control = new Point(control.X + 5, control.Y);
367
                                    if (resultAngle == 180) control = new Point(control.X, control.Y - 5);
368
                                    if (resultAngle == 270) control = new Point(control.X - 5, control.Y);
369
                                    break;
370
                                case Key.Up:
371
                                    if (resultAngle == 0) control = new Point(control.X, control.Y - 5);
372
                                    if (resultAngle == 90) control = new Point(control.X - 5, control.Y);
373
                                    if (resultAngle == 180) control = new Point(control.X, control.Y + 5);
374
                                    if (resultAngle == 270) control = new Point(control.X + 5, control.Y);
375
                                    break;
376
                                case Key.Left:
377
                                    if (resultAngle == 0) control = new Point(control.X - 5, control.Y);
378
                                    if (resultAngle == 90) control = new Point(control.X, control.Y + 5);
379
                                    if (resultAngle == 180) control = new Point(control.X + 5, control.Y);
380
                                    if (resultAngle == 270) control = new Point(control.X, control.Y - 5);
381
                                    break;
382
                                case Key.Right:
383
                                    if (resultAngle == 0) control = new Point(control.X + 5, control.Y);
384
                                    if (resultAngle == 90) control = new Point(control.X, control.Y - 5);
385
                                    if (resultAngle == 180) control = new Point(control.X - 5, control.Y);
386
                                    if (resultAngle == 270) control = new Point(control.X, control.Y + 5);
387
                                    break;
388
                                default:
389
                                    break;
390
                            }
391

  
392
                            foreach (var item in this.dzMainMenu.SelectLayer.Children)
393
                            {
394
                                if (item.GetType().Name == "AdornerFinal")
395
                                {
396
                                    if ((Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control)
397
                                    {
398
                                        (item as Controls.AdornerFinal).MoveRotate(new System.Windows.Controls.Primitives.DragDeltaEventArgs(control.X * 2, control.Y * 2));
399
                                    }
400
                                    else
401
                                    {
402
                                        (item as Controls.AdornerFinal).TranslateItems(control.X, control.Y);
403
                                    }
404

  
405
                                }
406
                            }
407
                        }
408
                    }
409
                    break;
352 410
                #endregion
353 411
                case Key.PageUp:
354 412
                    this.dzMainMenu.pageNavigator.GotoPage(Convert.ToInt32(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber) - 1);

내보내기 Unified diff

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