LibCommands.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 FWindSoft.Wpf.Commands
  8. {
  9. public class LibCommands
  10. {
  11. static LibCommands()
  12. {
  13. /*
  14. * 困惑,typeof (LibCommands)这个参数没有要求,也不知道怎么使用,但是系统的是这样定义的
  15. * 也不需要UI空间,如果不写不知道会不会出问题
  16. */
  17. Add = new RoutedCommand("添加", typeof (LibCommands));
  18. Delete = new RoutedCommand("删除", typeof(LibCommands));
  19. Update = new RoutedCommand("修改", typeof(LibCommands));
  20. Search = new RoutedCommand("查找", typeof(LibCommands));
  21. Move = new RoutedCommand("移动", typeof(LibCommands));
  22. }
  23. /// <summary>
  24. /// 增加
  25. /// </summary>
  26. public static RoutedCommand Add{get;private set;}
  27. /// <summary>
  28. /// 删除
  29. /// </summary>
  30. public static RoutedCommand Delete { get; private set; }
  31. /// <summary>
  32. /// 修改
  33. /// </summary>
  34. public static RoutedCommand Update { get; private set; }
  35. /// <summary>
  36. /// 查找
  37. /// </summary>
  38. public static RoutedCommand Search { get; private set; }
  39. /// <summary>
  40. /// 移动
  41. /// </summary>
  42. public static RoutedCommand Move { get; private set; }
  43. }
  44. }