示例#1
0
文件: FmMain.cs 项目: colt626/jyocr
        private void ButtonSet_Click(object sender, EventArgs e)
        {
            Form frm = new FmSetting();

            frm.ShowDialog();
            string value = IniHelper.GetValue("热键", "截图识别");

            HotKey.UnregisterHotKey(Handle, 200);
            if (value != "")
            {
                HotKey.SetHotkey(Handle, "None", "F4", value, 200);
            }
        }
示例#2
0
        private void ButtonSet_Click(object sender, EventArgs e)
        {
            Form frm = new FmSetting();

            frm.ShowDialog();

            // 卸载热键重新注册
            if (Setting.HotkeyCut != "" && Setting.HotkeyCut != "请按下快捷键")
            {
                HotKey.UnregisterHotKey(Handle, 200);
                HotKey.SetHotkey(Handle, "None", "F4", Setting.HotkeyCut, 200);
            }
            if (Setting.HotkeyShow != "" && Setting.HotkeyShow != "请按下快捷键")
            {
                HotKey.UnregisterHotKey(Handle, 201);
                HotKey.SetHotkey(Handle, "None", "F4", Setting.HotkeyShow, 201);
            }
            this.Notify.Visible = Setting.FormTray;
        }