更新2026-0515
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace COFTester.Models;
|
||||
|
||||
@@ -36,6 +37,12 @@ public sealed class RunRecord
|
||||
|
||||
public double AverageForceN { get; init; }
|
||||
|
||||
public double? AverageStaticForceN { get; init; }
|
||||
|
||||
public double? AverageKineticForceN { get; init; }
|
||||
|
||||
public int ReciprocatingAverageEndIndex { get; init; }
|
||||
|
||||
public string Judgement { get; init; } = string.Empty;
|
||||
|
||||
public string CsvExportPath { get; set; } = string.Empty;
|
||||
@@ -47,4 +54,19 @@ public sealed class RunRecord
|
||||
public string CompletedAtLabel => CompletedAt.ToString("MM-dd HH:mm:ss");
|
||||
|
||||
public string JudgementLabel => Judgement;
|
||||
|
||||
public string AverageScopeLabel => ReciprocatingAverageEndIndex > 0
|
||||
? $"第 {RunIndex} 轮试验 1-{ReciprocatingAverageEndIndex} 次总平均值"
|
||||
: $"第 {RunIndex} 轮试验总平均值";
|
||||
|
||||
public string AverageStaticForceLabel => FormatNullable(AverageStaticForceN);
|
||||
|
||||
public string AverageKineticForceLabel => FormatNullable(AverageKineticForceN);
|
||||
|
||||
private static string FormatNullable(double? value)
|
||||
{
|
||||
return value is { } number && double.IsFinite(number)
|
||||
? number.ToString("F3", CultureInfo.InvariantCulture)
|
||||
: "--";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user