public KeyEnabledStates( IKeyboardService keyboardService, ISuggestionStateService suggestionService, ICapturingStateManager capturingStateManager, ILastMouseActionStateManager lastMouseActionStateManager, ICalibrationService calibrationService, IWindowStateService mainWindowStateService) { this.keyboardService = keyboardService; this.suggestionService = suggestionService; this.capturingStateManager = capturingStateManager; this.lastMouseActionStateManager = lastMouseActionStateManager; this.calibrationService = calibrationService; this.mainWindowStateService = mainWindowStateService; suggestionService.OnPropertyChanges(ss => ss.Suggestions).Subscribe(_ => NotifyStateChanged()); suggestionService.OnPropertyChanges(ss => ss.SuggestionsPage).Subscribe(_ => NotifyStateChanged()); suggestionService.OnPropertyChanges(ss => ss.SuggestionsPerPage).Subscribe(_ => NotifyStateChanged()); keyboardService.KeyDownStates[KeyValues.SimulateKeyStrokesKey].OnPropertyChanges(np => np.Value).Subscribe(_ => NotifyStateChanged()); keyboardService.KeyDownStates[KeyValues.SleepKey].OnPropertyChanges(np => np.Value).Subscribe(_ => NotifyStateChanged()); KeyValues.KeysWhichPreventTextCaptureIfDownOrLocked.ForEach(kv => keyboardService.KeyDownStates[kv].OnPropertyChanges(np => np.Value).Subscribe(_ => NotifyStateChanged())); capturingStateManager.OnPropertyChanges(csm => csm.CapturingMultiKeySelection).Subscribe(_ => NotifyStateChanged()); lastMouseActionStateManager.OnPropertyChanges(lmasm => lmasm.LastMouseActionExists).Subscribe(_ => NotifyStateChanged()); mainWindowStateService.OnPropertyChanges(mwss => mwss.WindowState).Subscribe(_ => NotifyStateChanged()); }
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(); }
public BuildInformationProvider( [Import(typeof(IBuildOutputLogger))] IBuildOutputLogger buildOutputLogger, [Import(typeof(IStatusBarNotificationService))] IStatusBarNotificationService statusBarNotificationService, [Import(typeof(IBuildMessagesFactory))] IBuildMessagesFactory buildMessagesFactory, [Import(typeof(IWindowStateService))] IWindowStateService windowStateService, [Import(typeof(IPackageSettingsProvider))] IPackageSettingsProvider packageSettingsProvider, [Import(typeof(IErrorNavigationService))] IErrorNavigationService errorNavigationService, [Import(typeof(ISolutionProvider))] ISolutionProvider solutionProvider, [Import(typeof(IBuildService))] IBuildService buildService, [Import(typeof(ITaskBarInfoService))] ITaskBarInfoService taskBarInfoService) { _packageSettingsProvider = packageSettingsProvider; _errorNavigationService = errorNavigationService; _buildOutputLogger = buildOutputLogger; _statusBarNotificationService = statusBarNotificationService; _buildMessagesFactory = buildMessagesFactory; _windowStateService = windowStateService; _solutionProvider = solutionProvider; _buildService = buildService; _taskBarInfoService = taskBarInfoService; _buildOutputLogger.OnErrorRaised += BuildOutputLogger_OnErrorRaised; }