프로젝트

일반

사용자정보

개정판 e36af3a8

IDe36af3a80d490d0ed7aa54c4d85dc6601354f244
상위 8ce5c897
하위 f19ebe30

백흠경이(가) 5년 이상 전에 추가함

issue #1031: IsPressCtrl, IsPressShift 속성을 현재 키보드 상태를 반환하도록 변경

Change-Id: I992c54b8fbe96c8b0fe923df790b76d7e333214c

차이점 보기:

KCOM/Events/Event_KeyEvent.cs
28 28
            switch (e.Key)
29 29
            {
30 30
                //강인구 추가
31
                #region Ctrl
32
                case Key.LeftCtrl:
33
                    {
34
                        if (!ViewerDataModel.Instance.IsPressCtrl)
35
                        {
36
                            ViewerDataModel.Instance.IsPressCtrl = true;
37
                        }
38
                    }
39
                    break;
40
                case Key.RightCtrl:
41
                    {
42

  
43
                    }
44
                    break;
45
                #endregion
46

  
47
                #region Shift
48
                case Key.RightShift:
49
                    {
50

  
51
                    }
52
                    break;
53
                case Key.LeftShift:
54
                    {
55
                        if (!ViewerDataModel.Instance.IsPressShift)
56
                        {
57
                            ViewerDataModel.Instance.IsPressShift = true;
58
                        }
59
                        //if (dzMain.deepZoomObject._MouseHelper.isMouseOver && !dzMain.DeepLayer.Drawing)
60
                        //{
61
                        //    dzMain.deepZoomObject._MouseHelper.isPressShift = true;
62
                        //    CumulativeWheel += dzMain.deepZoomObject._MouseHelper.wheelDelta;
63
                        //    dzMain.deepZoomObject._MouseHelper.wheelDelta = 0;
64
                        //    System.Diagnostics.Debug.WriteLine(CumulativeWheel);
65
                        //    if (CumulativeWheel == 3 && CumulativeWheel >= 0)
66
                        //    {
67
                        //        this.dzMain.pageNavigator.pagebeforetMove();
68
                        //        CumulativeWheel = 0;
69
                        //    }
70
                        //    else if (CumulativeWheel == -3 && CumulativeWheel <= 0)
71
                        //    {
72
                        //        this.dzMain.pageNavigator.pageNextMove();
73
                        //        CumulativeWheel = 0;
74
                        //    }
75
                        //}
76

  
77
                    }
78
                    break;
79
                #endregion
80

  
81
                //강인구 추가
82 31
                #region 단축키 선택
83 32

  
84 33
                #region 전체 선택(Ctrl + A)
......
299 248
                        if (this.dzMainMenu.SelectLayer.Children.Count > 0)
300 249
                        {
301 250
                            Point? control = null;
302
                            if ((((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift) && (e.Key == Key.NumPad5)) ||
303
                                (e.Key == Key.Down))
251
                            if ((ViewerDataModel.Instance.IsPressShift && (e.Key == Key.NumPad5)) || (e.Key == Key.Down))
304 252
                            {
305 253
                                control = new Point(0, 5);
306 254
                            }
307
                            else if ((((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift) && (e.Key == Key.NumPad8)) ||
308
                                     (e.Key == Key.Up))
255
                            else if ((ViewerDataModel.Instance.IsPressShift && (e.Key == Key.NumPad8)) || (e.Key == Key.Up))
309 256
                            {
310 257
                                control = new Point(0, -5);
311 258
                            }
312
                            else if ((((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift) && (e.Key == Key.NumPad4)) ||
313
                                     (e.Key == Key.Left))
259
                            else if ((ViewerDataModel.Instance.IsPressShift && (e.Key == Key.NumPad4)) || (e.Key == Key.Left))
314 260
                            {
315 261
                                control = new Point(-5, 0);
316 262
                            }
317
                            else if ((((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift) && (e.Key == Key.NumPad6)) ||
318
                                     (e.Key == Key.Right))
263
                            else if ((ViewerDataModel.Instance.IsPressShift && (e.Key == Key.NumPad6)) || (e.Key == Key.Right))
319 264
                            {
320 265
                                control = new Point(5, 0);
321 266
                            }
......
359 304
                }
360 305
            }
361 306
        }
362

  
363
        public void KeyEventUpAction(object sender, KeyEventArgs e)
364
        {
365
            switch (e.Key)
366
            {
367
                //강인구 추가
368
                #region Ctrl
369
                case Key.LeftCtrl:
370
                    {
371
                        if (ViewerDataModel.Instance.IsPressCtrl)
372
                        {
373
                            ViewerDataModel.Instance.IsPressCtrl = false;
374
                        }
375
                    }
376
                    break;
377
                case Key.RightCtrl:
378
                    {
379

  
380
                    }
381
                    break;
382
                #endregion
383

  
384
                #region Shift
385
                case Key.RightShift:
386
                case Key.LeftShift:
387
                    {
388
                        ViewerDataModel.Instance.IsPressShift = false;
389
                    }
390
                    break;
391
                    #endregion
392
            }
393
        }
394 307
    }
395 308
}

내보내기 Unified diff

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