예제 #1
0
 private void AssertEqual(KeyEvent expectedEvent, KeyEvent actualEvent)
 {
     Assert.AreEqual(expectedEvent.ToString(), actualEvent.ToString(), "Checking that events are equal.");
 }
예제 #2
0
            internal KeyEvent ToKeyEvent(KeyDirection keyDirection)
            {
                KeyEvent keyEvent = new KeyEvent();

                if (Key.HasValue)
                {
                    keyEvent.Key = Key.Value;
                }

                if (ScanCode.HasValue)
                {
                    keyEvent.ScanCode = ScanCode.Value;
                }

                keyEvent.Direction = keyDirection;
                keyEvent.Extended = Extended;

                return keyEvent;
            }