예제 #1
0
 private void MainForm_KeyDown(object sender, KeyEventArgs e)
 {
     if (!screenIsLocked)
     {
         if ((e.KeyCode == System.Windows.Forms.Keys.Up))
         {
             mainControler.HardwareKeyDown(HardwareKeys.Up);
         }
         if ((e.KeyCode == System.Windows.Forms.Keys.Down))
         {
             mainControler.HardwareKeyDown(HardwareKeys.Down);
         }
         if ((e.KeyCode == System.Windows.Forms.Keys.Left))
         {
             mainControler.HardwareKeyDown(HardwareKeys.Left);
         }
         if ((e.KeyCode == System.Windows.Forms.Keys.Right))
         {
             mainControler.HardwareKeyDown(HardwareKeys.Right);
         }
         if ((e.KeyCode == System.Windows.Forms.Keys.Enter))
         {
             mainControler.HardwareKeyDown(HardwareKeys.Enter);
         }
     }
 }