Exemplo n.º 1
0
        protected override void Arrange()
        {
            base.Arrange();

            var keyDownStates = new NotifyingConcurrentDictionary<KeyValue, KeyDownStates>();
            keyDownStates[KeyValues.MouseMagneticCursorKey] = new NotifyingProxy<KeyDownStates>(KeyDownStates.Up);
            KeyStateService.Setup(s => s.KeyDownStates).Returns(keyDownStates);
        }
        protected override void Arrange()
        {
            base.Arrange();

            KeySelectionProgress = new NotifyingConcurrentDictionary <KeyValue, double>();
            KeySelectionProgress[new KeyValue()] = new NotifyingProxy <double>(123);
            KeyStateService.Setup(s => s.KeySelectionProgress)
            .Returns(KeySelectionProgress);
        }
        protected override void Arrange()
        {
            base.Arrange();

            var keyDownStates = new NotifyingConcurrentDictionary<KeyValue, KeyDownStates>();
            keyDownStates[KeyValues.MouseMagneticCursorKey] = new NotifyingProxy<KeyDownStates>(KeyDownStates.Down);
            keyDownStates[KeyValues.SleepKey] = new NotifyingProxy<KeyDownStates>(KeyDownStates.Up);
            KeyStateService.Setup(s => s.KeyDownStates).Returns(keyDownStates);
        }
        protected override void Arrange()
        {
            base.Arrange();

            MainViewModel.SelectionMode = SelectionModes.Key;

            KeyValueToAssert     = new KeyValue();
            KeySelectionProgress = new NotifyingConcurrentDictionary <KeyValue, double>();
            KeySelectionProgress[KeyValueToAssert] = new NotifyingProxy <double>(123);
            KeyStateService.Setup(s => s.KeySelectionProgress)
            .Returns(KeySelectionProgress);
        }
Exemplo n.º 5
0
        public KeyboardService(
            ISuggestionStateService suggestionService, 
            ICapturingStateManager capturingStateManager,
            ILastMouseActionStateManager lastMouseActionStateManager,
            ICalibrationService calibrationService,
            IWindowStateService mainWindowStateService)
        {
            keySelectionProgress = new NotifyingConcurrentDictionary<KeyValue, double>();
            keyDownStates = new NotifyingConcurrentDictionary<KeyValue, KeyDownStates>();
            keyEnabledStates = new KeyEnabledStates(this, suggestionService, capturingStateManager, lastMouseActionStateManager, calibrationService, mainWindowStateService);

            InitialiseKeyDownStates();
            AddKeyboardSetChangeHandlers();
            AddKeyDownStatesChangeHandlers();
        }
Exemplo n.º 6
0
        public KeyStateService(
            ISuggestionStateService suggestionService,
            ICapturingStateManager capturingStateManager,
            ILastMouseActionStateManager lastMouseActionStateManager,
            ICalibrationService calibrationService,
            Action <KeyValue> fireKeySelectionEvent)
        {
            this.fireKeySelectionEvent = fireKeySelectionEvent;
            this.keySelectionProgress  = new NotifyingConcurrentDictionary <KeyValue, double>();
            this.keyDownStates         = new NotifyingConcurrentDictionary <KeyValue, KeyDownStates>();
            this.keyEnabledStates      = new KeyEnabledStates(this, suggestionService, capturingStateManager, lastMouseActionStateManager, calibrationService);

            InitialiseKeyDownStates();
            AddSettingChangeHandlers();
            AddSimulateKeyStrokesChangeHandler();
            AddKeyDownStatesChangeHandlers();
        }
Exemplo n.º 7
0
        public KeyStateService(
            ISuggestionStateService suggestionService, 
            ICapturingStateManager capturingStateManager,
            ILastMouseActionStateManager lastMouseActionStateManager,
            ICalibrationService calibrationService,
            Action<KeyValue> fireKeySelectionEvent)
        {
            this.fireKeySelectionEvent = fireKeySelectionEvent;
            keySelectionProgress = new NotifyingConcurrentDictionary<KeyValue, double>();
            keyDownStates = new NotifyingConcurrentDictionary<KeyValue, KeyDownStates>();
            keyEnabledStates = new KeyEnabledStates(this, suggestionService, capturingStateManager, lastMouseActionStateManager, calibrationService);

            InitialiseKeyDownStates();
            AddSettingChangeHandlers();
            AddSimulateKeyStrokesChangeHandler();
            AddKeyDownStatesChangeHandlers();
        }
        protected override void Arrange()
        {
            base.Arrange();

            MainViewModel.SelectionMode = SelectionModes.Key;

            KeyValueToAssert = new KeyValue();
            KeySelectionProgress = new NotifyingConcurrentDictionary<KeyValue, double>();
            KeySelectionProgress[KeyValueToAssert] = new NotifyingProxy<double>(123);
            KeyStateService.Setup(s => s.KeySelectionProgress)
                .Returns(KeySelectionProgress);
        }
        protected override void Arrange()
        {
            base.Arrange();

            KeySelectionProgress = new NotifyingConcurrentDictionary<KeyValue, double>();
            KeySelectionProgress[new KeyValue()] = new NotifyingProxy<double>(123);
            KeyStateService.Setup(s => s.KeySelectionProgress)
                .Returns(KeySelectionProgress);
        }
Exemplo n.º 10
0
 public KeyStateService()
 {
     keySelectionProgress = new NotifyingConcurrentDictionary <KeyValue, double>();
 }