SharpHotKey.cs 414 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Windows.Forms;
  3. internal class SharpHotKey
  4. {
  5. public Keys Key;
  6. public int KeyCode;
  7. public bool Ctrl;
  8. public bool Shift;
  9. public bool Alt;
  10. public Action Callback;
  11. public SharpHotKey(Action callback, Keys key, bool ctrl = false, bool shift = false, bool alt = false)
  12. {
  13. Callback = callback;
  14. Key = key;
  15. KeyCode = (int)key;
  16. Ctrl = ctrl;
  17. Shift = shift;
  18. Alt = alt;
  19. }
  20. }