Пример #1
0
 public override void OnKeyUp(LKey e)
 {
     keySize = keyActions.Size();
     if (keySize > 0)
     {
         int keyCode = e.GetKeyCode();
         for (int i = 0; i < keySize; i++)
         {
             Int32 code = (Int32)keyActions.GetKey(i);
             if (code == keyCode)
             {
                 ActionKey act = (ActionKey)keyActions.GetValue(code);
                 act.Release();
             }
         }
     }
     Release(e);
 }
Пример #2
0
        public override void OnKeyDown(LKey e)
        {
            int size = keyActions.Size();

            if (size > 0)
            {
                int keyCode = e.GetKeyCode();
                for (int i = 0; i < size; i++)
                {
                    Int32 code = (Int32)keyActions.GetKey(i);
                    if (code == keyCode)
                    {
                        ActionKey act = (ActionKey)keyActions.GetValue(code);
                        act.Press();
                    }
                }
            }
            Press(e);
        }