Exemplo n.º 1
0
 public static HotkeyArgs PassThroughNonNull(HotkeyArgs hotkeyArgs)
 {
     if (hotkeyArgs == null)
     {
         throw new ArgumentNullException(nameof(hotkeyArgs));
     }
     return(hotkeyArgs);
 }
Exemplo n.º 2
0
 /// <summary>
 /// 由 hotkeyArgs 定义的热键触发,持续按下 keyPressedArgs 定义的键盘和鼠标键值
 /// </summary>
 /// <param name="hotkeyArgs"></param>
 /// <param name="describe"></param>
 /// <param name="keyPressedArgs"></param>
 public KeyAction(HotkeyArgs hotkeyArgs, string describe, KeyPressedArgs keyPressedArgs) : this(HotkeyArgs.PassThroughNonNull(hotkeyArgs).HotkeyModifierKeys, hotkeyArgs.HotkeyNormalKey, hotkeyArgs.Window, describe, KeyPressedArgs.PassThroughNonNull(keyPressedArgs).PressedKey, keyPressedArgs.PressedMouse)
 {
     Contract.Requires(hotkeyArgs != null);
     Contract.Requires(keyPressedArgs != null);
 }