Exemplo n.º 1
0
 private void Execute(KeyRoutedEventArgs e)
 {
     if (KeyModifiers == (VirtualKeyModifiers.Control | VirtualKeyModifiers.Shift) && CurrentKey == VirtualKey.N && KeyState == CoreVirtualKeyStates.Down)
     {
         ClonePage.Execute(null);
     }
     else if (KeyModifiers == VirtualKeyModifiers.Control && CurrentKey == VirtualKey.N && KeyState == CoreVirtualKeyStates.Down)
     {
         NewPage.Execute(null);
     }
     else if (KeyModifiers == (VirtualKeyModifiers.Control | VirtualKeyModifiers.Shift) && CurrentKey == VirtualKey.S && KeyState == CoreVirtualKeyStates.Down)
     {
         SaveAs.Execute(null);
     }
     else if (KeyModifiers == VirtualKeyModifiers.Control && CurrentKey == VirtualKey.S && KeyState == CoreVirtualKeyStates.Down)
     {
         Save.Execute(null);
     }
     else if (KeyModifiers == VirtualKeyModifiers.Control && CurrentKey == VirtualKey.O && KeyState == CoreVirtualKeyStates.Down)
     {
         Open.Execute(null);
     }
     else if (KeyModifiers == VirtualKeyModifiers.Control && CurrentKey == VirtualKey.L && KeyState == CoreVirtualKeyStates.Down)
     {
         Library.Execute(null);
     }
     else if (KeyModifiers == VirtualKeyModifiers.Control && CurrentKey == (VirtualKey)186 && KeyState == CoreVirtualKeyStates.Down)
     {
         GridLines.Execute(null);
     }
     else if (KeyModifiers == VirtualKeyModifiers.Control && CurrentKey == VirtualKey.U && KeyState == CoreVirtualKeyStates.Down)
     {
         SmartGuide.Execute(null);
     }
     else if (KeyModifiers == VirtualKeyModifiers.Control && CurrentKey == VirtualKey.R && KeyState == CoreVirtualKeyStates.Down)
     {
         RulerVisibility.Execute(null);
     }
     else if (KeyModifiers == (VirtualKeyModifiers.Control | VirtualKeyModifiers.Shift) && CurrentKey == VirtualKey.A && KeyState == CoreVirtualKeyStates.Down)
     {
         UnSelect.Execute(null);
     }
     else if (KeyModifiers == VirtualKeyModifiers.Control && CurrentKey == VirtualKey.Number2 && KeyState == CoreVirtualKeyStates.Down)
     {
         Lock.Execute(null);
     }
     else if (KeyModifiers == VirtualKeyModifiers.Control && CurrentKey == VirtualKey.Number3 && KeyState == CoreVirtualKeyStates.Down)
     {
         UnLock.Execute(null);
     }
     else if (KeyModifiers == VirtualKeyModifiers.Control && CurrentKey == VirtualKey.C && KeyState == CoreVirtualKeyStates.Down)
     {
         Copy.Execute(null);
         e.Handled = true;
     }
     else if (KeyModifiers == VirtualKeyModifiers.Control && CurrentKey == VirtualKey.V && KeyState == CoreVirtualKeyStates.Down)
     {
         Paste.Execute(null);
         e.Handled = true;
     }
 }