Beispiel #1
0
 private Extractor(
     IKeyboardWatcher keyboardWatcher = null,
     IClientSideIncomingMessageDispatcher clientSideIncomingMessageDispatcher = null,
     IServerSideIncomingMessageDispatcher serverSideIncomingMessageDispatcher = null,
     IInstrumentFactory instrumentFactory     = null,
     IFlightDataRetriever flightDataRetriever = null,
     IFlightDataUpdater flightDataUpdater     = null)
 {
     State = new ExtractorState();
     LoadSettings();
     _instrumentFactory = instrumentFactory ?? new InstrumentFactory();
     _ehsiStateTracker  = new EHSIStateTracker(_instruments);
     _inputEvents       = new InputEvents(_instruments, _ehsiStateTracker);
     _clientSideIncomingMessageDispatcher = clientSideIncomingMessageDispatcher ??
                                            new ClientSideIncomingMessageDispatcher(_inputEvents);
     if (!Settings.Default.DisableDirectInputMediator)
     {
         Mediator = new Mediator(Application.OpenForms.Count > 0 ? Application.OpenForms[0]:null);
         _mediatorEventHandler = new MediatorStateChangeHandler(new DIHotkeyDetection(Mediator), _inputEvents);
     }
     _keyboardWatcher = keyboardWatcher ?? new KeyboardWatcher(_inputEvents, Log);
     _serverSideIncomingMessageDispatcher = serverSideIncomingMessageDispatcher ??
                                            new ServerSideIncomingMessageDispatcher(_inputEvents);
     _flightDataRetriever         = flightDataRetriever ?? new FlightDataRetriever();
     _flightDataUpdater           = flightDataUpdater ?? new FlightDataUpdater();
     _performanceCounterInstaller = new PerformanceCounterInstaller();
 }
Beispiel #2
0
 private Extractor(
     IKeyboardWatcher keyboardWatcher = null,
     IClientSideIncomingMessageDispatcher clientSideIncomingMessageDispatcher = null,
     IServerSideIncomingMessageDispatcher serverSideIncomingMessageDispatcher = null,
     IInstrumentFactory instrumentFactory = null,
     IThreeDeeCaptureCoordinateUpdater threeDeeCaptureCoordinateUpdater = null,
     IFlightDataRetriever flightDataRetriever = null,
     IFlightDataUpdater flightDataUpdater     = null)
 {
     State = new ExtractorState();
     LoadSettings();
     _instrumentFactory = instrumentFactory ?? new InstrumentFactory();
     _ehsiStateTracker  = new EHSIStateTracker(_instruments);
     _inputEvents       = new InputEvents(_instruments, _ehsiStateTracker);
     _clientSideIncomingMessageDispatcher = clientSideIncomingMessageDispatcher ??
                                            new ClientSideIncomingMessageDispatcher(_inputEvents);
     if (!Settings.Default.DisableDirectInputMediator)
     {
         Mediator = new Mediator(null);
         _mediatorEventHandler = new MediatorStateChangeHandler(new DIHotkeyDetection(Mediator), _inputEvents);
     }
     _keyboardWatcher = keyboardWatcher ?? new KeyboardWatcher(_inputEvents, Log);
     _serverSideIncomingMessageDispatcher = serverSideIncomingMessageDispatcher ??
                                            new ServerSideIncomingMessageDispatcher(_inputEvents);
     _flightDataRetriever = flightDataRetriever ?? new FlightDataRetriever();
     _threeDeeCaptureCoordinateUpdater = threeDeeCaptureCoordinateUpdater ??
                                         new ThreeDeeCaptureCoordinateUpdater(
         _texturesSharedMemoryImageCoordinates);
     _flightDataUpdater           = flightDataUpdater ?? new FlightDataUpdater(_texturesSharedMemoryImageCoordinates);
     _performanceCounterInstaller = new PerformanceCounterInstaller();
 }