//注册快捷键
        private void ReadHotKeyReg()
        {
            //注册打开显示设置页面
            PublicFunction.RegHotKey(Properties.Settings.Default.HKShowSet, "CBP_ShowSet");

            //注册打开历史记录快捷键
            PublicFunction.RegHotKey(Properties.Settings.Default.HKShowHistory, "CBP_ShowHistory");

            //注册显示上一条的快捷键
            PublicFunction.RegHotKey(Properties.Settings.Default.HKLastOne, "CBP_ShowLastOne");

            //注册显示上一条并粘贴的快捷键
            PublicFunction.RegHotKey(Properties.Settings.Default.HKLastOnePaste, "CBP_ShowLastOnePaste");

            //注册显示下一条的快捷键
            PublicFunction.RegHotKey(Properties.Settings.Default.HKNextOne, "CBP_ShowNextOne");

            //注册显示下一条并粘贴的快捷键
            PublicFunction.RegHotKey(Properties.Settings.Default.HKNextOnePaste, "CBP_ShowLastOnePaste");

            //注册贴图到窗口的快捷键
            PublicFunction.RegHotKey(Properties.Settings.Default.HKPasteToWindow, "CBP_PasteToWindow");

            //注册显示隐藏贴图的快捷键
            PublicFunction.RegHotKey(Properties.Settings.Default.HKShowHide, "CBP_ShowHide");
        }
Exemple #2
0
        //显示隐藏贴图
        private void TbShowHide_OnPreviewKeyUp(object sender, KeyEventArgs e)
        {
            string myHotKey = PublicFunction.ShowHotKey(e);

            if (myHotKey != null)
            {
                //设置新快捷键
                TbShowHide.Text = myHotKey;
                Properties.Settings.Default.HKShowHide = myHotKey + "|" + MyVariable.Variable.HotKeyCode;
                Properties.Settings.Default.Save();
                PublicFunction.RegHotKey(Properties.Settings.Default.HKShowHide, "CBP_ShowHide");
            }
        }