/// <summary> /// Instantaneously updates the measurements display. /// Assumes the ViewModel is available. /// </summary> private void UpdateMeasurementsDisplay() { if (RVM.IsReporting) { lblCenter.Text = string.Format(MeasurementFormat, RVM.CurrentPpe); double range = RVM.MaximumPpe - RVM.MinimumPpe; double perc = (RVM.CurrentPpe - RVM.MinimumPpe) / range; lblCenter.TextColor = StyleSettings.InterpolateTextColor(StyleSettings.QualityGoodColor(), StyleSettings.QualityBadColor(), (float)perc); } else { Log.Debug("RVM is not reporting"); lblCenter.Text = NSBundle.MainBundle.LocalizedString("Vernacular_P0_unknown_ppe_value", null); lblCenter.TextColor = StyleSettings.TextOnBrightColor(); } }