C# Class Shortcut.HotkeyBinder

Used to bind and unbind Hotkeys to HotkeyCallbacks.
Inheritance: IDisposable
Exibir arquivo Open project: AlexArchive/Shortcut Class Usage Examples

Public Methods

Method Description
Bind ( System.Windows.Forms.Hotkey hotkeyCombo ) : HotkeyCallback

Binds a Hotkey to a HotkeyCallback.

Bind ( Modifiers modifiers, Keys keys ) : HotkeyCallback

Binds a hotkey combination to a HotkeyCallback.

Dispose ( ) : void
HotkeyBinder ( ) : System

Initializes a new instance of the HotkeyBinder class.

IsHotkeyAlreadyBound ( System.Windows.Forms.Hotkey hotkeyCombo ) : bool

Indicates whether a Hotkey has been bound already either by this application or another application.

Unbind ( System.Windows.Forms.Hotkey hotkeyCombo ) : void

Unbinds a previously bound Hotkey.

Unbind ( Modifiers modifiers, Keys keys ) : void

Unbinds a previously bound hotkey combination.

Private Methods

Method Description
OnHotkeyPressed ( object sender, HotkeyPressedEventArgs e ) : void
RegisterHotkey ( System.Windows.Forms.Hotkey hotkeyCombo ) : void
UnregisterHotkey ( System.Windows.Forms.Hotkey hotkeyCombo ) : void

Method Details

Bind() public method

Binds a Hotkey to a HotkeyCallback.
public Bind ( System.Windows.Forms.Hotkey hotkeyCombo ) : HotkeyCallback
hotkeyCombo System.Windows.Forms.Hotkey
return HotkeyCallback

Bind() public method

Binds a hotkey combination to a HotkeyCallback.
public Bind ( Modifiers modifiers, Keys keys ) : HotkeyCallback
modifiers Modifiers The modifers that constitute this hotkey.
keys Keys The keys that constitute this hotkey.
return HotkeyCallback

Dispose() public method

public Dispose ( ) : void
return void

HotkeyBinder() public method

Initializes a new instance of the HotkeyBinder class.
public HotkeyBinder ( ) : System
return System

IsHotkeyAlreadyBound() public method

Indicates whether a Hotkey has been bound already either by this application or another application.
public IsHotkeyAlreadyBound ( System.Windows.Forms.Hotkey hotkeyCombo ) : bool
hotkeyCombo System.Windows.Forms.Hotkey /// The to evaluate. ///
return bool

Unbind() public method

Unbinds a previously bound Hotkey.
public Unbind ( System.Windows.Forms.Hotkey hotkeyCombo ) : void
hotkeyCombo System.Windows.Forms.Hotkey
return void

Unbind() public method

Unbinds a previously bound hotkey combination.
public Unbind ( Modifiers modifiers, Keys keys ) : void
modifiers Modifiers
keys Keys
return void