public void RegisterSimValuesAndEvents() { if (toggle != null) { eventRegistrar.RegisterEvent(toggle.Value.ToString()); } eventRegistrar.RegisterEvent(set.ToString()); flightConnector.RegisterSimValues(GetSimVars().ToArray()); }
public PresetChangeAction( ILogger logger, IFlightConnector flightConnector, IEventRegistrar eventRegistrar, IEventDispatcher eventDispatcher) { this.logger = logger; this.flightConnector = flightConnector; this.eventDispatcher = eventDispatcher; timer = new Timer { Interval = 400 }; timer.Elapsed += Timer_Elapsed; eventRegistrar.RegisterEvent(KnownEvents.VOR1_SET.ToString()); eventRegistrar.RegisterEvent(KnownEvents.VOR2_SET.ToString()); eventRegistrar.RegisterEvent(KnownEvents.ADF_SET.ToString()); eventRegistrar.RegisterEvent(KnownEvents.KOHLSMAN_SET.ToString()); }