更新
This commit is contained in:
@@ -25,7 +25,7 @@ public sealed class RealtimeDataRowViewModel
|
|||||||
MlrText = Format(record.MassLossRate);
|
MlrText = Format(record.MassLossRate);
|
||||||
HeatReleaseText = Format(record.HeatReleaseRateKw);
|
HeatReleaseText = Format(record.HeatReleaseRateKw);
|
||||||
EhcText = Format(record.EffectiveHeatOfCombustion);
|
EhcText = Format(record.EffectiveHeatOfCombustion);
|
||||||
MassLossText = Format(record.MassLoss);
|
MassLossText = FormatAbsolute(record.MassLoss);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string TimeText { get; init; } = string.Empty;
|
public string TimeText { get; init; } = string.Empty;
|
||||||
@@ -62,4 +62,9 @@ public sealed class RealtimeDataRowViewModel
|
|||||||
{
|
{
|
||||||
return double.IsFinite(value) ? value.ToString(format, CultureInfo.InvariantCulture) : string.Empty;
|
return double.IsFinite(value) ? value.ToString(format, CultureInfo.InvariantCulture) : string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string FormatAbsolute(double value, string format = "0.00")
|
||||||
|
{
|
||||||
|
return double.IsFinite(value) ? Math.Abs(value).ToString(format, CultureInfo.InvariantCulture) : string.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user