Exemplo n.º 1
0
 /// <summary>Creates a LocalHotKey object.
 /// </summary>
 /// <param name="name">The unique identifier for this LocalHotKey</param>
 /// <param name="key">The key to register.</param>
 /// <param name="modifiers">The modifier for this key, multiple modifiers can be combined with Xor</param>
 /// <param name="whentoraise">Specifies when the event should be raised.</param>
 /// <param name="enabled">Specifies if event for this GlobalHotKey should be raised.</param>
 public LocalHotKey(string name, Modifiers modifiers, Keys key, RaiseLocalEvent whentoraise, bool enabled)
 {
     //if (modifiers == Win.Modifiers.Win) { throw new InvalidOperationException("Window Key cannot be used as modifier for Local HotKeys"); }
     this.Name        = name;
     this.Key         = key;
     this.WhenToRaise = whentoraise;
     this.Enabled     = enabled;
     this.Modifier    = modifiers;
 }
Exemplo n.º 2
0
 /// <summary>Creates a LocalHotKey object.
 /// </summary>
 /// <param name="name">The unique identifier for this LocalHotKey</param>
 /// <param name="key">The key to register.</param>
 /// <param name="modifiers">The modifier for this key, multiple modifiers can be combined with Xor</param>
 /// <param name="whentoraise">Specifies when the event should be raised.</param>
 /// <param name="enabled">Specifies if event for this GlobalHotKey should be raised.</param>
 public LocalHotKey(string name, ModifierKeys modifiers, int key, RaiseLocalEvent whentoraise, bool enabled)
 {
     //if (modifiers == Win.Modifiers.Win) { throw new InvalidOperationException("Window Key cannot be used as modifier for Local HotKeys"); }
     this.Name        = name;
     this.Key         = (Keys)Enum.Parse(typeof(Keys), key.ToString());
     this.WhenToRaise = whentoraise;
     this.Enabled     = enabled;
     this.Modifier    = modifiers;
 }
Exemplo n.º 3
0
 /// <summary>Creates a LocalHotKey object.
 /// </summary>
 /// <param name="name">The unique identifier for this LocalHotKey</param>
 /// <param name="key">The key to register.</param>
 /// <param name="whentoraise">Specifies when the event should be raised.</param>
 /// <param name="enabled">Specifies if event for this GlobalHotKey should be raised.</param>
 public LocalHotKey(string name, int key, RaiseLocalEvent whentoraise, bool enabled) :
     this(name, ModifierKeys.None, key, whentoraise, enabled)
 {
 }
Exemplo n.º 4
0
 /// <summary>Creates a LocalHotKey object.
 /// </summary>
 /// <param name="name">The unique identifier for this LocalHotKey.</param>
 /// <param name="key">The key to register.</param>
 /// <param name="modifiers">The modifier for this key, multiple modifiers can be combined with Xor</param>
 /// <param name="whentooraise">Specifies when the event should be raised.</param>
 public LocalHotKey(string name, ModifierKeys modifiers, int key, RaiseLocalEvent whentoraise) :
     this(name, modifiers, key, whentoraise, true)
 {
 }
Exemplo n.º 5
0
 /// <summary>Creates a LocalHotKey object.
 /// </summary>
 /// <param name="name">The unique identifier for this LocalHotKey.</param>
 /// <param name="key">The key to be registered.</param>
 /// <param name="whentoraise">Specifies when the event should be raised.</param>
 public LocalHotKey(string name, Keys key, RaiseLocalEvent whentoraise) :
     this(name, ModifierKeys.None, key, whentoraise, true)
 {
 }
Exemplo n.º 6
0
 public HotKeyEventArgs(Keys key, Modifiers modifier, RaiseLocalEvent KeyPressevent)
 {
     Key           = key;
     Modifier      = modifier;
     KeyPressEvent = KeyPressevent;
 }
 public HotKeyEventArgs(Keys key, ModifierKeys modifier, RaiseLocalEvent KeyPressevent)
 {
     Key = key;
     Modifier = modifier;
     KeyPressEvent = KeyPressevent;
 }