更新2026-0515

This commit is contained in:
GukSang.Jin
2026-05-15 10:29:18 +08:00
parent ceaf8b3050
commit 375a6d4449

View File

@@ -1,4 +1,5 @@
using System; using System;
using System.Globalization;
namespace COFTester.Models; namespace COFTester.Models;
@@ -36,6 +37,12 @@ public sealed class RunRecord
public double AverageForceN { get; init; } 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 Judgement { get; init; } = string.Empty;
public string CsvExportPath { get; set; } = 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 CompletedAtLabel => CompletedAt.ToString("MM-dd HH:mm:ss");
public string JudgementLabel => Judgement; 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)
: "--";
}
} }