示例#1
0
        private void btnPasteUnregister_Click(object sender, System.EventArgs e)
        {
            // Dispose the hotKeyToRegister.
            if (pasteHotKeyToRegister1 != null)
            {
                pasteHotKeyToRegister1.Dispose();
                pasteHotKeyToRegister1 = null;
            }

            // Dispose the hotKeyToRegister.
            if (pasteHotKeyToRegister2 != null)
            {
                pasteHotKeyToRegister2.Dispose();
                pasteHotKeyToRegister2 = null;
            }

            // Dispose the hotKeyToRegister.
            if (pasteHotKeyToRegister3 != null)
            {
                pasteHotKeyToRegister3.Dispose();
                pasteHotKeyToRegister3 = null;
            }

            // Update the UI.
            tbPasteHotKey.Enabled      = true;
            btnPasteRegister.Enabled   = true;
            btnPasteUnregister.Enabled = false;
        }
示例#2
0
        /// <summary>
        /// Handle the Click event of btnUnregister.
        /// </summary>
        private void btnCopyUnregister_Click(object sender, EventArgs e)
        {
            // Dispose the hotKeyToRegister.
            if (copyHotKeyToRegister1 != null)
            {
                copyHotKeyToRegister1.Dispose();
                copyHotKeyToRegister1 = null;
            }

            // Dispose the hotKeyToRegister.
            if (copyHotKeyToRegister2 != null)
            {
                copyHotKeyToRegister2.Dispose();
                copyHotKeyToRegister2 = null;
            }

            // Dispose the hotKeyToRegister.
            if (copyHotKeyToRegister3 != null)
            {
                copyHotKeyToRegister3.Dispose();
                copyHotKeyToRegister3 = null;
            }

            // Update the UI.
            tbCopyHotKey.Enabled      = true;
            btnCopyRegister.Enabled   = true;
            btnCopyUnregister.Enabled = false;
        }