添加项目文件。

This commit is contained in:
GukSang.Jin
2026-06-02 17:41:53 +08:00
parent 9bda0de84f
commit 27439505a9
40 changed files with 3771 additions and 0 deletions

View File

@@ -0,0 +1,432 @@
<suki:SukiWindow xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.ViewModels"
xmlns:lvc="using:LiveChartsCore.SkiaSharpView.Avalonia"
xmlns:suki="using:SukiUI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignWidth="1440"
d:DesignHeight="900"
x:Class="Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
Icon="/Assets/avalonia-logo.ico"
WindowState="Maximized"
Width="1280"
Height="800"
MinWidth="1280"
MinHeight="720"
Title="鞋类整鞋防滑性能试验"
Background="#F4F7FB"
BackgroundAnimationEnabled="False"
ShowBottomBorder="True"
IsMenuVisible="False"
RootCornerRadius="0"
TitleFontSize="15"
TitleFontWeight="SemiBold">
<Design.DataContext>
<vm:MainWindowViewModel/>
</Design.DataContext>
<suki:SukiWindow.RightWindowTitleBarControls>
<Button Classes="title-icon"
Content="&#xE713;"
FontFamily="Segoe MDL2 Assets"
Command="{Binding ShowSettingsDialogCommand}"
ToolTip.Tip="设置"/>
</suki:SukiWindow.RightWindowTitleBarControls>
<suki:SukiWindow.Resources>
<SolidColorBrush x:Key="PanelBrush" Color="#FFFFFF"/>
<SolidColorBrush x:Key="PanelSoftBrush" Color="#F8FAFD"/>
<SolidColorBrush x:Key="TextPrimaryBrush" Color="#172033"/>
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#67738A"/>
<SolidColorBrush x:Key="LineBrush" Color="#DCE4EF"/>
<SolidColorBrush x:Key="ControlFillBrush" Color="#F2F6FB"/>
<SolidColorBrush x:Key="AccentBrush" Color="#2563EB"/>
<SolidColorBrush x:Key="SuccessBrush" Color="#0F9F6E"/>
<SolidColorBrush x:Key="WarnBrush" Color="#D97706"/>
<SolidColorBrush x:Key="DangerBrush" Color="#DC2626"/>
</suki:SukiWindow.Resources>
<suki:SukiWindow.Styles>
<Style Selector="TextBlock">
<Setter Property="FontFamily" Value="Microsoft YaHei UI, Inter"/>
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}"/>
</Style>
<Style Selector="Border.panel">
<Setter Property="Background" Value="{StaticResource PanelBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource LineBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="14"/>
</Style>
<Style Selector="Border.header-panel">
<Setter Property="Background" Value="#EDF4FF"/>
<Setter Property="BorderBrush" Value="#C9DAF8"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="14"/>
</Style>
<Style Selector="Border.metric">
<Setter Property="Background" Value="{StaticResource PanelSoftBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource LineBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="12"/>
</Style>
<Style Selector="TextBox, ComboBox">
<Setter Property="MinHeight" Value="38"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="Background" Value="{StaticResource ControlFillBrush}"/>
<Setter Property="BorderBrush" Value="#C9D5E7"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="10,6"/>
</Style>
<Style Selector="TextBox.setting-value">
<Setter Property="MinHeight" Value="40"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Watermark" Value="0.00"/>
</Style>
<Style Selector="Label.setting-label">
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Foreground" Value="{StaticResource TextSecondaryBrush}"/>
<Setter Property="Padding" Value="0"/>
</Style>
<Style Selector="TextBlock.setting-unit">
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style Selector="Button">
<Setter Property="MinHeight" Value="44"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="14,8"/>
</Style>
<Style Selector="Button.compact">
<Setter Property="MinHeight" Value="34"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Padding" Value="8,4"/>
</Style>
<Style Selector="Button.action">
<Setter Property="MinHeight" Value="42"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="Padding" Value="10,6"/>
</Style>
<Style Selector="Button.title-icon">
<Setter Property="Width" Value="34"/>
<Setter Property="Height" Value="30"/>
<Setter Property="MinHeight" Value="30"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="CornerRadius" Value="6"/>
<Setter Property="Background" Value="#EAF1FA"/>
<Setter Property="BorderBrush" Value="#CBD8EA"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}"/>
</Style>
<Style Selector="Button.primary">
<Setter Property="Background" Value="{StaticResource AccentBrush}"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Style Selector="Button.success">
<Setter Property="Background" Value="{StaticResource SuccessBrush}"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Style Selector="Button.warning">
<Setter Property="Background" Value="{StaticResource WarnBrush}"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Style Selector="Button.danger">
<Setter Property="Background" Value="{StaticResource DangerBrush}"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Style Selector="Button.motion">
<Setter Property="Background" Value="#EEF6F2"/>
<Setter Property="BorderBrush" Value="#B8DEC7"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="#13784D"/>
</Style>
<Style Selector="TextBlock.section-title">
<Setter Property="FontSize" Value="18"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style Selector="TextBlock.caption">
<Setter Property="FontSize" Value="12"/>
<Setter Property="Foreground" Value="{StaticResource TextSecondaryBrush}"/>
</Style>
<Style Selector="TextBlock.value">
<Setter Property="FontSize" Value="24"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
</suki:SukiWindow.Styles>
<Grid RowDefinitions="*" Margin="14">
<Grid Grid.Row="0" RowDefinitions="Auto,*" RowSpacing="14">
<Border Classes="panel">
<Grid ColumnDefinitions="1.2*,1.15*" ColumnSpacing="18">
<Grid RowDefinitions="Auto,Auto,Auto" ColumnDefinitions="Auto,*,Auto,*" RowSpacing="10" ColumnSpacing="10">
<TextBlock Text="试验编号" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<TextBox Grid.Column="1" Text="{Binding TestNumber}"/>
<TextBlock Grid.Column="2" Text="操作人员" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<TextBox Grid.Column="3" Text="{Binding OperatorName}" Watermark="请输入"/>
<TextBlock Grid.Row="1" Text="鞋码区间" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<ComboBox Grid.Row="1" Grid.Column="1" SelectedIndex="0">
<ComboBoxItem Content="250(含)以上 - 400N"/>
<ComboBoxItem Content="205-250 - 350N"/>
<ComboBoxItem Content="205以下 - 160N"/>
</ComboBox>
<TextBlock Grid.Row="1" Grid.Column="2" Text="润滑介质" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<ComboBox Grid.Row="1" Grid.Column="3" SelectedIndex="0">
<ComboBoxItem Content="干态"/>
<ComboBoxItem Content="湿态 - 蒸馏水"/>
<ComboBoxItem Content="湿态 - 洗涤剂"/>
<ComboBoxItem Content="冰霜"/>
</ComboBox>
<TextBlock Grid.Row="2" Text="测试模式" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<ComboBox Grid.Row="2" Grid.Column="1" SelectedIndex="2">
<ComboBoxItem Content="后跟测试模式"/>
<ComboBoxItem Content="前掌测试模式"/>
<ComboBoxItem Content="水平测试模式"/>
</ComboBox>
<TextBlock Grid.Row="2" Grid.Column="2" Text="测试方法" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<TextBox Grid.Row="2" Grid.Column="3" Text="{Binding MethodName}"/>
</Grid>
<Grid Grid.Column="1" RowDefinitions="Auto,Auto,Auto" ColumnDefinitions="Auto,*" RowSpacing="10" ColumnSpacing="10">
<TextBlock Text="报告名称" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<TextBox Grid.Column="1" Text="{Binding ReportName}" Watermark="例: 白羊座防滑性能报告"/>
<TextBlock Grid.Row="1" Text="样品特征" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding SampleFeature}" Watermark="鞋底材料、花纹、尺码"/>
<TextBlock Grid.Row="2" Text="地面材质" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<ComboBox Grid.Row="2" Grid.Column="1" SelectedIndex="0">
<ComboBoxItem Content="瓷砖"/>
<ComboBoxItem Content="木地板"/>
<ComboBoxItem Content="石材"/>
<ComboBoxItem Content="冰霜表面"/>
</ComboBox>
</Grid>
</Grid>
</Border>
<Grid Grid.Row="1" ColumnDefinitions="330,*,230" ColumnSpacing="14">
<Border Classes="panel">
<Grid RowDefinitions="Auto,Auto,Auto,*" RowSpacing="10">
<TextBlock Text="实时数据"
Classes="section-title"
HorizontalAlignment="Center"
Margin="0,-4,0,0"/>
<Border Grid.Row="1"
Background="#F8FAFD"
BorderBrush="{StaticResource LineBrush}"
BorderThickness="1"
CornerRadius="8"
Padding="10">
<Grid ColumnDefinitions="*,92" ColumnSpacing="10">
<Grid RowDefinitions="Auto,Auto" ColumnDefinitions="Auto,*,Auto" RowSpacing="8" ColumnSpacing="8">
<TextBlock Text="目标负荷" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<TextBlock Grid.Column="1" Text="{Binding TargetLoadText}" VerticalAlignment="Center" HorizontalAlignment="Right" FontWeight="SemiBold" Foreground="#1D4ED8"/>
<TextBlock Grid.Column="2" Text="" VerticalAlignment="Center"/>
<TextBlock Grid.Row="1" Text="实际负荷" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding ActualLoadText}" VerticalAlignment="Center" HorizontalAlignment="Right" FontWeight="SemiBold" Foreground="#1D4ED8"/>
<TextBlock Grid.Row="1" Grid.Column="2" Text="" VerticalAlignment="Center"/>
</Grid>
<Grid Grid.Column="1" RowDefinitions="Auto,Auto" ColumnDefinitions="Auto,*" RowSpacing="8" ColumnSpacing="8">
<Button Grid.ColumnSpan="2" Content="删除" Classes="danger compact" Command="{Binding DeleteSelectedSampleCommand}"/>
<TextBlock Grid.Row="1" Text="序号" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding SelectedSampleIndex}" MinHeight="34" FontSize="13" HorizontalContentAlignment="Center"/>
</Grid>
</Grid>
</Border>
<Grid Grid.Row="2" ColumnDefinitions="50,98,72,72" Background="#F0F5FB" Height="36">
<TextBlock Text="序号" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="SemiBold"/>
<TextBlock Grid.Column="1" Text="时间" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="SemiBold"/>
<TextBlock Grid.Column="2" Text="动系数" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="SemiBold"/>
<TextBlock Grid.Column="3" Text="静系数" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="SemiBold"/>
</Grid>
<ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding Samples}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:TestSample">
<Border BorderBrush="{StaticResource LineBrush}" BorderThickness="0,0,0,1" Padding="0,6">
<Grid ColumnDefinitions="50,98,72,72">
<TextBlock Text="{Binding Index}" HorizontalAlignment="Center" FontSize="15" Foreground="#334155"/>
<TextBlock Grid.Column="1" Text="{Binding Time}" HorizontalAlignment="Center" FontSize="15" Foreground="#1D4ED8"/>
<TextBlock Grid.Column="2" Text="{Binding DynamicCoefficient}" HorizontalAlignment="Center" FontSize="15" Foreground="#047857"/>
<TextBlock Grid.Column="3" Text="{Binding StaticCoefficient}" HorizontalAlignment="Center" FontSize="15" Foreground="#5B21B6"/>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</Border>
<Border Grid.Column="1" Classes="panel" ClipToBounds="True">
<Grid RowDefinitions="32,*" RowSpacing="8">
<Grid ColumnDefinitions="*" ColumnSpacing="14" MinHeight="32" VerticalAlignment="Top">
<TextBlock Text="实时曲线" Classes="section-title" VerticalAlignment="Center"/>
</Grid>
<Border Grid.Row="1" Background="#FBFDFF" BorderBrush="{StaticResource LineBrush}" BorderThickness="1" CornerRadius="8" Padding="10" MinHeight="0">
<lvc:CartesianChart Series="{Binding Series}"
XAxes="{Binding XAxes}"
YAxes="{Binding YAxes}"
DrawMarginFrame="{Binding ChartFrame}"
LegendTextPaint="{Binding LegendTextPaint}"
LegendTextSize="10"
LegendPosition="Bottom"
TooltipPosition="Top"
ZoomMode="X"/>
</Border>
</Grid>
</Border>
<Border Grid.Column="2" Classes="panel">
<Grid RowDefinitions="Auto,Auto,Auto,Auto,*" RowSpacing="12">
<StackPanel Spacing="2">
<TextBlock Text="控制" Classes="section-title"/>
<TextBlock Text="试验执行与位置调整" Classes="caption"/>
</StackPanel>
<Grid Grid.Row="1" ColumnDefinitions="*,*" RowDefinitions="Auto,Auto" ColumnSpacing="10" RowSpacing="10">
<Button Content="复位" Classes="action" Command="{Binding ClearCommand}"/>
<Button Grid.Column="1" Content="测试" Classes="success action" Command="{Binding StartTestCommand}"/>
<Button Grid.Row="1" Content="停止" Classes="danger action" Command="{Binding StopTestCommand}"/>
<Button Grid.Row="1" Grid.Column="1" Content="生成报告" Classes="primary action" Command="{Binding ExportReportCommand}"/>
</Grid>
<StackPanel Grid.Row="2" Spacing="8">
<TextBlock Text="垂直架" FontWeight="SemiBold"/>
<Grid ColumnDefinitions="*,*" ColumnSpacing="8">
<Button Content="提升" Classes="motion compact" Command="{Binding LiftCommand}"/>
<Button Grid.Column="1" Content="下降" Classes="motion compact" Command="{Binding LowerCommand}"/>
</Grid>
</StackPanel>
<StackPanel Grid.Row="3" Spacing="8">
<TextBlock Text="水平板" FontWeight="SemiBold"/>
<Grid ColumnDefinitions="*,*" ColumnSpacing="8">
<Button Content="左移" Classes="motion compact" Command="{Binding MoveLeftCommand}"/>
<Button Grid.Column="1" Content="右移" Classes="motion compact" Command="{Binding MoveRightCommand}"/>
</Grid>
</StackPanel>
</Grid>
</Border>
</Grid>
</Grid>
<Grid IsVisible="{Binding IsSettingsDialogOpen}"
Background="#800F172A">
<Border Width="680"
Background="{StaticResource PanelBrush}"
BorderBrush="{StaticResource LineBrush}"
BorderThickness="1"
CornerRadius="8"
Padding="18"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Grid RowDefinitions="Auto,Auto,Auto,Auto" RowSpacing="16">
<Grid ColumnDefinitions="*,Auto">
<StackPanel Spacing="2">
<TextBlock Text="设置" Classes="section-title"/>
<TextBlock Text="设备连接、试验参数与系统选项" Classes="caption"/>
</StackPanel>
<Button Grid.Column="1"
Content="关闭"
Classes="compact"
Command="{Binding CloseSettingsDialogCommand}"/>
</Grid>
<Grid Grid.Row="1"
RowDefinitions="Auto,Auto,Auto,8,Auto,Auto"
ColumnDefinitions="Auto,150,Auto,24,Auto,150"
RowSpacing="10"
ColumnSpacing="12">
<Label Content="手动速度" Classes="setting-label" VerticalAlignment="Center"/>
<TextBox Grid.Column="1" Classes="setting-value" Text="{Binding ManualSpeed, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<TextBlock Grid.Column="2" Text="m/s" Classes="setting-unit" VerticalAlignment="Center"/>
<Label Grid.Row="1" Content="手动位移" Classes="setting-label" VerticalAlignment="Center"/>
<TextBox Grid.Row="1" Grid.Column="1" Classes="setting-value" Text="{Binding ManualDisplacement, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<TextBlock Grid.Row="1" Grid.Column="2" Text="m" Classes="setting-unit" VerticalAlignment="Center"/>
<Label Grid.Row="2" Content="测试速度" Classes="setting-label" VerticalAlignment="Center"/>
<TextBox Grid.Row="2" Grid.Column="1" Classes="setting-value" Text="{Binding TestSpeed, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<TextBlock Grid.Row="2" Grid.Column="2" Text="m/s" Classes="setting-unit" VerticalAlignment="Center"/>
<Border Grid.Row="3" Grid.ColumnSpan="6" Height="1" Background="{StaticResource LineBrush}" Margin="0,4"/>
<Label Grid.Row="4" Content="正压力系数" Classes="setting-label" VerticalAlignment="Center"/>
<TextBox Grid.Row="4" Grid.Column="1" Classes="setting-value" Text="{Binding NormalPressureCoefficient, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="5" Content="摩擦1系数" Classes="setting-label" VerticalAlignment="Center"/>
<TextBox Grid.Row="5" Grid.Column="1" Classes="setting-value" Text="{Binding FrictionCoefficient1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="5" Grid.Column="4" Content="摩擦2系数" Classes="setting-label" VerticalAlignment="Center"/>
<TextBox Grid.Row="5" Grid.Column="5" Classes="setting-value" Text="{Binding FrictionCoefficient2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
<Grid Grid.Row="2"
RowDefinitions="Auto,Auto"
ColumnDefinitions="Auto,*"
RowSpacing="10"
ColumnSpacing="12">
<TextBlock Text="设备状态" Classes="setting-unit" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<TextBlock Grid.Column="1" Text="{Binding DeviceStatus}" Classes="setting-unit" VerticalAlignment="Center"/>
<TextBlock Grid.Row="1" Text="采样频率" Classes="setting-unit" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"/>
<Border Grid.Row="1" Grid.Column="1" Background="{StaticResource ControlFillBrush}" BorderBrush="#C9D5E7" BorderThickness="1" CornerRadius="6" Padding="10,7">
<TextBlock Text="{Binding SampleRateText}" Classes="setting-unit"/>
</Border>
</Grid>
<Border Grid.Row="3"
Background="#F8FAFD"
BorderBrush="{StaticResource LineBrush}"
BorderThickness="1"
CornerRadius="8"
Padding="12">
<TextBlock Text="{Binding StandardReference}" TextWrapping="Wrap" Classes="caption"/>
</Border>
</Grid>
</Border>
</Grid>
</Grid>
</suki:SukiWindow>

View File

@@ -0,0 +1,12 @@
using SukiUI.Controls;
namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.Views
{
public partial class MainWindow : SukiWindow
{
public MainWindow()
{
InitializeComponent();
}
}
}