Ejemplo n.º 1
0
        public void ChangeStation(string id)
        {
            view.SetStation(id);

            foreach (var VARIABLE in iceCreamMonitor.GetMeasurements()) //find the measurement
            {
                if (id == VARIABLE.StationId)
                {
                    view.SetActual(VARIABLE.Actual.ToString());
                    ActualChanged(VARIABLE.Actual.ToString());
                }
            }
        }
        // TODO
        // Implement the missing parts of the presenter
        public void ChangeStation(string stationId)
        {
            foreach (Measurement measurement in iceCreamMonitor.GetMeasurements())
            {
                if (measurement.StationId.Equals(stationId))
                {
                    view.SetStation(stationId);
                    view.SetDate(measurement.Date);
                    view.SetActual(measurement.Actual.ToString());
                    VarianceRange varianceRange = VarianceRange.normal;

                    view.SetVarianceColor(Color.FromRgb(200, 0, 0));
                    view.SetVariance(iceCreamMonitor.CalculateVariance(measurement.Actual, out varianceRange).ToString());
                }
            }
        }
Ejemplo n.º 3
0
 public void ChangeStation(string stationId)
 {
     view.SetStation(stationId);
 }