Пример #1
0
 public bool IsMatch(KeyboardHookEventArgs args)
 {
     return args!=null && args.Key == this.Key && (args.State == this.State || args.State == KeyState.Any) && args.Modifiers.HasFlag(this.Modifiers);
 }
Пример #2
0
 /// <summary>
 /// Check if this instance matches event arguments.
 /// </summary>
 /// <param name="args">Keyboard event arguments.</param>
 /// <returns>True or false.</returns>
 public bool IsMatch(KeyboardHookEventArgs args)
 {
     return(args != null && args.Key == Key && (args.State == State || args.State == KeyState.Any) && args.Modifiers.HasFlag(Modifiers));
 }