2026-02-27 16:03:49 +08:00
|
|
|
<UserControl x:Class="MembranePoreTester.Views.BubblePointView"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:local="clr-namespace:MembranePoreTester.ViewModels"
|
|
|
|
|
xmlns:conv="clr-namespace:MembranePoreTester.Converters">
|
|
|
|
|
<UserControl.Resources>
|
|
|
|
|
<conv:InverseBooleanConverter x:Key="InverseBooleanConverter"/>
|
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
<Grid Margin="10">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<!-- 输入区域 -->
|
|
|
|
|
<StackPanel Grid.Row="0">
|
|
|
|
|
<GroupBox Header="样品信息" Margin="0,0,0,10">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<Label Grid.Row="0" Grid.Column="0" Content="膜类型:"/>
|
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="1" ItemsSource="{Binding MembraneTypes}"
|
|
|
|
|
SelectedItem="{Binding Record.SampleType}" Margin="5"/>
|
|
|
|
|
|
|
|
|
|
<Label Grid.Row="0" Grid.Column="2" Content="规格:"/>
|
|
|
|
|
<TextBox Grid.Row="0" Grid.Column="3" Text="{Binding Record.SampleSpec}" Margin="5"/>
|
|
|
|
|
|
|
|
|
|
<Label Grid.Row="1" Grid.Column="0" Content="室温(°C):"/>
|
|
|
|
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Record.RoomTemperature}" Margin="5"/>
|
|
|
|
|
|
|
|
|
|
<Label Grid.Row="1" Grid.Column="2" Content="浸润时间(h):"/>
|
|
|
|
|
<TextBox Grid.Row="1" Grid.Column="3" Text="{Binding Record.SoakingTime}" Margin="5"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</GroupBox>
|
|
|
|
|
|
|
|
|
|
<GroupBox Header="测试液体" Margin="0,0,0,10">
|
|
|
|
|
<StackPanel>
|
|
|
|
|
<RadioButton Content="预定义" IsChecked="{Binding IsCustomLiquid, Converter={StaticResource InverseBooleanConverter}}" Margin="5"/>
|
|
|
|
|
<ComboBox ItemsSource="{Binding Liquids}" SelectedItem="{Binding SelectedLiquid}"
|
|
|
|
|
DisplayMemberPath="Name" IsEnabled="{Binding IsCustomLiquid, Converter={StaticResource InverseBooleanConverter}}"
|
|
|
|
|
Margin="5,0,5,5"/>
|
|
|
|
|
<RadioButton Content="自定义" IsChecked="{Binding IsCustomLiquid}" Margin="5"/>
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="20,0,0,0" IsEnabled="{Binding IsCustomLiquid}">
|
|
|
|
|
<Label Content="表面张力(mN/m):"/>
|
|
|
|
|
<TextBox Text="{Binding CustomSurfaceTension}" Width="100" Margin="5"/>
|
|
|
|
|
</StackPanel>
|
2026-03-19 20:40:54 +08:00
|
|
|
<!--<Label Content="生产厂家:" Margin="5"/>
|
|
|
|
|
<TextBox Text="{Binding Record.LiquidManufacturer}" Margin="5"/>-->
|
2026-02-27 16:03:49 +08:00
|
|
|
</StackPanel>
|
|
|
|
|
</GroupBox>
|
|
|
|
|
|
|
|
|
|
<GroupBox Header="泡点压力" Margin="0,0,0,10">
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
<TextBox Text="{Binding Record.BubblePointPressure}" Width="150" Margin="5"/>
|
2026-02-27 16:58:02 +08:00
|
|
|
|
2026-03-19 20:40:54 +08:00
|
|
|
<Button Content="涨破" Command="{Binding ReadPlcCommand}" Padding="10,5" Margin="5"/>
|
2026-02-27 16:03:49 +08:00
|
|
|
<ComboBox ItemsSource="{Binding PressureUnits}" SelectedItem="{Binding Record.PressureUnit}" Width="80" Margin="5"/>
|
|
|
|
|
<Button Content="计算最大孔径" Command="{Binding CalculateCommand}" Padding="10,5" Margin="5"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</GroupBox>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<!-- 结果显示 -->
|
|
|
|
|
<GroupBox Grid.Row="1" Header="测试结果" VerticalAlignment="Center">
|
|
|
|
|
<TextBlock FontSize="36" TextAlignment="Center"
|
|
|
|
|
Text="{Binding MaxPoreSize, StringFormat={}{0:F3} μm}"/>
|
|
|
|
|
</GroupBox>
|
|
|
|
|
|
|
|
|
|
<!-- 底部按钮 -->
|
|
|
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
|
2026-03-02 18:50:30 +08:00
|
|
|
<Button Content="保存到历史" Command="{Binding SaveCommand}" Padding="15,8" Margin="5"/>
|
2026-02-27 16:03:49 +08:00
|
|
|
<Button Content="生成报告" Command="{Binding GenerateReportCommand}" Padding="15,8" Margin="5"/>
|
2026-03-02 18:50:30 +08:00
|
|
|
<Button Content="导出Excel" Command="{Binding ExportCommand}" Padding="15,8" Margin="5"/>
|
2026-02-27 16:03:49 +08:00
|
|
|
</StackPanel>
|
2026-03-02 18:50:30 +08:00
|
|
|
|
|
|
|
|
|
2026-02-27 16:03:49 +08:00
|
|
|
</Grid>
|
|
|
|
|
</UserControl>
|