public void InitializeTests()
 {
     _mockCoreWindow = new Mock <ICoreWindow>();
     _target         = new KeyStateIndicator {
         CoreWindow = _mockCoreWindow.Object
     };
 }
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;
        }