更新 测试次数
This commit is contained in:
@@ -67,6 +67,7 @@ namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.ViewModel
|
|||||||
private double runStartDisplacementMm;
|
private double runStartDisplacementMm;
|
||||||
private double slidingStartDisplacementMm;
|
private double slidingStartDisplacementMm;
|
||||||
private double? slidingStartTimeSeconds;
|
private double? slidingStartTimeSeconds;
|
||||||
|
private int activeRunLubricantIndex;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string testNumber = $"SLIP-{DateTime.Now:yyyyMMdd-HHmm}";
|
private string testNumber = $"SLIP-{DateTime.Now:yyyyMMdd-HHmm}";
|
||||||
@@ -167,6 +168,18 @@ namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.ViewModel
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string resetButtonText = "复位";
|
private string resetButtonText = "复位";
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private int completedTestCount;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private int dryTestCount;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private int wetTestCount;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private int frostTestCount;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string staticCoefficient = "0.00";
|
private string staticCoefficient = "0.00";
|
||||||
|
|
||||||
@@ -689,6 +702,7 @@ namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.ViewModel
|
|||||||
runStartDisplacementMm = deviceService.CurrentSnapshot.DisplacementMm;
|
runStartDisplacementMm = deviceService.CurrentSnapshot.DisplacementMm;
|
||||||
slidingStartDisplacementMm = runStartDisplacementMm;
|
slidingStartDisplacementMm = runStartDisplacementMm;
|
||||||
slidingStartTimeSeconds = null;
|
slidingStartTimeSeconds = null;
|
||||||
|
activeRunLubricantIndex = SelectedLubricantIndex;
|
||||||
runStopwatch.Restart();
|
runStopwatch.Restart();
|
||||||
UploadProgress = 0;
|
UploadProgress = 0;
|
||||||
lastRealtimeCurveTraceLoggedAt = DateTime.MinValue;
|
lastRealtimeCurveTraceLoggedAt = DateTime.MinValue;
|
||||||
@@ -746,6 +760,7 @@ namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.ViewModel
|
|||||||
{
|
{
|
||||||
runStopwatch.Stop();
|
runStopwatch.Stop();
|
||||||
LogRealtimeCurveSummary("测试停止");
|
LogRealtimeCurveSummary("测试停止");
|
||||||
|
RecordCompletedTest();
|
||||||
if (!slidingStartTimeSeconds.HasValue)
|
if (!slidingStartTimeSeconds.HasValue)
|
||||||
{
|
{
|
||||||
Log.Warning(
|
Log.Warning(
|
||||||
@@ -871,6 +886,33 @@ namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.ViewModel
|
|||||||
verdict);
|
verdict);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RecordCompletedTest()
|
||||||
|
{
|
||||||
|
CompletedTestCount++;
|
||||||
|
switch (activeRunLubricantIndex)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
WetTestCount++;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
FrostTestCount++;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
DryTestCount++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.Information(
|
||||||
|
"完整测试次数已更新:TestNumber={TestNumber}, Lubricant={Lubricant}, CompletedTestCount={CompletedTestCount}, DryTestCount={DryTestCount}, WetTestCount={WetTestCount}, FrostTestCount={FrostTestCount}",
|
||||||
|
TestNumber,
|
||||||
|
CurrentLubricant(activeRunLubricantIndex),
|
||||||
|
CompletedTestCount,
|
||||||
|
DryTestCount,
|
||||||
|
WetTestCount,
|
||||||
|
FrostTestCount);
|
||||||
|
}
|
||||||
|
|
||||||
private void AbortRun(string message)
|
private void AbortRun(string message)
|
||||||
{
|
{
|
||||||
runStopwatch.Stop();
|
runStopwatch.Stop();
|
||||||
@@ -1386,7 +1428,9 @@ namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.ViewModel
|
|||||||
_ => "250(含)以上"
|
_ => "250(含)以上"
|
||||||
};
|
};
|
||||||
|
|
||||||
private string CurrentLubricant() => SelectedLubricantIndex switch
|
private string CurrentLubricant() => CurrentLubricant(SelectedLubricantIndex);
|
||||||
|
|
||||||
|
private static string CurrentLubricant(int lubricantIndex) => lubricantIndex switch
|
||||||
{
|
{
|
||||||
1 => "湿态 - 蒸馏水",
|
1 => "湿态 - 蒸馏水",
|
||||||
2 => "湿态 - 洗涤剂",
|
2 => "湿态 - 洗涤剂",
|
||||||
|
|||||||
@@ -249,13 +249,44 @@
|
|||||||
|
|
||||||
<DockPanel Grid.Row="1" LastChildFill="True" MinHeight="0" ClipToBounds="True">
|
<DockPanel Grid.Row="1" LastChildFill="True" MinHeight="0" ClipToBounds="True">
|
||||||
<Border DockPanel.Dock="Left" Width="280" Classes="panel" Margin="0,0,10,0">
|
<Border DockPanel.Dock="Left" Width="280" Classes="panel" Margin="0,0,10,0">
|
||||||
<Grid RowDefinitions="Auto,Auto,*" RowSpacing="8">
|
<Grid RowDefinitions="Auto,Auto,Auto,*" RowSpacing="8">
|
||||||
|
<Grid ColumnDefinitions="*,Auto" Margin="0,-4,0,0">
|
||||||
<TextBlock Text="实时数据"
|
<TextBlock Text="实时数据"
|
||||||
Classes="section-title"
|
Classes="section-title"
|
||||||
HorizontalAlignment="Center"
|
VerticalAlignment="Center"/>
|
||||||
Margin="0,-4,0,0"/>
|
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="4" VerticalAlignment="Center">
|
||||||
|
<TextBlock Text="完整测试" Classes="caption" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Text="{Binding CompletedTestCount}" FontWeight="SemiBold" Foreground="#1D4ED8" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Text="次" Classes="caption" VerticalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<Border Grid.Row="1"
|
<Border Grid.Row="1"
|
||||||
|
Background="#F8FAFD"
|
||||||
|
BorderBrush="{StaticResource LineBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="8"
|
||||||
|
Padding="8,6">
|
||||||
|
<Grid ColumnDefinitions="*,*,*">
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="3" HorizontalAlignment="Center">
|
||||||
|
<TextBlock Text="干态" Classes="caption"/>
|
||||||
|
<TextBlock Text="{Binding DryTestCount}" FontWeight="SemiBold" Foreground="#047857"/>
|
||||||
|
<TextBlock Text="次" Classes="caption"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="3" HorizontalAlignment="Center">
|
||||||
|
<TextBlock Text="湿态" Classes="caption"/>
|
||||||
|
<TextBlock Text="{Binding WetTestCount}" FontWeight="SemiBold" Foreground="#1D4ED8"/>
|
||||||
|
<TextBlock Text="次" Classes="caption"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="3" HorizontalAlignment="Center">
|
||||||
|
<TextBlock Text="冰霜" Classes="caption"/>
|
||||||
|
<TextBlock Text="{Binding FrostTestCount}" FontWeight="SemiBold" Foreground="#7E22CE"/>
|
||||||
|
<TextBlock Text="次" Classes="caption"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Grid.Row="2"
|
||||||
Background="#F8FAFD"
|
Background="#F8FAFD"
|
||||||
BorderBrush="{StaticResource LineBrush}"
|
BorderBrush="{StaticResource LineBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
@@ -280,7 +311,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="2"
|
<ScrollViewer Grid.Row="3"
|
||||||
HorizontalScrollBarVisibility="Auto"
|
HorizontalScrollBarVisibility="Auto"
|
||||||
VerticalScrollBarVisibility="Auto"
|
VerticalScrollBarVisibility="Auto"
|
||||||
ClipToBounds="True">
|
ClipToBounds="True">
|
||||||
|
|||||||
Reference in New Issue
Block a user