更新122

This commit is contained in:
GukSang.Jin
2026-05-20 16:39:42 +08:00
parent 7c7339d72c
commit 4030c18dc8
5 changed files with 117 additions and 77 deletions

View File

@@ -23,15 +23,15 @@
<SolidColorBrush x:Key="ValueBrush" Color="#102A43"/>
<Style TargetType="Button" x:Key="ActionButton">
<Setter Property="MinWidth" Value="112"/>
<Setter Property="Height" Value="42"/>
<Setter Property="Margin" Value="6"/>
<Setter Property="Padding" Value="14,0"/>
<Setter Property="MinWidth" Value="116"/>
<Setter Property="Height" Value="44"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="Padding" Value="16,0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Background" Value="{StaticResource PrimaryBrush}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontSize" Value="{StaticResource ButtonFontSize}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Template">
<Setter.Value>
@@ -78,9 +78,9 @@
</Style>
<Style TargetType="TabItem">
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontSize" Value="{StaticResource TabFontSize}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Padding" Value="24,12"/>
<Setter Property="Padding" Value="24,13"/>
<Setter Property="Foreground" Value="#465A6E"/>
<Setter Property="Template">
<Setter.Value>
@@ -109,44 +109,56 @@
<Style TargetType="GroupBox">
<Setter Property="BorderBrush" Value="{StaticResource PanelBorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="14"/>
<Setter Property="Padding" Value="16"/>
<Setter Property="Margin" Value="0,0,0,12"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontSize" Value="{StaticResource BaseFontSize}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Background" Value="{StaticResource PanelBackgroundBrush}"/>
</Style>
<Style TargetType="TextBox">
<Setter Property="Width" Value="130"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Height" Value="42"/>
<Setter Property="Padding" Value="8,2"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderBrush" Value="#B7C4D2"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontSize" Value="{StaticResource BaseFontSize}"/>
<Setter Property="helpers:NumericInput.IsEnabled" Value="True"/>
</Style>
<Style TargetType="DataGrid">
<Setter Property="FontSize" Value="{StaticResource TableFontSize}"/>
<Setter Property="RowHeight" Value="36"/>
<Setter Property="ColumnHeaderHeight" Value="38"/>
</Style>
<Style TargetType="DataGridColumnHeader">
<Setter Property="FontSize" Value="{StaticResource TableFontSize}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
<Style TargetType="RadioButton">
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontSize" Value="{StaticResource BaseFontSize}"/>
<Setter Property="Margin" Value="0,0,22,0"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style TargetType="TextBlock" x:Key="ParamLabel">
<Setter Property="Width" Value="250"/>
<Setter Property="Width" Value="260"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{StaticResource LabelBrush}"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontSize" Value="{StaticResource BaseFontSize}"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
<Style TargetType="StackPanel" x:Key="ParamRow">
<Setter Property="Orientation" Value="Horizontal"/>
<Setter Property="Margin" Value="0,6,26,6"/>
<Setter Property="Margin" Value="0,7,26,7"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="MinWidth" Value="400"/>
<Setter Property="MinWidth" Value="430"/>
</Style>
<Style TargetType="Border" x:Key="MetricCard">
@@ -154,14 +166,14 @@
<Setter Property="BorderBrush" Value="#E0E7EF"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="6"/>
<Setter Property="Padding" Value="12,10"/>
<Setter Property="Padding" Value="14,12"/>
<Setter Property="Margin" Value="6"/>
<Setter Property="MinHeight" Value="86"/>
<Setter Property="MinHeight" Value="94"/>
</Style>
<Style TargetType="TextBlock" x:Key="MetricLabel">
<Setter Property="Foreground" Value="{StaticResource LabelBrush}"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontSize" Value="{StaticResource BaseFontSize}"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/>
@@ -170,7 +182,7 @@
<Style TargetType="TextBlock" x:Key="MetricValue">
<Setter Property="Foreground" Value="{StaticResource ValueBrush}"/>
<Setter Property="FontSize" Value="26"/>
<Setter Property="FontSize" Value="{StaticResource MetricValueFontSize}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/>
@@ -194,14 +206,14 @@
<Style TargetType="TextBlock" x:Key="FooterLabel">
<Setter Property="Foreground" Value="#647487"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontSize" Value="{StaticResource SmallTextFontSize}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style TargetType="TextBlock" x:Key="FooterValue">
<Setter Property="Foreground" Value="#102A43"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
@@ -220,7 +232,7 @@
</Grid.RowDefinitions>
<TextBlock Text="{Binding LocalAlarm}"
FontSize="15"
FontSize="{StaticResource BaseFontSize}"
FontWeight="SemiBold"
Margin="0,0,0,8"
HorizontalAlignment="Center">
@@ -258,7 +270,7 @@
</TextBlock.Style>
</TextBlock>
<TabControl Grid.Row="1" FontSize="13" BorderThickness="0">
<TabControl Grid.Row="1" FontSize="{StaticResource BaseFontSize}" BorderThickness="0">
<TabItem Header="硬度">
<ScrollViewer VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled">
@@ -273,15 +285,15 @@
<UniformGrid Columns="3" Margin="10">
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,10,18,0">
<TextBlock Text="内控下限(N)" Width="130" VerticalAlignment="Center"/>
<TextBlock Text="{Binding HardnessInternalMin, StringFormat=F1}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding HardnessInternalMin, StringFormat=F1}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,10,18,0">
<TextBlock Text="内控上限(N)" Width="130" VerticalAlignment="Center"/>
<TextBlock Text="{Binding HardnessInternalMax, StringFormat=F1}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding HardnessInternalMax, StringFormat=F1}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>-->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,10,0,0">
<TextBlock Text="测试次数:" Width="110" VerticalAlignment="Center"/>
<TextBlock Text="{Binding HardnessTestCount}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding HardnessTestCount}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
</UniformGrid>
</GroupBox>
@@ -476,15 +488,15 @@
<WrapPanel>
<StackPanel Style="{StaticResource ParamRow}">
<TextBlock Text="转速设置(r/min)" Style="{StaticResource ParamLabel}"/>
<TextBlock Text="{Binding FriabilityTargetRpm, StringFormat=F1}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding FriabilityTargetRpm, StringFormat=F1}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Style="{StaticResource ParamRow}">
<TextBlock Text="试验转数(转)" Style="{StaticResource ParamLabel}"/>
<TextBlock Text="{Binding FriabilityTargetRounds}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding FriabilityTargetRounds}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Style="{StaticResource ParamRow}">
<TextBlock Text="失重率限度(%)" Style="{StaticResource ParamLabel}"/>
<TextBlock Text="{Binding FriabilityMaxLossPercent, StringFormat=F1}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding FriabilityMaxLossPercent, StringFormat=F1}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
</WrapPanel>
</GroupBox>
@@ -502,7 +514,7 @@
<TextBlock Text="脆碎前质量(g)" Style="{StaticResource MetricLabel}"/>
<TextBox Text="{Binding WeightBefore, Mode=TwoWay, UpdateSourceTrigger=LostFocus, StringFormat=F3}"
Width="150"
FontSize="22"
FontSize="{StaticResource LargeInputFontSize}"
FontWeight="SemiBold"
HorizontalContentAlignment="Center"
Margin="0,8,0,0"/>
@@ -513,7 +525,7 @@
<TextBlock Text="脆碎后质量(g)" Style="{StaticResource MetricLabel}"/>
<TextBox Text="{Binding WeightAfter, Mode=TwoWay, UpdateSourceTrigger=LostFocus, StringFormat=F3}"
Width="150"
FontSize="22"
FontSize="{StaticResource LargeInputFontSize}"
FontWeight="SemiBold"
HorizontalContentAlignment="Center"
Margin="0,8,0,0"/>
@@ -558,23 +570,23 @@
<WrapPanel>
<StackPanel Style="{StaticResource ParamRow}">
<TextBlock Text="溶出1时间(min)" Style="{StaticResource ParamLabel}"/>
<TextBlock Text="{Binding Dissolution1TimeMin}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Dissolution1TimeMin}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Style="{StaticResource ParamRow}">
<TextBlock Text="溶出2时间(min)" Style="{StaticResource ParamLabel}"/>
<TextBlock Text="{Binding Dissolution2TimeMin}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Dissolution2TimeMin}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Style="{StaticResource ParamRow}">
<TextBlock Text="溶出1间隔取样时间(min)" Style="{StaticResource ParamLabel}"/>
<TextBlock Text="{Binding Dissolution1SampleIntervalMin, StringFormat=F0}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Dissolution1SampleIntervalMin, StringFormat=F0}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Style="{StaticResource ParamRow}">
<TextBlock Text="溶出2间隔取样时间(min)" Style="{StaticResource ParamLabel}"/>
<TextBlock Text="{Binding Dissolution2SampleIntervalMin, StringFormat=F0}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Dissolution2SampleIntervalMin, StringFormat=F0}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Style="{StaticResource ParamRow}">
<TextBlock Text="介质温度(℃)" Style="{StaticResource ParamLabel}"/>
<TextBlock Text="{Binding DisintegrationTemp, StringFormat=F1}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding DisintegrationTemp, StringFormat=F1}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
</WrapPanel>
</GroupBox>
@@ -647,12 +659,12 @@
<oxy:PlotView Grid.Row="0" Model="{Binding DissolutionPlotModel}" Margin="4"/>
<WrapPanel Grid.Row="1" Margin="4,8,4,2">
<TextBlock Text="{Binding Dissolution1RSquared, StringFormat='溶出1 R² = {0:F4}'}"
FontSize="15"
FontSize="{StaticResource BaseFontSize}"
FontWeight="SemiBold"
Foreground="#2E7D32"
Margin="0,0,28,0"/>
<TextBlock Text="{Binding Dissolution2RSquared, StringFormat='溶出2 R² = {0:F4}'}"
FontSize="15"
FontSize="{StaticResource BaseFontSize}"
FontWeight="SemiBold"
Foreground="#1565C0"/>
</WrapPanel>
@@ -674,8 +686,8 @@
IsReadOnly="True"
MinHeight="150"
MaxHeight="240"
RowHeight="34"
FontSize="14"
RowHeight="36"
FontSize="{StaticResource TableFontSize}"
GridLinesVisibility="Horizontal">
<DataGrid.Columns>
<DataGridTextColumn Header="通道" Binding="{Binding ChannelName}" Width="90"/>
@@ -713,11 +725,11 @@
<WrapPanel>
<StackPanel Style="{StaticResource ParamRow}">
<TextBlock Text="崩解时间(min)" Style="{StaticResource ParamLabel}"/>
<TextBlock Text="{Binding DisintegrationTimeMin, StringFormat=F1}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding DisintegrationTimeMin, StringFormat=F1}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Style="{StaticResource ParamRow}">
<TextBlock Text="介质温度(℃)" Style="{StaticResource ParamLabel}"/>
<TextBlock Text="{Binding DisintegrationTemp, StringFormat=F1}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock Text="{Binding DisintegrationTemp, StringFormat=F1}" FontSize="{StaticResource ParamValueFontSize}" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
</WrapPanel>
</GroupBox>
@@ -729,12 +741,12 @@
<TextBlock Text="实际崩解时间(秒)" Style="{StaticResource MetricLabel}"/>
<TextBox Text="{Binding DisintegrationActualSecondsText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Width="160"
Height="46"
Height="50"
Margin="0,8,0,0"
HorizontalAlignment="Center"
IsEnabled="{Binding CanSaveDisintegrationResult}"
TextAlignment="Center"
FontSize="26"
FontSize="{StaticResource MetricValueFontSize}"
FontWeight="SemiBold"
Foreground="{StaticResource ValueBrush}"/>
</StackPanel>
@@ -771,12 +783,18 @@
<Border Background="#0F3D68" CornerRadius="6" Margin="0,0,0,8" Padding="12,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="片剂四用仪 硬度 · 脆碎度 · 溶出 · 崩解"
FontSize="22"
FontSize="{StaticResource TitleFontSize}"
FontWeight="Bold"
Foreground="White"
VerticalAlignment="Center"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
VerticalAlignment="Center"
TextTrimming="CharacterEllipsis"
Margin="0,0,12,0"/>
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
<Button Command="{Binding OpenSettingsCommand}" Content="参数设置" Style="{StaticResource ActionButton}"/>
<Button Command="{Binding OpenHistoryCommand}" Content="历史记录" Style="{StaticResource ActionButton}"/>
<Button Command="{Binding ExportAllCommand}" Content="导出报告" Style="{StaticResource ActionButton}"/>
@@ -836,7 +854,7 @@
<TextBlock Grid.Column="1"
Text="{Binding GlobalAlarm}"
Foreground="#C62828"
FontSize="14"
FontSize="{StaticResource SmallTextFontSize}"
FontWeight="SemiBold"
VerticalAlignment="Center"
TextTrimming="CharacterEllipsis"/>