public MainWindow() { InitializeComponent(); AccuBatteryController accuBatteryController = new AccuBatteryController(this); DoorController doorController = new DoorController(this); nextCar = new Car(accuBatteryController, doorController, this); }
public Car(DoorController doorController, AccuBatteryController accuBatteryController, OnCarEngineStateChanged callback) { this.doorController = doorController; this.accuBatteryController = accuBatteryController; this.callback = callback; }