Exemplo n.º 1
0
        void MyHotKeyManager_LocalHotKeyPressed(object sender, LocalHotKeyEventArgs e)
        {
            switch (e.HotKey.Name.ToLower())
            {
            case "lhkcopylog":
                if (!string.IsNullOrEmpty(txtLog.Text))
                {
                    Clipboard.SetText(txtLog.Text);
                }
                break;

            case "lhkclearlog":
                txtLog.Clear();
                return;

            case "lhkdisablelog":
                LogEvent = !LogEvent;
                break;

            case "lhknewlocalkey":
                NewLocal LocalForm = new NewLocal();
                LocalForm.MainForm = this;
                LocalForm.ShowDialog();
                break;

            default:
                if (e.HotKey.Tag != null)
                {
                    System.Diagnostics.Process.Start((string)e.HotKey.Tag);
                }
                break;
            }
            LogEvents(e.HotKey.FullInfo());
        }
        void MyHotKeyManager_LocalHotKeyPressed(object sender, LocalHotKeyEventArgs e)
        {
            switch (e.HotKey.Name.ToLower())
            {
                case "lhkcopylog":
                    if (!string.IsNullOrEmpty(txtLog.Text)) { Clipboard.SetText(txtLog.Text); }
                    break;

                case "lhkclearlog":
                    txtLog.Clear();
                    return;

                case "lhkdisablelog":
                    LogEvent = !LogEvent;
                    break;

                case "lhknewlocalkey":
                    NewLocal LocalForm = new NewLocal();
                    LocalForm.MainForm = this;
                    LocalForm.ShowDialog();
                    break;

                default:
                    if (e.HotKey.Tag != null) System.Diagnostics.Process.Start((string)e.HotKey.Tag);
                    break;
            }
            LogEvents(e.HotKey.FullInfo());
        }