Beispiel #1
0
 internal static Hotkey Create(AKey k, string description) {
     return new Hotkey(
             k.Key.ToKeys()
             , k.Modifiers == null ? ModKeys.None: k.Modifiers.Select(m => m.ToModKeys()).Aggregate((a, b) => a |= b)
             , description
         );
 }
Beispiel #2
0
 internal static Hotkey Create(AKey k, string description)
 {
     return(new Hotkey(
                k.Key.ToKeys()
                , k.Modifiers == null ? ModKeys.None: k.Modifiers.Select(m => m.ToModKeys()).Aggregate((a, b) => a |= b)
                , description
                ));
 }
Beispiel #3
0
 /// <summary>
 /// Supports event from AKey press.
 /// </summary>
 /// <param name="description">Description of the specific key, must be unique.</param>
 public static HotkeyEventArgs Create(AKey k, string description)
 {
     return(new HotkeyEventArgs {
         Hotkey = Hotkey.Create(k, description)
     });
 }
Beispiel #4
0
 /// <summary>
 /// Supports event from AKey press.
 /// </summary>
 /// <param name="description">Description of the specific key, must be unique.</param>
 public static HotkeyEventArgs Create(AKey k, string description) {
     return new HotkeyEventArgs {Hotkey = Hotkey.Create(k, description)};
 }