ControlCommands.cs 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. using System.Windows.Input;
  2. namespace HandyControl.Interactivity;
  3. /// <summary>
  4. /// 控件库使用的所有命令(为了统一,不使用wpf自带的命令)
  5. /// </summary>
  6. public static class ControlCommands
  7. {
  8. /// <summary>
  9. /// 搜索
  10. /// </summary>
  11. public static RoutedCommand Search { get; } = new(nameof(Search), typeof(ControlCommands));
  12. /// <summary>
  13. /// 清除
  14. /// </summary>
  15. public static RoutedCommand Clear { get; } = new(nameof(Clear), typeof(ControlCommands));
  16. /// <summary>
  17. /// 切换
  18. /// </summary>
  19. public static RoutedCommand Switch { get; } = new(nameof(Switch), typeof(ControlCommands));
  20. /// <summary>
  21. /// 右转
  22. /// </summary>
  23. public static RoutedCommand RotateRight { get; } = new(nameof(RotateRight), typeof(ControlCommands));
  24. /// <summary>
  25. /// 左转
  26. /// </summary>
  27. public static RoutedCommand RotateLeft { get; } = new(nameof(RotateLeft), typeof(ControlCommands));
  28. /// <summary>
  29. /// 小
  30. /// </summary>
  31. public static RoutedCommand Reduce { get; } = new(nameof(Reduce), typeof(ControlCommands));
  32. /// <summary>
  33. /// 大
  34. /// </summary>
  35. public static RoutedCommand Enlarge { get; } = new(nameof(Enlarge), typeof(ControlCommands));
  36. /// <summary>
  37. /// 还原
  38. /// </summary>
  39. public static RoutedCommand Restore { get; } = new(nameof(Restore), typeof(ControlCommands));
  40. /// <summary>
  41. /// 打开
  42. /// </summary>
  43. public static RoutedCommand Open { get; } = new(nameof(Open), typeof(ControlCommands));
  44. /// <summary>
  45. /// 保存
  46. /// </summary>
  47. public static RoutedCommand Save { get; } = new(nameof(Save), typeof(ControlCommands));
  48. /// <summary>
  49. /// 选中
  50. /// </summary>
  51. public static RoutedCommand Selected { get; } = new(nameof(Selected), typeof(ControlCommands));
  52. /// <summary>
  53. /// 关闭
  54. /// </summary>
  55. public static RoutedCommand Close { get; } = new(nameof(Close), typeof(ControlCommands));
  56. /// <summary>
  57. /// 取消
  58. /// </summary>
  59. public static RoutedCommand Cancel { get; } = new(nameof(Cancel), typeof(ControlCommands));
  60. /// <summary>
  61. /// 确定
  62. /// </summary>
  63. public static RoutedCommand Confirm { get; } = new(nameof(Confirm), typeof(ControlCommands));
  64. /// <summary>
  65. /// 是
  66. /// </summary>
  67. public static RoutedCommand Yes { get; } = new(nameof(Yes), typeof(ControlCommands));
  68. /// <summary>
  69. /// 否
  70. /// </summary>
  71. public static RoutedCommand No { get; } = new(nameof(No), typeof(ControlCommands));
  72. /// <summary>
  73. /// 关闭所有
  74. /// </summary>
  75. public static RoutedCommand CloseAll { get; } = new(nameof(CloseAll), typeof(ControlCommands));
  76. /// <summary>
  77. /// 关闭其他
  78. /// </summary>
  79. public static RoutedCommand CloseOther { get; } = new(nameof(CloseOther), typeof(ControlCommands));
  80. /// <summary>
  81. /// 上一个
  82. /// </summary>
  83. public static RoutedCommand Prev { get; } = new(nameof(Prev), typeof(ControlCommands));
  84. /// <summary>
  85. /// 下一个
  86. /// </summary>
  87. public static RoutedCommand Next { get; } = new(nameof(Next), typeof(ControlCommands));
  88. /// <summary>
  89. /// 跳转
  90. /// </summary>
  91. public static RoutedCommand Jump { get; } = new(nameof(Jump), typeof(ControlCommands));
  92. /// <summary>
  93. /// 上午
  94. /// </summary>
  95. public static RoutedCommand Am { get; } = new(nameof(Am), typeof(ControlCommands));
  96. /// <summary>
  97. /// 下午
  98. /// </summary>
  99. public static RoutedCommand Pm { get; } = new(nameof(Pm), typeof(ControlCommands));
  100. /// <summary>
  101. /// 确认
  102. /// </summary>
  103. public static RoutedCommand Sure { get; } = new(nameof(Sure), typeof(ControlCommands));
  104. /// <summary>
  105. /// 小时改变
  106. /// </summary>
  107. public static RoutedCommand HourChange { get; } = new(nameof(HourChange), typeof(ControlCommands));
  108. /// <summary>
  109. /// 分钟改变
  110. /// </summary>
  111. public static RoutedCommand MinuteChange { get; } = new(nameof(MinuteChange), typeof(ControlCommands));
  112. /// <summary>
  113. /// 秒改变
  114. /// </summary>
  115. public static RoutedCommand SecondChange { get; } = new(nameof(SecondChange), typeof(ControlCommands));
  116. /// <summary>
  117. /// 鼠标移动
  118. /// </summary>
  119. public static RoutedCommand MouseMove { get; } = new(nameof(MouseMove), typeof(ControlCommands));
  120. /// <summary>
  121. /// 打开链接
  122. /// </summary>
  123. public static OpenLinkCommand OpenLink { get; } = new();
  124. /// <summary>
  125. /// 关闭程序
  126. /// </summary>
  127. public static ShutdownAppCommand ShutdownApp { get; } = new();
  128. /// <summary>
  129. /// 前置主窗口
  130. /// </summary>
  131. public static PushMainWindow2TopCommand PushMainWindow2Top { get; } = new();
  132. /// <summary>
  133. /// 关闭窗口
  134. /// </summary>
  135. public static CloseWindowCommand CloseWindow { get; } = new();
  136. /// <summary>
  137. /// 开始截图
  138. /// </summary>
  139. public static StartScreenshotCommand StartScreenshot { get; } = new();
  140. /// <summary>
  141. /// 按照类别排序
  142. /// </summary>
  143. public static RoutedCommand SortByCategory { get; } = new(nameof(SortByCategory), typeof(ControlCommands));
  144. /// <summary>
  145. /// 按照名称排序
  146. /// </summary>
  147. public static RoutedCommand SortByName { get; } = new(nameof(SortByName), typeof(ControlCommands));
  148. /// <summary>
  149. /// 更多
  150. /// </summary>
  151. public static RoutedCommand More { get; } = new(nameof(More), typeof(ControlCommands));
  152. public static RoutedCommand Toggle { get; } = new(nameof(Toggle), typeof(ControlCommands));
  153. }