private void SetCurrentGenerator() { double min = this.dataEmulator.GetNextValue(); double max = this.dataEmulator.GetNextValue(); this.indicator48Max.Value = min < max ? max : min; this.indicator48Min.Value = min < max ? min : max; this.currentDataEmulator = new RealDataEmulator(this.indicator24Min.Value, this.indicator24Max.Value); }
public WeatherStationCity(RealDataEmulator dataEmulator, NumericIndicator indicator, ContentControl weatherContentControl, NumericIndicator indicator24Max, NumericIndicator indicator24Min, NumericIndicator indicator48Max, NumericIndicator indicator48Min) { startCounter++; this.dataEmulator = dataEmulator; for (int i = 0; i < startCounter; i++ ) this.dataEmulator.GetNextValue(); this.indicator = indicator; this.weatherContentControl = weatherContentControl; this.indicator24Max = indicator24Max; this.indicator24Min = indicator24Min; double min = this.dataEmulator.GetNextValue(); double max = this.dataEmulator.GetNextValue(); this.indicator24Max.Value = min < max ? max : min; this.indicator24Min.Value = min < max ? min : max; this.indicator48Max = indicator48Max; this.indicator48Min = indicator48Min; this.SetCurrentGenerator(); }