Ejemplo n.º 1
0
 public static void KeyUnReg()
 {
     for (int I = 4; I <= 24; I++)
     {
         MagicKeys.UnregisterHotKey(DeveloperTool.HM.Handle, I);
     }
 }
Ejemplo n.º 2
0
 public void Exit(object sender, EventArgs e)
 {
     MagicKeys.KeySwitch = 1;
     MagicKeys.UnregisterHotKey(MagicKeys.HM.Handle, 0);
     MagicKeys.UnregisterHotKey(MagicKeys.HM.Handle, 1);
     Ni.Visible = false;
     if (MagicKeys.Exit == true)
     {
         DialogResult result;
         result = MessageBox.Show(T._("Do you really want to exit MagicKeys?"), T._("Exit MagicKeys"), MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification);
         if (result == DialogResult.OK)
         {
             MagicKeys.Speak(T._("Goodbye"));
             Application.Exit();
             return;
         }
         Ni.Visible = true;
         MagicKeys.RegisterHotKey(MagicKeys.HM.Handle, 0, MKC.CTRL | MKC.SHIFT | MKC.MOD_NOREPEAT, (int)Keys.F1);
         MagicKeys.RegisterHotKey(MagicKeys.HM.Handle, 1, MKC.CTRL | MKC.SHIFT | MKC.MOD_NOREPEAT, (int)Keys.F2);
         MagicKeys.KeySwitch = 0;
     }
     else
     {
         MagicKeys.Speak(T._("Goodbye"));
         Application.Exit();
     }
 }
Ejemplo n.º 3
0
 public static void MKDebugForm(string DebugInfo)
 {
     MagicKeys.UnregisterHotKey(MagicKeys.HM.Handle, 1);
     MagicKeys.UnregisterHotKey(MagicKeys.HM.Handle, 2);
     KeyUnReg();
     KeySwitch          = 1;
     using DebugForm DF = new DebugForm();
     DF.DebugInfo       = DebugInfo;
     DF.ShowDialog();
 }
Ejemplo n.º 4
0
        public static void HelpForm()
        {
            string HelpFile = API.GetVUIPath() + API.GetVUI() + ".help";

            if (File.Exists(HelpFile) == false)
            {
                MagicKeys.Speak(T._("Help file not found"));
            }
            else
            {
                MagicKeys.UnregisterHotKey(MagicKeys.HM.Handle, 1);
                MagicKeys.UnregisterHotKey(MagicKeys.HM.Handle, 2);
                KeyUnReg();
                using HelpForm HF = new HelpForm();
                HF.HelpFile       = HelpFile;
                HF.ShowDialog();
                KeyReg();
                MagicKeys.RegisterHotKey(MagicKeys.HM.Handle, 2, MKC.CTRL | MKC.SHIFT | MKC.MOD_NOREPEAT, (int)Keys.F3);
                MagicKeys.RegisterHotKey(MagicKeys.HM.Handle, 1, MKC.CTRL | MKC.SHIFT | MKC.MOD_NOREPEAT, (int)Keys.F2);
            }
        }