Esempio n. 1
0
 private void m_KeyPressed(object sender, InputDevice.KeyControlEventArgs e)
 {
     if (DateTimeExtensions.ApplicationIsActivated(Process.GetCurrentProcess().Id) && e.Keyboard.deviceName == InsertedCRsID && CRManager.IsConnected(InsertedCRsID))
     {
         if (skip)
         {
             Console.WriteLine(e.Keyboard.vKey + ":" + e.Keyboard.key);
             if (e.Keyboard.vKey == Keys.Enter.ToString())
             {
                 SystemSounds.Beep.Play();
                 id.KeyPressed -= m_KeyPressed;
                 Close();
             }
         }
         skip = !skip;
     }
     else
     {
         Output = String.Empty;
         skip   = false;
     }
 }