//public TemperatureController(Model.TemperatureControlDataModel model, ControlRelays controlRelays, TemperatureProbe temperatureProbe) //{ // theModel = model; // this.controlRelays = controlRelays; // this.temperatureProbe = temperatureProbe; //} public TemperatureController(Window mainWindow, ControlRelays controlRelays, TemperatureProbe temperatureProbe) { this.controlRelays = controlRelays; this.temperatureProbe = temperatureProbe; this.mainWindow = mainWindow; // Create Model theModel = new Model.TemperatureControlDataModel(); // Create Views splashView = new View.SplashView(theModel); dashboardView = new View.DashboardView(theModel); idleView = new View.IdleView(theModel); settingsView = new View.SettingsView(theModel); }
/// <summary> /// Called when the temperature probe has completed a temperature conversion /// </summary> /// <param name="sender"></param> /// <param name="temperature"></param> private void temperatureProbe_MeasurementComplete(TemperatureProbe sender, float temperature) { theModel.RecordTemperatureSample(temperature); }