public void Dispose() { if (_form == null) { return; } foreach (var hotKeyHandle in _hotkeyHandlesById.Values) { hotKeyHandle.Dispose(); } _hotkeyHandlesById.Clear(); _form.Dispose(); _form = null; }
public HotKeyManager() { _form = new HotKeyReceiverWindow(); _form.HotKeyPressed += HandleHotKeyPressed; }
public void Dispose() { if (_form == null) return; foreach (var hotKeyHandle in _hotkeyHandlesById.Values) { hotKeyHandle.Dispose(); } _hotkeyHandlesById.Clear(); _form.Dispose(); _form = null; }