コード例 #1
0
        //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);
        }
コード例 #2
0
 /// <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);
 }