Пример #1
0
        void SetButton_Click(object sender, EventArgs e)
        {
            _listener?.Dispose();
            _listener = new HotKeyListener(_modifier, _key, Handle, HandleShortcut);

            SetButtonColor();
        }
Пример #2
0
        void ToggleShow(object sender, EventArgs e)
        {
            _listener?.Dispose();

            if (ShowInTaskbar)
            {
                Hide();
                ShowInTaskbar = false;
            }
            else
            {
                Show();
                ShowInTaskbar = true;
            }

            _listener = new HotKeyListener(_modifier, _key, Handle, HandleShortcut);
        }