Esempio n. 1
0
        private void On_MenuItem_Exit_Click(object sender, EventArgs e)
        {
            if (_winTray != null)
            {
                _winTray.TrayIcon.Dispose();
            }

            if (_hwndSrc != null)
            {
                bool ret = Win32Helper.UnregisterHotKey(_hwndSrc.Handle, 1);

                //Remove Clipboard listener.
                Win32Helper.RemoveClipboardFormatListener(_hwndSrc.Handle);
            }


            _shutdown = true;
            System.Windows.Application.Current.Shutdown();
        }
Esempio n. 2
0
        /// <summary>
        /// Unregister the hotkey combination.
        /// </summary>
        public bool UnRegisterHotKey()
        {
            bool ret = Win32Helper.UnregisterHotKey(_hWnd, 1);

            return(ret);
        }