protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); this._appSettings = new AppSettings(); this._debugLogger = new DebugManager(); this._debugLogger.Enable(); this._simLogger = new iRacingLogger(4); this._simLogger.DriverConnected += this.OnRaceLoggerConnection; this._simLogger.DriverDisconnected += this.OnRaceLoggerDisconnection; this._fuelManager = new FuelManager(this._simLogger, this._debugLogger, 1); this._simLogger.StartListening(); var vm = new ApplicationViewModel(); var mw = new MainWindow { DataContext = vm }; mw.Closing += this.WindowClosing; mw.Show(); this._programConfigurator = new ProgramLoader(this.DebugLogger); var pm = new ProgramManager(this._simLogger, this._programConfigurator); //pm.Load("default"); //pm.StartProgram(); this.MainWindow.Title = "Disconnected - Driver ID: ?"; }
public FuelManager(ISimLogger simLogger, DebugManager debugManager) { this._simLogger = simLogger; this._debugLogger = debugManager; this._simLogger.PitRoad += this.OnPitRoad; this._graceOption = new GraceOption { Mode = GraceMode.Lap, Value = 2.0f }; this._hasPitted = false; }
public ProgramManager(ISimLogger simLogger, IProgramLoader programLoader) { this._simLogger = simLogger; this._programLoader = programLoader; }