public void InitializeTests()
 {
     _mockDroneController   = new Mock <DroneController>();
     _mockKeyStateIndicator = new Mock <KeyStateIndicator>();
     _target = new KeyboardInput
     {
         DroneController   = _mockDroneController.Object,
         KeyStateIndicator = _mockKeyStateIndicator.Object,
         KeyMaps           = GetStubDictionary()
     };
 }
Ejemplo n.º 2
0
        private void InitializeKeyboardInput()
        {
            var keyStateIndicator = new KeyStateIndicator {
                CoreWindow = Window.Current.CoreWindow
            };

            _keyboardInput = new KeyboardInput
            {
                DroneController   = DroneController,
                KeyStateIndicator = keyStateIndicator,
                KeyMaps           = KeyboardInput.GetDefautlKeyMap()
            };
            Window.Current.CoreWindow.KeyDown += KeyboardStateChanged;
            Window.Current.CoreWindow.KeyUp   += KeyboardStateChanged;
        }