コード例 #1
0
        private void RegDun8(object sender, EventArgs e)
        {
            LoadCFG();
            uint Modifier = AppHotKey.ModifyKey(Configuration.Default.Ton8c, Configuration.Default.Ton8a, Configuration.Default.Ton8s);
            uint vK       = Simulator.Transcoding(Configuration.Default.Ton8vK);

            if (chkActivate8.Checked == true)
            {
                AppHotKey.RegKey(Handle, Dun8ID, Modifier, vK);
                Ton8c.Enabled  = false;
                Ton8a.Enabled  = false;
                Ton8s.Enabled  = false;
                Ton8vK.Enabled = false;
                debugbox.AppendText("天地人已注册。" + Environment.NewLine);
            }
            else
            {
                AppHotKey.UnRegKey(Handle, Dun8ID);
                Ton8c.Enabled  = true;
                Ton8a.Enabled  = true;
                Ton8s.Enabled  = true;
                Ton8vK.Enabled = true;
                debugbox.AppendText("天地人已卸载。" + Environment.NewLine);
            }
        }
コード例 #2
0
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     AppHotKey.UnRegKey(Handle, Dun1ID);
     AppHotKey.UnRegKey(Handle, Dun2ID);
     AppHotKey.UnRegKey(Handle, Dun3ID);
     AppHotKey.UnRegKey(Handle, Dun4ID);
     AppHotKey.UnRegKey(Handle, Dun5ID);
     AppHotKey.UnRegKey(Handle, Dun6ID);
     AppHotKey.UnRegKey(Handle, Dun7ID);
     Environment.Exit(0);
 }