更新2026530

This commit is contained in:
GukSang.Jin
2026-05-30 10:11:51 +08:00
parent 1a228bccae
commit 4059da4950
11 changed files with 213 additions and 80 deletions

View File

@@ -6,11 +6,78 @@
RequestedThemeVariant="Default">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
<Application.Resources>
<SolidColorBrush x:Key="AppSurfaceBrush" Color="#EEF3F2"/>
<SolidColorBrush x:Key="AppCardBrush" Color="#F8FAFA"/>
<SolidColorBrush x:Key="AppTextBrush" Color="#1B2B2F"/>
<SolidColorBrush x:Key="AppMutedTextBrush" Color="#58696D"/>
<SolidColorBrush x:Key="AppBorderBrush" Color="#CEDBDD"/>
<SolidColorBrush x:Key="AppPrimaryBrush" Color="#2F7D77"/>
<SolidColorBrush x:Key="AppPrimaryHoverBrush" Color="#388F88"/>
<SolidColorBrush x:Key="AppDangerBrush" Color="#B84A4A"/>
<SolidColorBrush x:Key="AppDangerHoverBrush" Color="#C95A5A"/>
</Application.Resources>
<Application.DataTemplates>
<local:ViewLocator/>
</Application.DataTemplates>
<Application.Styles>
<suki:SukiTheme />
<Style Selector="TextBlock">
<Setter Property="FontFamily" Value="Microsoft YaHei UI, Segoe UI, Inter"/>
<Setter Property="FontWeight" Value="Medium"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
</Style>
<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="Background" Value="#E8EFEE"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="BorderBrush" Value="#C9D8D8"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style Selector="Button:pointerover">
<Setter Property="Background" Value="#DCE8E7"/>
<Setter Property="BorderBrush" Value="#ADC8C7"/>
</Style>
<Style Selector="Button:pressed">
<Setter Property="Background" Value="#CCDCD9"/>
</Style>
<Style Selector="Button.primary">
<Setter Property="Background" Value="{DynamicResource AppPrimaryBrush}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppPrimaryBrush}"/>
</Style>
<Style Selector="Button.primary:pointerover">
<Setter Property="Background" Value="{DynamicResource AppPrimaryHoverBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppPrimaryHoverBrush}"/>
</Style>
<Style Selector="Button.danger">
<Setter Property="Background" Value="{DynamicResource AppDangerBrush}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppDangerBrush}"/>
</Style>
<Style Selector="Button.danger:pointerover">
<Setter Property="Background" Value="{DynamicResource AppDangerHoverBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppDangerHoverBrush}"/>
</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>
</Application.Styles>
</Application>

View File

@@ -13,10 +13,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="12.0.3" />
<PackageReference Include="Avalonia.Desktop" Version="12.0.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="12.0.3" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="12.0.3" />
<PackageReference Include="Avalonia" Version="12.0.4" />
<PackageReference Include="Avalonia.Desktop" Version="12.0.4" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="12.0.4" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="12.0.4" />
<PackageReference Include="AvaloniaUI.DiagnosticsSupport" Version="2.2.1">
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>

View File

@@ -69,6 +69,7 @@ public partial class MainWindowViewModel : ViewModelBase
private string _currentPageTitle = "";
private DeviceSnapshot _snapshot = DeviceSnapshot.Initial;
private string _connectionText = "未连接";
private string _selectedPageKey = "Dashboard";
public ViewModelBase CurrentPage
{
@@ -94,17 +95,29 @@ public partial class MainWindowViewModel : ViewModelBase
set => SetProperty(ref _connectionText, value);
}
private void ShowDashboard() => Navigate(Dashboard, "运行总览");
public bool IsDashboardSelected => _selectedPageKey == "Dashboard";
private void ShowMethodA() => Navigate(MethodA, "方法 A - 热阻/湿阻");
public bool IsMethodASelected => _selectedPageKey == "MethodA";
private void ShowMethodB() => Navigate(MethodB, "方法 B - 吸湿透水汽/保暖");
public bool IsMethodBSelected => _selectedPageKey == "MethodB";
private void ShowHistory() => Navigate(History, "历史记录");
public bool IsHistorySelected => _selectedPageKey == "History";
private void ShowReport() => Navigate(Report, "试验报告");
public bool IsReportSelected => _selectedPageKey == "Report";
private void ShowSettings() => Navigate(Settings, "系统设置");
public bool IsSettingsSelected => _selectedPageKey == "Settings";
private void ShowDashboard() => Navigate(Dashboard, "运行总览", "Dashboard");
private void ShowMethodA() => Navigate(MethodA, "方法 A - 热阻/湿阻", "MethodA");
private void ShowMethodB() => Navigate(MethodB, "方法 B - 吸湿透水汽/保暖", "MethodB");
private void ShowHistory() => Navigate(History, "历史记录", "History");
private void ShowReport() => Navigate(Report, "试验报告", "Report");
private void ShowSettings() => Navigate(Settings, "系统设置", "Settings");
private async Task ConnectDeviceAsync()
{
@@ -136,11 +149,28 @@ public partial class MainWindowViewModel : ViewModelBase
}
}
private void Navigate(ViewModelBase page, string title)
private void Navigate(ViewModelBase page, string title, string pageKey)
{
_logger.LogInformation("Navigating. PageTitle={PageTitle}", title);
CurrentPage = page;
CurrentPageTitle = title;
SetSelectedPageKey(pageKey);
}
private void SetSelectedPageKey(string pageKey)
{
if (_selectedPageKey == pageKey)
{
return;
}
_selectedPageKey = pageKey;
OnPropertyChanged(nameof(IsDashboardSelected));
OnPropertyChanged(nameof(IsMethodASelected));
OnPropertyChanged(nameof(IsMethodBSelected));
OnPropertyChanged(nameof(IsHistorySelected));
OnPropertyChanged(nameof(IsReportSelected));
OnPropertyChanged(nameof(IsSettingsSelected));
}
private async Task RefreshSnapshotAsync()

View File

@@ -7,26 +7,26 @@
<ScrollViewer>
<StackPanel Margin="24" Spacing="18">
<Grid ColumnDefinitions="*,*,*,*">
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18" Margin="0,0,14,0">
<Border 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.FootTemperatureC, StringFormat='{}{0:F2} ℃'}" FontSize="28" FontWeight="SemiBold"/>
</StackPanel>
</Border>
<Border Grid.Column="1" Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18" Margin="0,0,14,0">
<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"/>
</StackPanel>
</Border>
<Border Grid.Column="2" Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18" Margin="0,0,14,0">
<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"/>
</StackPanel>
</Border>
<Border Grid.Column="3" Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<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"/>
@@ -35,7 +35,7 @@
</Border>
</Grid>
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Grid RowDefinitions="Auto,*">
<Grid ColumnDefinitions="*,Auto">
<TextBlock Text="最近试验" FontSize="18" FontWeight="SemiBold"/>

View File

@@ -5,7 +5,7 @@
x:Class="FootwearTest.Views.HistoryView"
x:DataType="vm:HistoryViewModel">
<Grid Margin="24" ColumnDefinitions="430,*">
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18" Margin="0,0,18,0">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18" Margin="0,0,18,0">
<Grid RowDefinitions="Auto,*">
<Grid ColumnDefinitions="*,Auto">
<TextBlock Text="历史记录" FontSize="18" FontWeight="SemiBold"/>
@@ -25,11 +25,11 @@
</Grid>
</Border>
<Border Grid.Column="1" Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Grid.Column="1" Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Grid RowDefinitions="Auto,Auto,*">
<Grid ColumnDefinitions="*,Auto">
<TextBlock Text="记录报告" FontSize="18" FontWeight="SemiBold"/>
<Button Grid.Column="1" Content="导出 Excel 完整报告" Command="{Binding ExportSelectedExcelCommand}"/>
<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">

View File

@@ -14,79 +14,115 @@
MinHeight="720"
WindowState="Maximized"
Title="整鞋热阻和湿阻测定仪"
Background="#EEF2F5"
Background="{DynamicResource AppSurfaceBrush}"
TransparencyLevelHint="None"
BackgroundAnimationEnabled="False"
BackgroundTransitionsEnabled="False"
ShowTitlebarBackground="True"
TitleBarAnimationEnabled="False"
TitleBarAnimationEnabled="true"
TitleBarVisibilityOnFullScreen="Visible">
<suki:SukiWindow.Styles>
<Style Selector="suki|GlassCard#PART_TitleBarBackground">
<Setter Property="IsOpaque" Value="True"/>
<Setter Property="Margin" Value="0,0,0,-1"/>
</Style>
<Style Selector="suki|GlassCard#PART_TitleBarBackground /template/ Border.GlassCardBorderPartCard">
<Setter Property="Background" Value="#FDFEFF"/>
<Setter Property="Background" Value="#EEF4F3"/>
</Style>
<Style Selector="Border#DragArea">
<Setter Property="Background" Value="#FDFEFF"/>
<Setter Property="Background" Value="#EEF4F3"/>
</Style>
<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="Foreground" Value="#2B4145"/>
<Setter Property="BorderBrush" Value="#CBDADB"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style Selector="Button.nav:pointerover">
<Setter Property="Background" Value="#DDE9E7"/>
<Setter Property="Foreground" Value="#183338"/>
<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"/>
</Style>
<Style Selector="Button.nav.active:pointerover">
<Setter Property="Background" Value="#C4DEDB"/>
<Setter Property="BorderBrush" Value="#6BA19F"/>
</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"/>
</Style>
</suki:SukiWindow.Styles>
<Grid Background="#EEF2F5" ColumnDefinitions="236,*">
<Border Grid.Column="0" Background="#17212B">
<Grid Background="{DynamicResource AppSurfaceBrush}" ColumnDefinitions="236,*">
<Border Grid.Column="0">
<Border.Background>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,100%">
<GradientStop Color="#E6EDEC" Offset="0"/>
<GradientStop Color="#F3F6F5" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Grid RowDefinitions="Auto,*,Auto" Margin="18">
<StackPanel Spacing="4">
<TextBlock Text="FootwearTest" Foreground="White" FontSize="24" FontWeight="SemiBold"/>
<TextBlock Text="GB/T 33393-2023" Foreground="#AAB7C4" FontSize="13"/>
<TextBlock Text="FootwearTest" Foreground="#1B2B2F" FontSize="24" FontWeight="Bold"/>
<TextBlock Text="GB/T 33393-2023" Foreground="#66777A" FontSize="13" FontWeight="SemiBold"/>
</StackPanel>
<StackPanel Grid.Row="1" Spacing="8" Margin="0,28,0,0">
<Button Command="{Binding ShowDashboardCommand}" HorizontalAlignment="Stretch" Background="#243343" BorderBrush="#34485C" Padding="14,10">
<TextBlock Text="运行总览" Foreground="White" FontSize="15"/>
</Button>
<Button Command="{Binding ShowMethodACommand}" HorizontalAlignment="Stretch" Background="#243343" BorderBrush="#34485C" Padding="14,10">
<TextBlock Text="方法 A" Foreground="White" FontSize="15"/>
</Button>
<Button Command="{Binding ShowMethodBCommand}" HorizontalAlignment="Stretch" Background="#243343" BorderBrush="#34485C" Padding="14,10">
<TextBlock Text="方法 B" Foreground="White" FontSize="15"/>
</Button>
<Button Command="{Binding ShowHistoryCommand}" HorizontalAlignment="Stretch" Background="#243343" BorderBrush="#34485C" Padding="14,10">
<TextBlock Text="历史记录" Foreground="White" FontSize="15"/>
</Button>
<Button Command="{Binding ShowReportCommand}" HorizontalAlignment="Stretch" Background="#243343" BorderBrush="#34485C" Padding="14,10">
<TextBlock Text="试验报告" Foreground="White" FontSize="15"/>
</Button>
<Button Command="{Binding ShowSettingsCommand}" HorizontalAlignment="Stretch" Background="#243343" BorderBrush="#34485C" Padding="14,10">
<TextBlock Text="系统设置" Foreground="White" FontSize="15"/>
</Button>
<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"/>
<Button Classes="nav" Classes.active="{Binding IsHistorySelected}" Command="{Binding ShowHistoryCommand}" Content="历史记录"/>
<Button Classes="nav" Classes.active="{Binding IsReportSelected}" Command="{Binding ShowReportCommand}" Content="试验报告"/>
<Button Classes="nav" Classes.active="{Binding IsSettingsSelected}" Command="{Binding ShowSettingsCommand}" Content="系统设置"/>
</StackPanel>
<StackPanel Grid.Row="2" Spacing="8">
<TextBlock Text="{Binding ConnectionText}" Foreground="#D9E2EC" TextWrapping="Wrap"/>
<Button Command="{Binding ConnectDeviceCommand}" HorizontalAlignment="Stretch" Background="#1F7A4D" BorderBrush="#2C9962" Padding="14,10">
<TextBlock Text="连接设备" Foreground="White"/>
</Button>
<Button Command="{Binding DisconnectDeviceCommand}" HorizontalAlignment="Stretch" Background="#384858" BorderBrush="#4C6075" Padding="14,10">
<TextBlock Text="断开连接" Foreground="White"/>
</Button>
<TextBlock Text="{Binding ConnectionText}" Foreground="#334A4E" TextWrapping="Wrap" FontWeight="SemiBold"/>
<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,*">
<Border Background="#FDFEFF" BorderBrush="#D6DDE5" BorderThickness="0,0,0,1">
<Border BorderThickness="0" Margin="0,0,0,-1">
<Border.Background>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
<GradientStop Color="#EEF4F3" Offset="0"/>
<GradientStop Color="#F8FAFA" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Grid ColumnDefinitions="*,Auto" Margin="24,0">
<StackPanel VerticalAlignment="Center">
<TextBlock Text="{Binding CurrentPageTitle}" FontSize="24" FontWeight="SemiBold" Foreground="#16202A"/>
<TextBlock Text="整鞋热阻、湿阻、吸湿透水汽和保暖性能测试" Foreground="#5B6775"/>
<TextBlock Text="{Binding CurrentPageTitle}" FontSize="24" FontWeight="Bold" Foreground="#1B2B2F"/>
<TextBlock Text="整鞋热阻、湿阻、吸湿透水汽和保暖性能测试" Foreground="#637477" FontWeight="SemiBold"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="16" VerticalAlignment="Center">
<TextBlock Text="{Binding Snapshot.FootTemperatureC, StringFormat='假脚 {0:F1} ℃'}" Foreground="#16202A"/>
<TextBlock Text="{Binding Snapshot.EnvironmentTemperatureC, StringFormat='环境 {0:F1} ℃'}" Foreground="#16202A"/>
<TextBlock Text="{Binding Snapshot.EnvironmentHumidityPercent, StringFormat='湿度 {0:F0}%'}" Foreground="#16202A"/>
<TextBlock Text="{Binding Snapshot.AlarmText}" Foreground="#256F46"/>
<Border Classes="metricChip">
<TextBlock Text="{Binding Snapshot.FootTemperatureC, StringFormat='假脚 {0:F1} ℃'}" Foreground="#263B3F" FontWeight="SemiBold"/>
</Border>
<Border Classes="metricChip">
<TextBlock Text="{Binding Snapshot.EnvironmentTemperatureC, StringFormat='环境 {0:F1} ℃'}" Foreground="#263B3F" FontWeight="SemiBold"/>
</Border>
<Border Classes="metricChip">
<TextBlock Text="{Binding Snapshot.EnvironmentHumidityPercent, StringFormat='湿度 {0:F0}%'}" Foreground="#263B3F" FontWeight="SemiBold"/>
</Border>
<Border Classes="metricChip" Background="#E3F0EA" BorderBrush="#9DC8B7">
<TextBlock Text="{Binding Snapshot.AlarmText}" Foreground="#22614E" FontWeight="SemiBold"/>
</Border>
</StackPanel>
</Grid>
</Border>

View File

@@ -27,7 +27,7 @@ namespace FootwearTest.Views
var dragArea = e.NameScope.Find<Border>("DragArea");
if (dragArea is not null)
{
dragArea.Background = SolidColorBrush.Parse("#FDFEFF");
dragArea.Background = SolidColorBrush.Parse("#EEF4F3");
}
}
}

View File

@@ -7,19 +7,19 @@
<ScrollViewer>
<Grid Margin="24" ColumnDefinitions="360,*">
<StackPanel Spacing="14" Margin="0,0,18,0">
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<StackPanel Spacing="10">
<TextBlock Text="方法 A 试样与操作" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="试样描述" Foreground="#5B6775"/>
<TextBox Text="{Binding SampleDescription}"/>
<Button Content="测定皮肤湿阻" Command="{Binding MeasureSkinResistanceCommand}"/>
<Button Content="整鞋热阻/湿阻试验" Command="{Binding RunWholeShoeCommand}"/>
<Button Content="停止" Command="{Binding StopCommand}"/>
<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"/>
</StackPanel>
</Border>
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<StackPanel Spacing="8">
<TextBlock Text="实时结果" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="{Binding SkinMoistureResistance, StringFormat='皮肤湿阻 {0:F3} Pa·m²/W'}"/>
@@ -31,7 +31,7 @@
</StackPanel>
</Border>
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<StackPanel Spacing="6">
<TextBlock Text="标准控制点" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="试样 2 只;试验前标准环境调节 24 h" TextWrapping="Wrap"/>
@@ -42,7 +42,7 @@
</Border>
</StackPanel>
<Border Grid.Column="1" Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18" MinWidth="0">
<Border Grid.Column="1" Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18" MinWidth="0">
<Grid RowDefinitions="Auto,Auto,*">
<TextBlock Text="连续采样记录" FontSize="18" FontWeight="SemiBold"/>
<ScrollViewer Grid.Row="1" Grid.RowSpan="2" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" Margin="0,12,0,0">

View File

@@ -7,18 +7,18 @@
<ScrollViewer>
<Grid Margin="24" ColumnDefinitions="420,*">
<StackPanel Spacing="14" Margin="0,0,18,0">
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<StackPanel Spacing="10">
<TextBlock Text="方法 B 操作" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="试样描述" Foreground="#5B6775"/>
<TextBox Text="{Binding SampleDescription}"/>
<Button Content="运行吸湿透水汽 180 min 流程" Command="{Binding RunMoistureCommand}"/>
<Button Content="运行保暖性能 180 min 周期" Command="{Binding RunWarmthCommand}"/>
<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"/>
</StackPanel>
</Border>
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<StackPanel Spacing="8">
<TextBlock Text="结果" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="{Binding MoistureResultText}" TextWrapping="Wrap"/>
@@ -28,7 +28,7 @@
</StackPanel>
</Border>
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<StackPanel Spacing="6">
<TextBlock Text="标准控制点" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="吸湿透水汽:泵流量 (5.0±0.3) cm³/h周期 (180±1) min" TextWrapping="Wrap"/>
@@ -38,7 +38,7 @@
</StackPanel>
</Border>
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<StackPanel Spacing="8">
<TextBlock Text="保暖性能输入" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="180 min 能量 P (kJ)" Foreground="#5B6775"/>
@@ -50,7 +50,7 @@
</StackPanel>
<Grid Grid.Column="1" RowDefinitions="Auto,Auto,*">
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<StackPanel Spacing="10">
<TextBlock Text="吸湿透水汽称重输入" FontSize="18" FontWeight="SemiBold"/>
<Grid ColumnDefinitions="*,*,*,*" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
@@ -89,7 +89,7 @@
</StackPanel>
</Border>
<Border Grid.Row="1" Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18" Margin="0,14,0,0">
<Border Grid.Row="1" Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18" Margin="0,14,0,0">
<StackPanel Spacing="8">
<TextBlock Text="流程记录" FontSize="18" FontWeight="SemiBold"/>
<ItemsControl ItemsSource="{Binding ProcedureLog}">

View File

@@ -3,12 +3,12 @@
xmlns:vm="using:FootwearTest.ViewModels"
x:Class="FootwearTest.Views.ReportView"
x:DataType="vm:ReportViewModel">
<Border Margin="24" Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Margin="24" Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<Grid RowDefinitions="Auto,Auto,*">
<Grid ColumnDefinitions="*,Auto,Auto">
<TextBlock Text="试验报告" FontSize="18" FontWeight="SemiBold"/>
<Button Grid.Column="1" Content="加载最新报告" Command="{Binding LoadLatestCommand}"/>
<Button Grid.Column="2" Content="导出 Excel 完整报告" Command="{Binding ExportLatestExcelCommand}" Margin="10,0,0,0"/>
<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">

View File

@@ -6,7 +6,7 @@
x:DataType="vm:SettingsViewModel">
<ScrollViewer>
<StackPanel Margin="24" Spacing="14" MaxWidth="640">
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<StackPanel Spacing="10">
<TextBlock Text="通讯设置" FontSize="18" FontWeight="SemiBold"/>
<CheckBox Content="使用模拟器" IsChecked="{Binding UseSimulator}"/>
@@ -17,7 +17,7 @@
</StackPanel>
</Border>
<Border Background="White" BorderBrush="#DDE3EA" BorderThickness="1" CornerRadius="6" Padding="18">
<Border Background="{DynamicResource AppCardBrush}" BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1" CornerRadius="6" Padding="18">
<StackPanel Spacing="10">
<TextBlock Text="试验参数" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="假脚表面积 S (m²)" Foreground="#5B6775"/>
@@ -26,7 +26,7 @@
<TextBox Text="{Binding CoefficientOfVariationLimitPercent}" sukiTheme:TextBoxExtensions.Unit="%"/>
<TextBlock Text="方法 B 泵速 (cm³/h)" Foreground="#5B6775"/>
<TextBox Text="{Binding PumpSpeedCubicCentimetersPerHour}" sukiTheme:TextBoxExtensions.Unit="cm³/h"/>
<Button Content="保存参数" Command="{Binding SaveCommand}" HorizontalAlignment="Left"/>
<Button Classes="primary" Content="保存参数" Command="{Binding SaveCommand}" HorizontalAlignment="Left"/>
<TextBlock Text="{Binding SaveStatus}" Foreground="#256F46"/>
</StackPanel>
</Border>