Exemple #1
0
 protected static void OnHotKeyPressed(HotKeyEventArgs e)
 {
     if (Hotkey.HotKeyPressed != null)
     {
         Hotkey.HotKeyPressed(null, e);
     }
 }
Exemple #2
0
            protected override void WndProc(ref Message m)
            {
                if (m.Msg == WM_HOTKEY)
                {
                    HotKeyEventArgs e = new HotKeyEventArgs(m.LParam);
                    Hotkey.OnHotKeyPressed(e);
                }

                base.WndProc(ref m);
            }
Exemple #3
0
 void HotKeyManager_HotKeyPressed(object sender, HotKeyEventArgs e)
 {
     if(e.Key == Keys.F1)
     {
         get_word();
         go_trans();
     }
     else if(e.Key == Keys.F2)
     {
         if (!fasttrans)
         {
             Console.WriteLine("FastTransOpen");
             Transfast tf = new Transfast(go_trans);
             Form4 f4 = new Form4(ref tf, lang, copyclip);
             fasttrans = true;
             f4.Focus();
             f4.Show();
         }
     }
     else
     {
         go_trans();
     }
 }