DataCommands.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows.Input;
  7. namespace LR1.Commands
  8. {
  9. internal class DataCommands
  10. {
  11. public static RoutedCommand Delete { get; set; }
  12. public static RoutedCommand Edit { get; set; }
  13. public static RoutedCommand Add { get; set; }
  14. public static RoutedCommand Save { get; set; }
  15. public static RoutedCommand Find { get; set; }
  16. static DataCommands()
  17. {
  18. InputGestureCollection inputs = new InputGestureCollection();
  19. inputs.Add(new KeyGesture(Key.E, ModifierKeys.Control, "Ctrl+E"));
  20. Edit = new RoutedCommand("Edit", typeof(DataCommands), inputs);
  21. inputs = new InputGestureCollection();
  22. inputs.Add(new KeyGesture(Key.D, ModifierKeys.Control, "Ctrl+D"));
  23. Delete = new RoutedCommand("Delete", typeof(DataCommands), inputs);
  24. inputs = new InputGestureCollection();
  25. inputs.Add(new KeyGesture(Key.N, ModifierKeys.Control, "Ctrl+N"));
  26. Add = new RoutedCommand("Add", typeof(DataCommands), inputs);
  27. inputs = new InputGestureCollection();
  28. inputs.Add(new KeyGesture(Key.S, ModifierKeys.Control, "Ctrl+S"));
  29. Save = new RoutedCommand("Save", typeof(DataCommands), inputs);
  30. inputs = new InputGestureCollection();
  31. inputs.Add(new KeyGesture(Key.F, ModifierKeys.Control, "Ctrl+F"));
  32. Find = new RoutedCommand("Find", typeof(DataCommands), inputs);
  33. inputs = new InputGestureCollection();
  34. }
  35. }
  36. }