更新20260616

This commit is contained in:
GukSang.Jin
2026-06-16 18:48:27 +08:00
parent 1ffd92ce58
commit 452ef212bf
8 changed files with 334 additions and 182 deletions

View File

@@ -9,11 +9,17 @@
<Application.Resources>
<SolidColorBrush x:Key="AppSurfaceBrush" Color="#EEF3F2"/>
<SolidColorBrush x:Key="AppCardBrush" Color="#F8FAFA"/>
<SolidColorBrush x:Key="AppPanelBrush" Color="#F3F7F6"/>
<SolidColorBrush x:Key="AppInsetBrush" Color="#E5EEEC"/>
<SolidColorBrush x:Key="AppTextBrush" Color="#1B2B2F"/>
<SolidColorBrush x:Key="AppMutedTextBrush" Color="#58696D"/>
<SolidColorBrush x:Key="AppBorderBrush" Color="#CEDBDD"/>
<SolidColorBrush x:Key="AppStrongBorderBrush" Color="#AFC7C7"/>
<SolidColorBrush x:Key="AppPrimaryBrush" Color="#2F7D77"/>
<SolidColorBrush x:Key="AppPrimaryHoverBrush" Color="#388F88"/>
<SolidColorBrush x:Key="AppSuccessBrush" Color="#256F46"/>
<SolidColorBrush x:Key="AppWarningBrush" Color="#9A6B1B"/>
<SolidColorBrush x:Key="AppInfoBrush" Color="#1D5F96"/>
<SolidColorBrush x:Key="AppDangerBrush" Color="#B84A4A"/>
<SolidColorBrush x:Key="AppDangerHoverBrush" Color="#C95A5A"/>
</Application.Resources>
@@ -34,8 +40,8 @@
<Style Selector="Button">
<Setter Property="FontFamily" Value="Microsoft YaHei UI, Segoe UI, Inter"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="MinHeight" Value="38"/>
<Setter Property="Padding" Value="16,9"/>
<Setter Property="MinHeight" Value="40"/>
<Setter Property="Padding" Value="16,10"/>
<Setter Property="Background" Value="#E8EFEE"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="BorderBrush" Value="#C9D8D8"/>
@@ -73,11 +79,88 @@
<Setter Property="BorderBrush" Value="{DynamicResource AppDangerHoverBrush}"/>
</Style>
<Style Selector="TextBox">
<Setter Property="FontFamily" Value="Microsoft YaHei UI, Segoe UI, Inter"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="MinHeight" Value="40"/>
<Setter Property="Padding" Value="12,8"/>
<Setter Property="Background" Value="#FDFEFE"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppStrongBorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style Selector="TextBox:focus">
<Setter Property="BorderBrush" Value="{DynamicResource AppPrimaryBrush}"/>
</Style>
<Style Selector="Border.card">
<Setter Property="Background" Value="{DynamicResource AppCardBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="6"/>
</Style>
<Style Selector="Border.hmiCard">
<Setter Property="Background" Value="{DynamicResource AppCardBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="6"/>
<Setter Property="Padding" Value="18"/>
</Style>
<Style Selector="Border.hmiMetric">
<Setter Property="Background" Value="#F9FCFB"/>
<Setter Property="BorderBrush" Value="#C9DAD8"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="6"/>
<Setter Property="Padding" Value="18"/>
</Style>
<Style Selector="Border.hmiInset">
<Setter Property="Background" Value="{DynamicResource AppInsetBrush}"/>
<Setter Property="BorderBrush" Value="#C6D7D5"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="4"/>
<Setter Property="Padding" Value="12,9"/>
</Style>
<Style Selector="Border.statusOk">
<Setter Property="Background" Value="#E3F0EA"/>
<Setter Property="BorderBrush" Value="#94C1AE"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="4"/>
<Setter Property="Padding" Value="10,6"/>
</Style>
<Style Selector="TextBlock.sectionTitle">
<Setter Property="FontSize" Value="18"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
</Style>
<Style Selector="TextBlock.fieldLabel">
<Setter Property="Foreground" Value="{DynamicResource AppMutedTextBrush}"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style Selector="TextBlock.metricLabel">
<Setter Property="Foreground" Value="{DynamicResource AppMutedTextBrush}"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style Selector="TextBlock.metricValue">
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="FontSize" Value="28"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
<Style Selector="TextBlock.statusText">
<Setter Property="Foreground" Value="{DynamicResource AppInfoBrush}"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
</Application.Styles>
</Application>

View File

@@ -4,54 +4,77 @@
xmlns:models="using:FootwearTest.Models"
x:Class="FootwearTest.Views.DashboardView"
x:DataType="vm:DashboardViewModel">
<ScrollViewer>
<StackPanel Margin="24" Spacing="18">
<Grid ColumnDefinitions="*,*,*,*">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18" Margin="0,0,14,0">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<StackPanel Margin="26,24,26,26" Spacing="16" MaxWidth="1100" HorizontalAlignment="Stretch">
<Border Classes="hmiInset">
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="12">
<StackPanel>
<TextBlock Text="假脚温度" Foreground="#5B6775"/>
<TextBlock Text="{Binding Snapshot.FootTemperatureC, StringFormat='{}{0:F2} ℃'}" FontSize="28" FontWeight="SemiBold"/>
<TextBlock Text="设备实时状态" Classes="sectionTitle"/>
<TextBlock Text="{Binding Snapshot.Timestamp, StringFormat='采样时间 {0:yyyy-MM-dd HH:mm:ss}'}" Classes="fieldLabel"/>
</StackPanel>
<Border Grid.Column="1" Classes="statusOk">
<TextBlock Text="{Binding Snapshot.AlarmText}" Foreground="{DynamicResource AppSuccessBrush}" FontWeight="Bold"/>
</Border>
</Grid>
</Border>
<Grid ColumnDefinitions="*,*" RowDefinitions="Auto,Auto" ColumnSpacing="14" RowSpacing="14">
<Border Classes="hmiMetric">
<StackPanel Spacing="4">
<TextBlock Text="假脚温度" Classes="metricLabel"/>
<TextBlock Text="{Binding Snapshot.FootTemperatureC, StringFormat='{}{0:F2} ℃'}" Classes="metricValue"/>
<TextBlock Text="目标 35.0±0.3 ℃" Classes="fieldLabel"/>
</StackPanel>
</Border>
<Border Grid.Column="1" Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18" Margin="0,0,14,0">
<StackPanel>
<TextBlock Text="环境温湿度" Foreground="#5B6775"/>
<TextBlock Text="{Binding Snapshot.EnvironmentTemperatureC, StringFormat='{}{0:F2} ℃'}" FontSize="28" FontWeight="SemiBold"/>
<TextBlock Text="{Binding Snapshot.EnvironmentHumidityPercent, StringFormat='{}{0:F1}% RH'}" Foreground="#5B6775"/>
<Border Grid.Column="1" Classes="hmiMetric">
<StackPanel Spacing="4">
<TextBlock Text="环境温湿度" Classes="metricLabel"/>
<TextBlock Text="{Binding Snapshot.EnvironmentTemperatureC, StringFormat='{}{0:F2} ℃'}" Classes="metricValue"/>
<TextBlock Text="{Binding Snapshot.EnvironmentHumidityPercent, StringFormat='湿度 {0:F1}% RH'}" Classes="fieldLabel"/>
</StackPanel>
</Border>
<Border Grid.Column="2" Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18" Margin="0,0,14,0">
<StackPanel>
<TextBlock Text="风速" Foreground="#5B6775"/>
<TextBlock Text="{Binding Snapshot.AirSpeedMetersPerSecond, StringFormat='{}{0:F2} m/s'}" FontSize="28" FontWeight="SemiBold"/>
<Border Grid.Row="1" Classes="hmiMetric">
<StackPanel Spacing="4">
<TextBlock Text="风速" Classes="metricLabel"/>
<TextBlock Text="{Binding Snapshot.AirSpeedMetersPerSecond, StringFormat='{}{0:F2} m/s'}" Classes="metricValue"/>
<TextBlock Text="目标 1.00±0.15 m/s" Classes="fieldLabel"/>
</StackPanel>
</Border>
<Border Grid.Column="3" Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<StackPanel>
<TextBlock Text="功率 / 出汗量" Foreground="#5B6775"/>
<TextBlock Text="{Binding Snapshot.PowerWatts, StringFormat='{}{0:F2} W'}" FontSize="28" FontWeight="SemiBold"/>
<TextBlock Text="{Binding Snapshot.VoltageVolts, StringFormat='电压 {0:F1} V'}" Foreground="#5B6775"/>
<TextBlock Text="{Binding Snapshot.CurrentAmps, StringFormat='电流 {0:F3} A'}" Foreground="#5B6775"/>
<TextBlock Text="{Binding Snapshot.WaterLossGramsPerHour, StringFormat='{}{0:F2} g/h'}" Foreground="#5B6775"/>
<Border Grid.Row="1" Grid.Column="1" Classes="hmiMetric">
<StackPanel Spacing="4">
<TextBlock Text="功率 / 出汗量" Classes="metricLabel"/>
<TextBlock Text="{Binding Snapshot.PowerWatts, StringFormat='{}{0:F2} W'}" Classes="metricValue"/>
<TextBlock Text="{Binding Snapshot.WaterLossGramsPerHour, StringFormat='出汗量 {0:F2} g/h'}" Classes="fieldLabel"/>
</StackPanel>
</Border>
</Grid>
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Grid RowDefinitions="Auto,*">
<Border Classes="hmiCard">
<Grid RowDefinitions="Auto,Auto,*">
<Grid ColumnDefinitions="*,Auto">
<TextBlock Text="最近试验" FontSize="18" FontWeight="SemiBold"/>
<StackPanel>
<TextBlock Text="最近试验" Classes="sectionTitle"/>
<TextBlock Text="按完成时间排序,供现场快速核对" Classes="fieldLabel"/>
</StackPanel>
<Button Grid.Column="1" Content="刷新" Command="{Binding RefreshCommand}"/>
</Grid>
<ItemsControl Grid.Row="1" ItemsSource="{Binding RecentRuns}" Margin="0,12,0,0">
<Border Grid.Row="1" Background="{DynamicResource AppInsetBrush}" BorderBrush="#C6D7D5" BorderThickness="1" CornerRadius="4" Padding="12,8" Margin="0,14,0,6">
<Grid ColumnDefinitions="140,190,*,90">
<TextBlock Text="时间" Classes="fieldLabel"/>
<TextBlock Grid.Column="1" Text="方法" Classes="fieldLabel"/>
<TextBlock Grid.Column="2" Text="结果摘要" Classes="fieldLabel"/>
<TextBlock Grid.Column="3" Text="判定" Classes="fieldLabel"/>
</Grid>
</Border>
<ItemsControl Grid.Row="2" ItemsSource="{Binding RecentRuns}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="models:TestRunSummary">
<Border BorderBrush="#E4E9EF" BorderThickness="0,0,0,1" Padding="0,10">
<Border BorderBrush="#DDE7E6" BorderThickness="0,0,0,1" Padding="12,10">
<Grid ColumnDefinitions="140,190,*,90">
<TextBlock Text="{Binding CreatedAt, StringFormat='{}{0:MM-dd HH:mm}'}"/>
<TextBlock Grid.Column="1" Text="{Binding Method}"/>
<TextBlock Grid.Column="1" Text="{Binding Method}" FontWeight="Bold"/>
<TextBlock Grid.Column="2" Text="{Binding ResultSummary}" TextWrapping="Wrap"/>
<TextBlock Grid.Column="3" Text="{Binding IsValid, StringFormat='有效: {0}'}"/>
<TextBlock Grid.Column="3" Text="{Binding IsValid, StringFormat='有效: {0}'}" FontWeight="Bold"/>
</Grid>
</Border>
</DataTemplate>

View File

@@ -4,35 +4,45 @@
xmlns:models="using:FootwearTest.Models"
x:Class="FootwearTest.Views.HistoryView"
x:DataType="vm:HistoryViewModel">
<Grid Margin="24" ColumnDefinitions="430,*">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18" Margin="0,0,18,0">
<Grid Margin="26,24,26,26" ColumnDefinitions="440,*" MaxWidth="1100" HorizontalAlignment="Stretch">
<Border Classes="hmiCard" Margin="0,0,18,0">
<Grid RowDefinitions="Auto,*">
<Grid ColumnDefinitions="*,Auto">
<TextBlock Text="历史记录" FontSize="18" FontWeight="SemiBold"/>
<StackPanel>
<TextBlock Text="历史记录" Classes="sectionTitle"/>
<TextBlock Text="选择一条记录查看完整报告" Classes="fieldLabel"/>
</StackPanel>
<Button Grid.Column="1" Content="刷新" Command="{Binding LoadCommand}"/>
</Grid>
<ListBox Grid.Row="1" ItemsSource="{Binding Runs}" SelectedItem="{Binding SelectedRun}" Margin="0,12,0,0">
<ListBox.ItemTemplate>
<DataTemplate x:DataType="models:TestRunSummary">
<StackPanel Margin="0,4">
<TextBlock Text="{Binding Method}" FontWeight="SemiBold"/>
<TextBlock Text="{Binding CreatedAt, StringFormat='{}{0:yyyy-MM-dd HH:mm}'}" Foreground="#5B6775"/>
<Border BorderBrush="#DDE7E6" BorderThickness="0,0,0,1" Padding="8,10">
<StackPanel Spacing="3">
<TextBlock Text="{Binding Method}" FontWeight="Bold"/>
<TextBlock Text="{Binding CreatedAt, StringFormat='{}{0:yyyy-MM-dd HH:mm}'}" Classes="fieldLabel"/>
<TextBlock Text="{Binding ResultSummary}" TextWrapping="Wrap"/>
</StackPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Border>
<Border Grid.Column="1" Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Grid.Column="1" Classes="hmiCard">
<Grid RowDefinitions="Auto,Auto,*">
<Grid ColumnDefinitions="*,Auto">
<TextBlock Text="记录报告" FontSize="18" FontWeight="SemiBold"/>
<StackPanel>
<TextBlock Text="记录报告" Classes="sectionTitle"/>
<TextBlock Text="导出内容与当前选中记录一致" Classes="fieldLabel"/>
</StackPanel>
<Button Grid.Column="1" Classes="primary" Content="导出 Excel 完整报告" Command="{Binding ExportSelectedExcelCommand}"/>
</Grid>
<TextBlock Grid.Row="1" Text="{Binding ExportStatusText}" Foreground="#1D5F96" TextWrapping="Wrap" Margin="0,10,0,0"/>
<ScrollViewer Grid.Row="2" Margin="0,14,0,0">
<Border Grid.Row="1" Classes="hmiInset" Margin="0,12,0,0">
<TextBlock Text="{Binding ExportStatusText}" Classes="statusText"/>
</Border>
<ScrollViewer Grid.Row="2" Margin="0,14,0,0" Background="#FBFDFD">
<TextBlock Text="{Binding SelectedReportText}" TextWrapping="Wrap" FontFamily="Consolas"/>
</ScrollViewer>
</Grid>

View File

@@ -4,12 +4,12 @@
xmlns:suki="clr-namespace:SukiUI.Controls;assembly=SukiUI"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="1280" d:DesignHeight="800"
mc:Ignorable="d" d:DesignWidth="1366" d:DesignHeight="820"
x:Class="FootwearTest.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
Icon="/Assets/avalonia-logo.ico"
Width="1280"
Height="800"
Width="1366"
Height="820"
MinWidth="1100"
MinHeight="720"
WindowState="Maximized"
@@ -37,11 +37,11 @@
<Style Selector="Button.nav">
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="MinHeight" Value="42"/>
<Setter Property="Padding" Value="15,10"/>
<Setter Property="Background" Value="#E7EFEE"/>
<Setter Property="MinHeight" Value="46"/>
<Setter Property="Padding" Value="16,12"/>
<Setter Property="Background" Value="#EDF4F2"/>
<Setter Property="Foreground" Value="#2B4145"/>
<Setter Property="BorderBrush" Value="#CBDADB"/>
<Setter Property="BorderBrush" Value="#CADBDA"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style Selector="Button.nav:pointerover">
@@ -50,38 +50,48 @@
<Setter Property="BorderBrush" Value="#AFCAC9"/>
</Style>
<Style Selector="Button.nav.active">
<Setter Property="Background" Value="#CEE4E1"/>
<Setter Property="Foreground" Value="#0E5558"/>
<Setter Property="BorderBrush" Value="#75AAA9"/>
<Setter Property="Background" Value="#D7E9E5"/>
<Setter Property="Foreground" Value="#0C5557"/>
<Setter Property="BorderBrush" Value="#5F9E9B"/>
</Style>
<Style Selector="Button.nav.active:pointerover">
<Setter Property="Background" Value="#C4DEDB"/>
<Setter Property="BorderBrush" Value="#6BA19F"/>
</Style>
<Style Selector="Border.brandPlate">
<Setter Property="Background" Value="#F7FAF9"/>
<Setter Property="BorderBrush" Value="#C9DBD9"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="6"/>
<Setter Property="Padding" Value="14,12"/>
</Style>
<Style Selector="Border.metricChip">
<Setter Property="Background" Value="#F6FAF9"/>
<Setter Property="BorderBrush" Value="#CFDDDE"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="4"/>
<Setter Property="Padding" Value="10,6"/>
<Setter Property="Padding" Value="11,7"/>
</Style>
</suki:SukiWindow.Styles>
<Grid Background="{DynamicResource AppSurfaceBrush}" ColumnDefinitions="236,*">
<Grid Background="{DynamicResource AppSurfaceBrush}" ColumnDefinitions="252,*">
<Border Grid.Column="0">
<Border.Background>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,100%">
<GradientStop Color="#E6EDEC" Offset="0"/>
<GradientStop Color="#F3F6F5" Offset="1"/>
<GradientStop Color="#E2EBEA" Offset="0"/>
<GradientStop Color="#F4F8F7" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Grid RowDefinitions="Auto,*,Auto" Margin="18">
<StackPanel Spacing="4">
<TextBlock Text="FootwearTest" Foreground="#1B2B2F" FontSize="24" FontWeight="Bold"/>
<TextBlock Text="GB/T 33393-2023" Foreground="#66777A" FontSize="13" FontWeight="SemiBold"/>
<Grid RowDefinitions="Auto,*,Auto" Margin="18,20,18,18">
<Border Classes="brandPlate">
<StackPanel Spacing="5">
<TextBlock Text="FootwearTest" Foreground="#132A2E" FontSize="25" FontWeight="Bold"/>
<TextBlock Text="工业 HMI 上位机" Foreground="#2F7D77" FontSize="13" FontWeight="Bold"/>
<TextBlock Text="GB/T 33393-2023" Foreground="#66777A" FontSize="12" FontWeight="SemiBold"/>
</StackPanel>
</Border>
<StackPanel Grid.Row="1" Spacing="8" Margin="0,28,0,0">
<StackPanel Grid.Row="1" Spacing="9" Margin="0,26,0,0">
<Button Classes="nav" Classes.active="{Binding IsDashboardSelected}" Command="{Binding ShowDashboardCommand}" Content="运行总览"/>
<Button Classes="nav" Classes.active="{Binding IsMethodASelected}" Command="{Binding ShowMethodACommand}" Content="方法 A"/>
<Button Classes="nav" Classes.active="{Binding IsMethodBSelected}" Command="{Binding ShowMethodBCommand}" Content="方法 B"/>
@@ -91,14 +101,19 @@
</StackPanel>
<StackPanel Grid.Row="2" Spacing="8">
<TextBlock Text="{Binding ConnectionText}" Foreground="#334A4E" TextWrapping="Wrap" FontWeight="SemiBold"/>
<Border Classes="hmiInset">
<StackPanel Spacing="4">
<TextBlock Text="设备连接" Foreground="#58696D" FontSize="12" FontWeight="Bold"/>
<TextBlock Text="{Binding ConnectionText}" Foreground="#263B3F" TextWrapping="Wrap" FontWeight="Bold"/>
</StackPanel>
</Border>
<Button Classes="primary" Command="{Binding ConnectDeviceCommand}" HorizontalAlignment="Stretch" Content="连接设备"/>
<Button Command="{Binding DisconnectDeviceCommand}" HorizontalAlignment="Stretch" Background="#DCE5E4" BorderBrush="#BFCFCE" Foreground="#2C4246" Content="断开连接"/>
</StackPanel>
</Grid>
</Border>
<Grid Grid.Column="1" RowDefinitions="76,*">
<Grid Grid.Column="1" RowDefinitions="82,*">
<Border BorderThickness="0" Margin="0,0,0,-1">
<Border.Background>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
@@ -106,23 +121,23 @@
<GradientStop Color="#F8FAFA" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Grid ColumnDefinitions="*,Auto" Margin="24,0">
<Grid ColumnDefinitions="*,Auto" Margin="72,0,24,0" MaxWidth="1100" HorizontalAlignment="Left">
<StackPanel VerticalAlignment="Center">
<TextBlock Text="{Binding CurrentPageTitle}" FontSize="24" FontWeight="Bold" Foreground="#1B2B2F"/>
<TextBlock Text="整鞋热阻、湿阻、吸湿透水汽和保暖性能测试" Foreground="#637477" FontWeight="SemiBold"/>
<TextBlock Text="整鞋热阻、湿阻、吸湿透水汽和保暖性能测试" Foreground="#637477" FontSize="13" FontWeight="SemiBold"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="16" VerticalAlignment="Center">
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="8" VerticalAlignment="Center">
<Border Classes="metricChip">
<TextBlock Text="{Binding Snapshot.FootTemperatureC, StringFormat='假脚 {0:F1} ℃'}" Foreground="#263B3F" FontWeight="SemiBold"/>
<TextBlock Text="{Binding Snapshot.FootTemperatureC, StringFormat='假脚 {0:F1}℃'}" Foreground="#263B3F" FontWeight="Bold"/>
</Border>
<Border Classes="metricChip">
<TextBlock Text="{Binding Snapshot.EnvironmentTemperatureC, StringFormat='环境 {0:F1} ℃'}" Foreground="#263B3F" FontWeight="SemiBold"/>
<TextBlock Text="{Binding Snapshot.EnvironmentTemperatureC, StringFormat='环境 {0:F1}℃'}" Foreground="#263B3F" FontWeight="Bold"/>
</Border>
<Border Classes="metricChip">
<TextBlock Text="{Binding Snapshot.EnvironmentHumidityPercent, StringFormat='湿度 {0:F0}%'}" Foreground="#263B3F" FontWeight="SemiBold"/>
<TextBlock Text="{Binding Snapshot.EnvironmentHumidityPercent, StringFormat='湿度 {0:F0}%'}" Foreground="#263B3F" FontWeight="Bold"/>
</Border>
<Border Classes="metricChip" Background="#E3F0EA" BorderBrush="#9DC8B7">
<TextBlock Text="{Binding Snapshot.AlarmText}" Foreground="#22614E" FontWeight="SemiBold"/>
<TextBlock Text="{Binding Snapshot.AlarmText}" Foreground="#22614E" FontWeight="Bold"/>
</Border>
</StackPanel>
</Grid>

View File

@@ -4,36 +4,42 @@
xmlns:models="using:FootwearTest.Models"
x:Class="FootwearTest.Views.MethodAView"
x:DataType="vm:MethodAViewModel">
<ScrollViewer>
<Grid Margin="24" ColumnDefinitions="360,*">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<Grid Margin="26,24,26,26" ColumnDefinitions="376,*" MaxWidth="1100" HorizontalAlignment="Stretch">
<StackPanel Spacing="14" Margin="0,0,18,0">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Classes="hmiCard">
<StackPanel Spacing="10">
<TextBlock Text="方法 A 试样与操作" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="试样描述" Foreground="#5B6775"/>
<TextBlock Text="方法 A 试样与操作" Classes="sectionTitle"/>
<TextBlock Text="试样描述" Classes="fieldLabel"/>
<TextBox Text="{Binding SampleDescription}"/>
<Button Classes="primary" Content="测定皮肤湿阻" Command="{Binding MeasureSkinResistanceCommand}"/>
<Button Classes="primary" Content="整鞋热阻/湿阻试验" Command="{Binding RunWholeShoeCommand}"/>
<Button Classes="danger" Content="停止" Command="{Binding StopCommand}"/>
<TextBlock Text="{Binding StatusText}" Foreground="#1D5F96" TextWrapping="Wrap"/>
<Border Classes="hmiInset">
<TextBlock Text="{Binding StatusText}" Classes="statusText"/>
</Border>
</StackPanel>
</Border>
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Classes="hmiCard">
<StackPanel Spacing="8">
<TextBlock Text="实时结果" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="{Binding SkinMoistureResistance, StringFormat='皮肤湿阻 {0:F3} Pa·m²/W'}"/>
<TextBlock Text="{Binding AverageMoistureResistance, StringFormat='平均湿阻 {0:F3} Pa·m²/W'}"/>
<TextBlock Text="{Binding AverageThermalResistance, StringFormat='平均热阻 {0:F4} m²·℃/W'}"/>
<TextBlock Text="{Binding MoistureCvPercent, StringFormat='湿阻 CV {0:F2}%'}"/>
<TextBlock Text="{Binding ThermalCvPercent, StringFormat='热阻 CV {0:F2}%'}"/>
<TextBlock Text="{Binding ResultText}" TextWrapping="Wrap" FontWeight="SemiBold"/>
<TextBlock Text="实时结果" Classes="sectionTitle"/>
<Border Classes="hmiInset">
<StackPanel Spacing="6">
<TextBlock Text="{Binding SkinMoistureResistance, StringFormat='皮肤湿阻 {0:F3} Pa·m²/W'}" FontWeight="Bold"/>
<TextBlock Text="{Binding AverageMoistureResistance, StringFormat='平均湿阻 {0:F3} Pa·m²/W'}" FontWeight="Bold"/>
<TextBlock Text="{Binding AverageThermalResistance, StringFormat='平均热阻 {0:F4} m²·℃/W'}" FontWeight="Bold"/>
<TextBlock Text="{Binding MoistureCvPercent, StringFormat='湿阻 CV {0:F2}%'}" Classes="fieldLabel"/>
<TextBlock Text="{Binding ThermalCvPercent, StringFormat='热阻 CV {0:F2}%'}" Classes="fieldLabel"/>
</StackPanel>
</Border>
<TextBlock Text="{Binding ResultText}" TextWrapping="Wrap" FontWeight="Bold"/>
</StackPanel>
</Border>
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Classes="hmiCard">
<StackPanel Spacing="6">
<TextBlock Text="标准控制点" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="标准控制点" Classes="sectionTitle"/>
<TextBlock Text="试样 2 只;试验前标准环境调节 24 h" TextWrapping="Wrap"/>
<TextBlock Text="环境 (23±2) ℃ / (50±5)% RH风速 (1.00±0.15) m/s" TextWrapping="Wrap"/>
<TextBlock Text="假脚/模拟皮肤温度 (35.0±0.3) ℃" TextWrapping="Wrap"/>
@@ -42,31 +48,34 @@
</Border>
</StackPanel>
<Border Grid.Column="1" Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18" MinWidth="0">
<Border Grid.Column="1" Classes="hmiCard" MinWidth="0">
<Grid RowDefinitions="Auto,Auto,*">
<TextBlock Text="连续采样记录" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="连续采样记录" Classes="sectionTitle"/>
<ScrollViewer Grid.Row="1" Grid.RowSpan="2" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" Margin="0,12,0,0">
<Grid RowDefinitions="Auto,*" MinWidth="980">
<Grid ColumnDefinitions="46,96,82,82,84,76,76,82,82,82,98,98" Margin="0,0,0,6">
<TextBlock Text="序号" Foreground="#5B6775"/>
<TextBlock Grid.Column="1" Text="假脚℃" Foreground="#5B6775"/>
<TextBlock Grid.Column="2" Text="环境℃" Foreground="#5B6775"/>
<TextBlock Grid.Column="3" Text="湿度%" Foreground="#5B6775"/>
<TextBlock Grid.Column="4" Text="出汗g/h" Foreground="#5B6775"/>
<TextBlock Grid.Column="5" Text="电压V" Foreground="#5B6775"/>
<TextBlock Grid.Column="6" Text="电流A" Foreground="#5B6775"/>
<TextBlock Grid.Column="7" Text="功率W" Foreground="#5B6775"/>
<TextBlock Grid.Column="8" Text="He W" Foreground="#5B6775"/>
<TextBlock Grid.Column="9" Text="Hd W" Foreground="#5B6775"/>
<TextBlock Grid.Column="10" Text="湿阻" Foreground="#5B6775"/>
<TextBlock Grid.Column="11" Text="阻" Foreground="#5B6775"/>
<Border Background="{DynamicResource AppInsetBrush}" BorderBrush="#C6D7D5" BorderThickness="1" CornerRadius="4" Padding="10,8" Margin="0,0,0,6">
<Grid ColumnDefinitions="46,96,82,82,84,76,76,82,82,82,98,98">
<TextBlock Text="序号" Classes="fieldLabel"/>
<TextBlock Grid.Column="1" Text="假脚℃" Classes="fieldLabel"/>
<TextBlock Grid.Column="2" Text="环境℃" Classes="fieldLabel"/>
<TextBlock Grid.Column="3" Text="湿度%" Classes="fieldLabel"/>
<TextBlock Grid.Column="4" Text="出汗g/h" Classes="fieldLabel"/>
<TextBlock Grid.Column="5" Text="电压V" Classes="fieldLabel"/>
<TextBlock Grid.Column="6" Text="电流A" Classes="fieldLabel"/>
<TextBlock Grid.Column="7" Text="功率W" Classes="fieldLabel"/>
<TextBlock Grid.Column="8" Text="He W" Classes="fieldLabel"/>
<TextBlock Grid.Column="9" Text="Hd W" Classes="fieldLabel"/>
<TextBlock Grid.Column="10" Text="湿阻" Classes="fieldLabel"/>
<TextBlock Grid.Column="11" Text="热阻" Classes="fieldLabel"/>
</Grid>
</Border>
<ScrollViewer Grid.Row="1">
<ItemsControl ItemsSource="{Binding Samples}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="models:MethodASampleRecord">
<Grid ColumnDefinitions="46,96,82,82,84,76,76,82,82,82,98,98" Margin="0,0,0,6">
<TextBlock Text="{Binding Index}"/>
<Border BorderBrush="#DDE7E6" BorderThickness="0,0,0,1" Padding="10,7">
<Grid ColumnDefinitions="46,96,82,82,84,76,76,82,82,82,98,98">
<TextBlock Text="{Binding Index}" FontWeight="Bold"/>
<TextBlock Grid.Column="1" Text="{Binding FootTemperatureC, StringFormat='{}{0:F2}'}"/>
<TextBlock Grid.Column="2" Text="{Binding EnvironmentTemperatureC, StringFormat='{}{0:F2}'}"/>
<TextBlock Grid.Column="3" Text="{Binding RelativeHumidityPercent, StringFormat='{}{0:F1}'}"/>
@@ -76,9 +85,10 @@
<TextBlock Grid.Column="7" Text="{Binding PowerWatts, StringFormat='{}{0:F2}'}"/>
<TextBlock Grid.Column="8" Text="{Binding MoistureHeatWatts, StringFormat='{}{0:F3}'}"/>
<TextBlock Grid.Column="9" Text="{Binding DryHeatWatts, StringFormat='{}{0:F3}'}"/>
<TextBlock Grid.Column="10" Text="{Binding MoistureResistance, StringFormat='{}{0:F3}'}"/>
<TextBlock Grid.Column="11" Text="{Binding ThermalResistance, StringFormat='{}{0:F4}'}"/>
<TextBlock Grid.Column="10" Text="{Binding MoistureResistance, StringFormat='{}{0:F3}'}" FontWeight="Bold"/>
<TextBlock Grid.Column="11" Text="{Binding ThermalResistance, StringFormat='{}{0:F4}'}" FontWeight="Bold"/>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>

View File

@@ -4,33 +4,35 @@
xmlns:sukiTheme="clr-namespace:SukiUI.Theme;assembly=SukiUI"
x:Class="FootwearTest.Views.MethodBView"
x:DataType="vm:MethodBViewModel">
<ScrollViewer>
<Grid Margin="24" ColumnDefinitions="420,*">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<Grid Margin="26,24,26,26" ColumnDefinitions="430,*" MaxWidth="1100" HorizontalAlignment="Stretch">
<StackPanel Spacing="14" Margin="0,0,18,0">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Classes="hmiCard">
<StackPanel Spacing="10">
<TextBlock Text="方法 B 操作" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="试样描述" Foreground="#5B6775"/>
<TextBlock Text="方法 B 操作" Classes="sectionTitle"/>
<TextBlock Text="试样描述" Classes="fieldLabel"/>
<TextBox Text="{Binding SampleDescription}"/>
<Button Classes="primary" Content="运行吸湿透水汽 180 min 流程" Command="{Binding RunMoistureCommand}"/>
<Button Classes="primary" Content="运行保暖性能 180 min 周期" Command="{Binding RunWarmthCommand}"/>
<TextBlock Text="{Binding StatusText}" Foreground="#1D5F96" TextWrapping="Wrap"/>
<Border Classes="hmiInset">
<TextBlock Text="{Binding StatusText}" Classes="statusText"/>
</Border>
</StackPanel>
</Border>
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Classes="hmiCard">
<StackPanel Spacing="8">
<TextBlock Text="结果" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="{Binding MoistureResultText}" TextWrapping="Wrap"/>
<TextBlock Text="结果" Classes="sectionTitle"/>
<TextBlock Text="{Binding MoistureResultText}" TextWrapping="Wrap" FontWeight="Bold"/>
<TextBlock Text="{Binding MoistureDetailText}" TextWrapping="Wrap" Foreground="#5B6775"/>
<TextBlock Text="{Binding WarmthResultText}" TextWrapping="Wrap"/>
<TextBlock Text="{Binding WarmthResultText}" TextWrapping="Wrap" FontWeight="Bold"/>
<TextBlock Text="{Binding WarmthDetailText}" TextWrapping="Wrap" Foreground="#5B6775"/>
</StackPanel>
</Border>
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Classes="hmiCard">
<StackPanel Spacing="6">
<TextBlock Text="标准控制点" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="标准控制点" Classes="sectionTitle"/>
<TextBlock Text="吸湿透水汽:泵流量 (5.0±0.3) cm³/h周期 (180±1) min" TextWrapping="Wrap"/>
<TextBlock Text="称重精确到 0.01 gm180 应在 15±0.9 g 范围内" TextWrapping="Wrap"/>
<TextBlock Text="结果:两次 T180*、XT180* 取平均,最终分别保留两位小数" TextWrapping="Wrap"/>
@@ -38,25 +40,25 @@
</StackPanel>
</Border>
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Classes="hmiCard">
<StackPanel Spacing="8">
<TextBlock Text="保暖性能输入" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="第1周期 180 min 能量 P (kJ)" Foreground="#5B6775"/>
<TextBlock Text="保暖性能输入" Classes="sectionTitle"/>
<TextBlock Text="第1周期 180 min 能量 P (kJ)" Classes="fieldLabel"/>
<TextBox Text="{Binding WarmthEnergyKilojoules}" sukiTheme:TextBoxExtensions.Unit="kJ"/>
<TextBlock Text="第1周期 t (s)" Foreground="#5B6775"/>
<TextBlock Text="第1周期 t (s)" Classes="fieldLabel"/>
<TextBox Text="{Binding WarmthSeconds}" sukiTheme:TextBoxExtensions.Unit="s"/>
<TextBlock Text="第2周期 180 min 能量 P (kJ)" Foreground="#5B6775"/>
<TextBlock Text="第2周期 180 min 能量 P (kJ)" Classes="fieldLabel"/>
<TextBox Text="{Binding WarmthEnergyKilojoulesSecond}" sukiTheme:TextBoxExtensions.Unit="kJ"/>
<TextBlock Text="第2周期 t (s)" Foreground="#5B6775"/>
<TextBlock Text="第2周期 t (s)" Classes="fieldLabel"/>
<TextBox Text="{Binding WarmthSecondsSecond}" sukiTheme:TextBoxExtensions.Unit="s"/>
</StackPanel>
</Border>
</StackPanel>
<StackPanel Grid.Column="1" Spacing="14">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Classes="hmiCard">
<StackPanel Spacing="10">
<TextBlock Text="吸湿透水汽称重输入 - 第1次" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="吸湿透水汽称重输入 - 第1次" Classes="sectionTitle"/>
<Grid ColumnDefinitions="*,*,*,*" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
<TextBlock Text="m11 皮肤前"/>
<TextBox Grid.Row="1" Text="{Binding M11}" Margin="0,0,10,8" sukiTheme:TextBoxExtensions.Unit="g"/>
@@ -93,9 +95,9 @@
</StackPanel>
</Border>
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Classes="hmiCard">
<StackPanel Spacing="10">
<TextBlock Text="吸湿透水汽称重输入 - 第2次" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="吸湿透水汽称重输入 - 第2次" Classes="sectionTitle"/>
<Grid ColumnDefinitions="*,*,*,*" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
<TextBlock Text="m11 皮肤前"/>
<TextBox Grid.Row="1" Text="{Binding M11Second}" Margin="0,0,10,8" sukiTheme:TextBoxExtensions.Unit="g"/>
@@ -132,9 +134,9 @@
</StackPanel>
</Border>
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Classes="hmiCard">
<StackPanel Spacing="8">
<TextBlock Text="流程记录" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="流程记录" Classes="sectionTitle"/>
<ItemsControl ItemsSource="{Binding ProcedureLog}">
<ItemsControl.ItemTemplate>
<DataTemplate>

View File

@@ -3,15 +3,20 @@
xmlns:vm="using:FootwearTest.ViewModels"
x:Class="FootwearTest.Views.ReportView"
x:DataType="vm:ReportViewModel">
<Border Margin="24" Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Margin="26,24,26,26" Classes="hmiCard" MaxWidth="1100" HorizontalAlignment="Stretch">
<Grid RowDefinitions="Auto,Auto,*">
<Grid ColumnDefinitions="*,Auto,Auto">
<TextBlock Text="试验报告" FontSize="18" FontWeight="SemiBold"/>
<StackPanel>
<TextBlock Text="试验报告" Classes="sectionTitle"/>
<TextBlock Text="加载最新记录并导出 Excel 完整报告" Classes="fieldLabel"/>
</StackPanel>
<Button Grid.Column="1" Content="加载最新报告" Command="{Binding LoadLatestCommand}"/>
<Button Grid.Column="2" Classes="primary" Content="导出 Excel 完整报告" Command="{Binding ExportLatestExcelCommand}" Margin="10,0,0,0"/>
</Grid>
<TextBlock Grid.Row="1" Text="{Binding ExportStatusText}" Foreground="#1D5F96" TextWrapping="Wrap" Margin="0,10,0,0"/>
<ScrollViewer Grid.Row="2" Margin="0,14,0,0">
<Border Grid.Row="1" Classes="hmiInset" Margin="0,12,0,0">
<TextBlock Text="{Binding ExportStatusText}" Classes="statusText"/>
</Border>
<ScrollViewer Grid.Row="2" Margin="0,14,0,0" Background="#FBFDFD">
<TextBlock Text="{Binding ReportText}" TextWrapping="Wrap" FontFamily="Consolas"/>
</ScrollViewer>
</Grid>

View File

@@ -4,80 +4,84 @@
xmlns:sukiTheme="clr-namespace:SukiUI.Theme;assembly=SukiUI"
x:Class="FootwearTest.Views.SettingsView"
x:DataType="vm:SettingsViewModel">
<ScrollViewer>
<StackPanel Margin="24" Spacing="14" MaxWidth="640">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<StackPanel Margin="26,24,26,26" Spacing="14" MaxWidth="720">
<Border Classes="hmiCard">
<StackPanel Spacing="10">
<TextBlock Text="通讯设置" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="通讯设置" Classes="sectionTitle"/>
<CheckBox Content="使用模拟器" IsChecked="{Binding UseSimulator}"/>
<TextBlock Text="PLC Modbus TCP IP" Foreground="#5B6775"/>
<TextBlock Text="PLC Modbus TCP IP" Classes="fieldLabel"/>
<TextBox Text="{Binding Host}" sukiTheme:TextBoxExtensions.Prefix="IP"/>
<TextBlock Text="PLC Modbus TCP 端口" Foreground="#5B6775"/>
<TextBlock Text="PLC Modbus TCP 端口" Classes="fieldLabel"/>
<TextBox Text="{Binding Port}" sukiTheme:TextBoxExtensions.Prefix="TCP"/>
<TextBlock Text="PLC 从站号" Foreground="#5B6775"/>
<TextBlock Text="PLC 从站号" Classes="fieldLabel"/>
<TextBox Text="{Binding PlcSlaveId}"/>
<TextBlock Text="485 仪表 Modbus RTU 串口" Foreground="#5B6775"/>
<TextBlock Text="485 仪表 Modbus RTU 串口" Classes="fieldLabel"/>
<TextBox Text="{Binding SerialPortName}" sukiTheme:TextBoxExtensions.Prefix="COM"/>
<TextBlock Text="波特率" Foreground="#5B6775"/>
<TextBlock Text="波特率" Classes="fieldLabel"/>
<TextBox Text="{Binding SerialBaudRate}" sukiTheme:TextBoxExtensions.Unit="bps"/>
<TextBlock Text="数据位" Foreground="#5B6775"/>
<TextBlock Text="数据位" Classes="fieldLabel"/>
<TextBox Text="{Binding SerialDataBits}"/>
<TextBlock Text="校验位 None/Odd/Even" Foreground="#5B6775"/>
<TextBlock Text="校验位 None/Odd/Even" Classes="fieldLabel"/>
<TextBox Text="{Binding SerialParity}"/>
<TextBlock Text="停止位 One/Two" Foreground="#5B6775"/>
<TextBlock Text="停止位 One/Two" Classes="fieldLabel"/>
<TextBox Text="{Binding SerialStopBits}"/>
</StackPanel>
</Border>
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Classes="hmiCard">
<StackPanel Spacing="10">
<TextBlock Text="试验参数" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="假脚表面积 S (m²)" Foreground="#5B6775"/>
<TextBlock Text="试验参数" Classes="sectionTitle"/>
<TextBlock Text="假脚表面积 S (m²)" Classes="fieldLabel"/>
<TextBox Text="{Binding FootAreaSquareMeters}" sukiTheme:TextBoxExtensions.Unit="m²"/>
<TextBlock Text="方法 A 变异系数阈值 (%)" Foreground="#5B6775"/>
<TextBlock Text="方法 A 变异系数阈值 (%)" Classes="fieldLabel"/>
<TextBox Text="{Binding CoefficientOfVariationLimitPercent}" sukiTheme:TextBoxExtensions.Unit="%"/>
<TextBlock Text="方法 B 泵速 (cm³/h)" Foreground="#5B6775"/>
<TextBlock Text="方法 B 泵速 (cm³/h)" Classes="fieldLabel"/>
<TextBox Text="{Binding PumpSpeedCubicCentimetersPerHour}" sukiTheme:TextBoxExtensions.Unit="cm³/h"/>
<TextBlock Text="PLC 32 位浮点寄存器均按 Little-Endian 字节序解析,未配置填 -1" Foreground="#5B6775" TextWrapping="Wrap"/>
<TextBlock Text="假脚温度 PLC 寄存器地址" Foreground="#5B6775"/>
<Border Classes="hmiInset">
<TextBlock Text="PLC 32 位浮点寄存器均按 Little-Endian 字节序解析,未配置填 -1" Classes="fieldLabel" TextWrapping="Wrap"/>
</Border>
<TextBlock Text="假脚温度 PLC 寄存器地址" Classes="fieldLabel"/>
<TextBox Text="{Binding FootTemperatureRegisterAddress}"/>
<TextBlock Text="环境温度 PLC 寄存器地址" Foreground="#5B6775"/>
<TextBlock Text="环境温度 PLC 寄存器地址" Classes="fieldLabel"/>
<TextBox Text="{Binding EnvironmentTemperatureRegisterAddress}"/>
<TextBlock Text="环境湿度 PLC 寄存器地址" Foreground="#5B6775"/>
<TextBlock Text="环境湿度 PLC 寄存器地址" Classes="fieldLabel"/>
<TextBox Text="{Binding EnvironmentHumidityRegisterAddress}"/>
<TextBlock Text="风速 PLC 寄存器地址" Foreground="#5B6775"/>
<TextBlock Text="风速 PLC 寄存器地址" Classes="fieldLabel"/>
<TextBox Text="{Binding AirSpeedRegisterAddress}"/>
<TextBlock Text="能量 PLC 寄存器地址" Foreground="#5B6775"/>
<TextBlock Text="能量 PLC 寄存器地址" Classes="fieldLabel"/>
<TextBox Text="{Binding EnergyKilojoulesRegisterAddress}" sukiTheme:TextBoxExtensions.Unit="kJ"/>
<TextBlock Text="直流表从站号" Foreground="#5B6775"/>
<TextBlock Text="直流表从站号" Classes="fieldLabel"/>
<TextBox Text="{Binding DcMeterSlaveId}"/>
<TextBlock Text="电压值寄存器地址ZL2020 默认 00x00" Foreground="#5B6775"/>
<TextBlock Text="电压值寄存器地址ZL2020 默认 00x00" Classes="fieldLabel"/>
<TextBox Text="{Binding VoltageRegisterAddress}"/>
<TextBlock Text="电压小数点寄存器地址ZL2020 默认 10x01" Foreground="#5B6775"/>
<TextBlock Text="电压小数点寄存器地址ZL2020 默认 10x01" Classes="fieldLabel"/>
<TextBox Text="{Binding VoltageDecimalPointRegisterAddress}"/>
<TextBlock Text="电压备用缩放系数,小数点寄存器填 -1 时使用" Foreground="#5B6775"/>
<TextBlock Text="电压备用缩放系数,小数点寄存器填 -1 时使用" Classes="fieldLabel"/>
<TextBox Text="{Binding VoltageRegisterScale}" sukiTheme:TextBoxExtensions.Unit="V/count"/>
<TextBlock Text="电流值寄存器地址ZL2020 默认 20x02" Foreground="#5B6775"/>
<TextBlock Text="电流值寄存器地址ZL2020 默认 20x02" Classes="fieldLabel"/>
<TextBox Text="{Binding CurrentRegisterAddress}"/>
<TextBlock Text="电流小数点寄存器地址ZL2020 默认 30x03" Foreground="#5B6775"/>
<TextBlock Text="电流小数点寄存器地址ZL2020 默认 30x03" Classes="fieldLabel"/>
<TextBox Text="{Binding CurrentDecimalPointRegisterAddress}"/>
<TextBlock Text="电流备用缩放系数,小数点寄存器填 -1 时使用" Foreground="#5B6775"/>
<TextBlock Text="电流备用缩放系数,小数点寄存器填 -1 时使用" Classes="fieldLabel"/>
<TextBox Text="{Binding CurrentRegisterScale}" sukiTheme:TextBoxExtensions.Unit="A/count"/>
<TextBlock Text="天平从站号" Foreground="#5B6775"/>
<TextBlock Text="天平从站号" Classes="fieldLabel"/>
<TextBox Text="{Binding BalanceSlaveId}"/>
<TextBlock Text="天平重量寄存器地址,默认 40001 读取 32 位重量高/低字" Foreground="#5B6775"/>
<TextBlock Text="天平重量寄存器地址,默认 40001 读取 32 位重量高/低字" Classes="fieldLabel"/>
<TextBox Text="{Binding BalanceWeightRegisterAddress}"/>
<TextBlock Text="天平小数点寄存器地址,默认 40003" Foreground="#5B6775"/>
<TextBlock Text="天平小数点寄存器地址,默认 40003" Classes="fieldLabel"/>
<TextBox Text="{Binding BalanceDecimalPointRegisterAddress}"/>
<TextBlock Text="天平重量备用缩放系数" Foreground="#5B6775"/>
<TextBlock Text="天平重量备用缩放系数" Classes="fieldLabel"/>
<TextBox Text="{Binding BalanceWeightScale}" sukiTheme:TextBoxExtensions.Unit="g/count"/>
<CheckBox Content="水箱重量减少表示出汗量" IsChecked="{Binding BalanceMassDecreasesAsWaterLoss}"/>
<TextBlock Text="PLC 泵/风扇/加热线圈地址,未配置填 -1" Foreground="#5B6775"/>
<TextBlock Text="PLC 泵/风扇/加热线圈地址,未配置填 -1" Classes="fieldLabel"/>
<TextBox Text="{Binding PumpCoilAddress}" sukiTheme:TextBoxExtensions.Prefix="泵"/>
<TextBox Text="{Binding FanCoilAddress}" sukiTheme:TextBoxExtensions.Prefix="风扇"/>
<TextBox Text="{Binding HeaterCoilAddress}" sukiTheme:TextBoxExtensions.Prefix="加热"/>
<Button Classes="primary" Content="保存参数" Command="{Binding SaveCommand}" HorizontalAlignment="Left"/>
<TextBlock Text="{Binding SaveStatus}" Foreground="#256F46"/>
<Border Classes="statusOk">
<TextBlock Text="{Binding SaveStatus}" Foreground="{DynamicResource AppSuccessBrush}" FontWeight="Bold" TextWrapping="Wrap"/>
</Border>
</StackPanel>
</Border>
</StackPanel>