Compare commits
10 Commits
fbab7e3c17
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| afd044ce09 | |||
| 9c7698e9cc | |||
| 75d9405770 | |||
| db8d255fdd | |||
| 87ca4b0a64 | |||
| bc893c4d53 | |||
| 00d17dc0eb | |||
| 785583a6c8 | |||
| 2ea0f95fec | |||
| a2d86b667e |
BIN
L028需要采购给客户寄过去,不需要增加清单.xlsx
Normal file
BIN
L028需要采购给客户寄过去,不需要增加清单.xlsx
Normal file
Binary file not shown.
@@ -74,8 +74,6 @@ public class TestParameters
|
|||||||
public double FitStartTime { get; set; } = 0.25; // 默认0.35秒,避开早期扰动
|
public double FitStartTime { get; set; } = 0.25; // 默认0.35秒,避开早期扰动
|
||||||
public double FitEndTime { get; set; } = 0.60;
|
public double FitEndTime { get; set; } = 0.60;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AppSettings
|
public class AppSettings
|
||||||
@@ -91,6 +89,6 @@ public class CalibrationCoefficients
|
|||||||
public ushort PressureProtection { get; set; }
|
public ushort PressureProtection { get; set; }
|
||||||
public ushort TemperatureCoefficient { get; set; }
|
public ushort TemperatureCoefficient { get; set; }
|
||||||
public ushort ResistanceCoefficient { get; set; }
|
public ushort ResistanceCoefficient { get; set; }
|
||||||
public double ThermalConductivityCorrection { get; set; } = 47.305349f;//蒸馏水 比热率修正
|
public double ThermalConductivityCorrection { get; set; } = 17.305349f;//蒸馏水 比热率修正
|
||||||
public double ThermalDiffusivityCorrection { get; set; } = 0.312912;//导热率修正
|
public double ThermalDiffusivityCorrection { get; set; } = 0.158682538;//导热率修正
|
||||||
}
|
}
|
||||||
@@ -283,7 +283,7 @@ public partial class D7896ViewModel : ObservableObject
|
|||||||
int requiredCount = _config.TestParameters.MeasurementCount; // 需要多少有效数据
|
int requiredCount = _config.TestParameters.MeasurementCount; // 需要多少有效数据
|
||||||
int validCount = 0;
|
int validCount = 0;
|
||||||
int attemptCount = 0;
|
int attemptCount = 0;
|
||||||
int maxAttempts = requiredCount * 2; // 最多尝试次数,防止死循环
|
int maxAttempts = requiredCount * 4; // 最多尝试次数,防止死循环
|
||||||
|
|
||||||
// 存储每次成功测量的结果(用于后续异常判断)
|
// 存储每次成功测量的结果(用于后续异常判断)
|
||||||
List<double> validLambdaList = new List<double>();
|
List<double> validLambdaList = new List<double>();
|
||||||
@@ -294,7 +294,7 @@ public partial class D7896ViewModel : ObservableObject
|
|||||||
{
|
{
|
||||||
attemptCount++;
|
attemptCount++;
|
||||||
CurrentMeasurementIndex = attemptCount; // 显示当前尝试次数(不是有效次数)
|
CurrentMeasurementIndex = attemptCount; // 显示当前尝试次数(不是有效次数)
|
||||||
StatusMessage = $"正在执行第 {attemptCount} 次测量(有效:{validCount}/{requiredCount})...";
|
//StatusMessage = $"正在执行第{validCount}次测量)...";
|
||||||
|
|
||||||
// --- 步骤1:基线采集(加热前)---
|
// --- 步骤1:基线采集(加热前)---
|
||||||
await _th1963Ustd.PrepareBatchAsync(50);
|
await _th1963Ustd.PrepareBatchAsync(50);
|
||||||
@@ -391,7 +391,7 @@ public partial class D7896ViewModel : ObservableObject
|
|||||||
double vhc = lambda / alpha; // kJ/(m³·K)
|
double vhc = lambda / alpha; // kJ/(m³·K)
|
||||||
double cp = vhc / SampleDensity; // J/(kg·K)
|
double cp = vhc / SampleDensity; // J/(kg·K)
|
||||||
|
|
||||||
Logger.Log($"测量 {attemptCount} 结果: λ={lambda:F6} W/(m·K), α={alpha:E6} m²/s, Cp={cp:F2} J/(kg·K)");
|
Logger.Log($"测量 {validCount} 结果: λ={lambda:F6} W/(m·K), α={alpha:E6} m²/s, Cp={cp:F2} J/(kg·K)");
|
||||||
|
|
||||||
// ---- 异常值检测 ----
|
// ---- 异常值检测 ----
|
||||||
bool isOutlier = false;
|
bool isOutlier = false;
|
||||||
@@ -444,7 +444,7 @@ public partial class D7896ViewModel : ObservableObject
|
|||||||
// 测量间隔(即使舍弃也等待,让样品恢复)
|
// 测量间隔(即使舍弃也等待,让样品恢复)
|
||||||
if (validCount < requiredCount && !_stopRequested && attemptCount < maxAttempts)
|
if (validCount < requiredCount && !_stopRequested && attemptCount < maxAttempts)
|
||||||
{
|
{
|
||||||
try { await Task.Delay(_config.TestParameters.IntervalSeconds * 100, _testCts.Token); } catch (OperationCanceledException) { break; }
|
try { await Task.Delay(_config.TestParameters.IntervalSeconds * 150, _testCts.Token); } catch (OperationCanceledException) { break; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -719,7 +719,7 @@ public partial class D7896ViewModel : ObservableObject
|
|||||||
{
|
{
|
||||||
if (TemperatureCurveModel == null)
|
if (TemperatureCurveModel == null)
|
||||||
{
|
{
|
||||||
TemperatureCurveModel = new PlotModel { Title = "温升与冷却曲线", Background = OxyColors.White };
|
TemperatureCurveModel = new PlotModel { };
|
||||||
TemperatureCurveModel.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom, Title = "时间 (s)" });
|
TemperatureCurveModel.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom, Title = "时间 (s)" });
|
||||||
TemperatureCurveModel.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Title = "温升 (℃)" });
|
TemperatureCurveModel.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Title = "温升 (℃)" });
|
||||||
}
|
}
|
||||||
@@ -764,7 +764,7 @@ public partial class D7896ViewModel : ObservableObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
TemperatureCurveModel.InvalidatePlot(true);
|
TemperatureCurveModel.InvalidatePlot(true);
|
||||||
CurveTitle = $"已完成 {CurrentMeasurementIndex} 次测量";
|
//CurveTitle = $"已完成 {CurrentMeasurementIndex} 次测量";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -784,7 +784,18 @@ public partial class D7896ViewModel : ObservableObject
|
|||||||
CurrentMeasurementIndex = 0;
|
CurrentMeasurementIndex = 0;
|
||||||
StatusMessage = "已重置";
|
StatusMessage = "已重置";
|
||||||
TestDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
TestDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
TemperatureCurveModel = null;
|
|
||||||
|
// 清空曲线:新建一个空白的 PlotModel 替换原来的
|
||||||
|
TemperatureCurveModel = new PlotModel
|
||||||
|
{
|
||||||
|
Title = "温升与冷却曲线",
|
||||||
|
Background = OxyColors.White
|
||||||
|
};
|
||||||
|
TemperatureCurveModel.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom, Title = "时间 (s)" });
|
||||||
|
TemperatureCurveModel.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Title = "温升 (℃)" });
|
||||||
|
TemperatureCurveModel.InvalidatePlot(true);
|
||||||
|
|
||||||
|
CurveTitle = "温升曲线";
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
@@ -1038,7 +1049,7 @@ public partial class D7896ViewModel : ObservableObject
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
float rawPressure = await _plcService.ReadFloatAsync(_config.PlcRegisterAddresses.Pressure);
|
float rawPressure = await _plcService.ReadFloatAsync(_config.PlcRegisterAddresses.Pressure);
|
||||||
ChamberPressure = rawPressure / 10.0;
|
ChamberPressure = rawPressure;
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,9 @@
|
|||||||
xmlns:oxy="http://oxyplot.org/wpf"
|
xmlns:oxy="http://oxyplot.org/wpf"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:ASTM_D7896_Tester.Views"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
|
xmlns:converters="clr-namespace:ASTM_D7896_Tester.Converters"
|
||||||
d:DesignHeight="768" d:DesignWidth="1024" Loaded="UserControl_Loaded">
|
d:DesignHeight="768" d:DesignWidth="1024" Loaded="UserControl_Loaded">
|
||||||
|
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
@@ -35,7 +37,7 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
<Setter Property="BorderBrush" Value="#ADADAD"/>
|
<Setter Property="BorderBrush" Value="#ADADAD"/>
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<Setter Property="Padding" Value="12,6"/>
|
<Setter Property="Padding" Value="8,4"/>
|
||||||
<Setter Property="Cursor" Value="Hand"/>
|
<Setter Property="Cursor" Value="Hand"/>
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
@@ -62,10 +64,10 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- 卡片阴影效果 -->
|
<!-- 卡片阴影 -->
|
||||||
<DropShadowEffect x:Key="CardShadow" BlurRadius="8" ShadowDepth="2" Opacity="0.15" Color="Gray"/>
|
<DropShadowEffect x:Key="CardShadow" BlurRadius="5" ShadowDepth="1" Opacity="0.1" Color="Gray"/>
|
||||||
|
|
||||||
<!-- 主按钮绿色渐变(修复:将资源定义在正确的位置) -->
|
<!-- 主按钮绿色渐变 -->
|
||||||
<LinearGradientBrush x:Key="PrimaryButtonBrush" EndPoint="0,1" StartPoint="0,0">
|
<LinearGradientBrush x:Key="PrimaryButtonBrush" EndPoint="0,1" StartPoint="0,0">
|
||||||
<GradientStop Color="#4CAF50" Offset="0"/>
|
<GradientStop Color="#4CAF50" Offset="0"/>
|
||||||
<GradientStop Color="#388E3C" Offset="1"/>
|
<GradientStop Color="#388E3C" Offset="1"/>
|
||||||
@@ -75,7 +77,7 @@
|
|||||||
<Style TargetType="DataGrid">
|
<Style TargetType="DataGrid">
|
||||||
<Setter Property="FontFamily" Value="Segoe UI"/>
|
<Setter Property="FontFamily" Value="Segoe UI"/>
|
||||||
<Setter Property="FontSize" Value="12"/>
|
<Setter Property="FontSize" Value="12"/>
|
||||||
<Setter Property="RowHeight" Value="28"/>
|
<Setter Property="RowHeight" Value="26"/>
|
||||||
<Setter Property="HeadersVisibility" Value="Column"/>
|
<Setter Property="HeadersVisibility" Value="Column"/>
|
||||||
<Setter Property="GridLinesVisibility" Value="Horizontal"/>
|
<Setter Property="GridLinesVisibility" Value="Horizontal"/>
|
||||||
<Setter Property="BorderBrush" Value="#E0E0E0"/>
|
<Setter Property="BorderBrush" Value="#E0E0E0"/>
|
||||||
@@ -95,245 +97,201 @@
|
|||||||
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
||||||
<Setter Property="Foreground" Value="#333333"/>
|
<Setter Property="Foreground" Value="#333333"/>
|
||||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||||
<Setter Property="Height" Value="32"/>
|
<Setter Property="Height" Value="28"/>
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- 逆布尔转换器(如果还没在App.xaml中定义,可以在这里定义) -->
|
<!-- 逆布尔转换器(请确保已在 App.xaml 或本资源中定义) -->
|
||||||
<!-- 注意:如果已经在App.xaml中定义了InverseBooleanConverter,请注释掉下面这一行 -->
|
<converters:InverseBooleanConverter x:Key="InverseBooleanConverter"/>
|
||||||
<!-- <converters:InverseBooleanConverter x:Key="InverseBooleanConverter"/> -->
|
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|
||||||
|
<!-- 去掉滚动条,使用 Grid 直接布局,紧凑边距 -->
|
||||||
|
<Grid Background="#F2F2F2" Margin="5">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<!-- 样品信息 -->
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<!-- 仪表盘 -->
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<!-- 体积/密度/加压 -->
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<!-- 曲线图(固定高度380) -->
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<!-- 数据表格(占满剩余高度) -->
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<!-- 平均值+按钮 -->
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Background="#F2F2F2">
|
<!-- 1. 样品信息 + 复选框 -->
|
||||||
<Grid Margin="10">
|
<Border Grid.Row="0" Background="White" CornerRadius="4" Padding="8" Margin="0,0,0,4" Effect="{StaticResource CardShadow}">
|
||||||
<Grid.RowDefinitions>
|
<StackPanel>
|
||||||
<RowDefinition Height="Auto"/>
|
<WrapPanel Margin="0,0,0,5">
|
||||||
<RowDefinition Height="Auto"/>
|
<TextBlock Text="样品ID:" VerticalAlignment="Center" FontWeight="SemiBold" Margin="0,0,8,0"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<TextBox Text="{Binding SampleId}" Width="120" Margin="0,0,15,0"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<TextBlock Text="测试温度(℃):" VerticalAlignment="Center" FontWeight="SemiBold" Margin="0,0,8,0"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<TextBox Text="{Binding TestTemperature}" Width="70" IsReadOnly="True" Background="#F0F8FF" Margin="0,0,15,0"/>
|
||||||
<RowDefinition Height="*"/>
|
<TextBlock Text="日期:" VerticalAlignment="Center" FontWeight="SemiBold" Margin="0,0,8,0"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<TextBox Text="{Binding TestDateTime}" Width="140" IsReadOnly="True" Background="#F0F8FF"/>
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!-- 1. 样品信息 + 复选框(合并的4项确认) -->
|
|
||||||
<Border Grid.Row="0" Background="White" CornerRadius="6" Padding="10" Margin="0,0,0,8" Effect="{StaticResource CardShadow}">
|
|
||||||
<StackPanel>
|
|
||||||
<WrapPanel Margin="0,0,0,8">
|
|
||||||
<TextBlock Text="样品ID:" VerticalAlignment="Center" FontWeight="SemiBold" Margin="0,0,8,0"/>
|
|
||||||
<TextBox Text="{Binding SampleId}" Width="120" Margin="0,0,20,0"/>
|
|
||||||
<TextBlock Text="测试温度(℃):" VerticalAlignment="Center" FontWeight="SemiBold" Margin="0,0,8,0"/>
|
|
||||||
<TextBox Text="{Binding TestTemperature}" Width="70" IsReadOnly="True" Background="#F0F8FF" Margin="0,0,20,0"/>
|
|
||||||
<TextBlock Text="日期:" VerticalAlignment="Center" FontWeight="SemiBold" Margin="0,0,8,0"/>
|
|
||||||
<TextBox Text="{Binding TestDateTime}" Width="140" IsReadOnly="True" Background="#F0F8FF"/>
|
|
||||||
</WrapPanel>
|
|
||||||
<WrapPanel>
|
|
||||||
<!-- 四个确认复选框,默认勾选 -->
|
|
||||||
<CheckBox IsChecked="{Binding IsCleanConfirmed}" Content="采样池清洁 (7.1)" Margin="0,0,15,0"/>
|
|
||||||
<CheckBox IsChecked="{Binding BubbleRemoved}" Content="气泡清除 (7.6)" Margin="0,0,15,0"/>
|
|
||||||
<CheckBox IsChecked="{Binding PlatinumCompatible}" Content="铂兼容性 (1.4)" Margin="0,0,15,0"/>
|
|
||||||
<CheckBox IsChecked="{Binding AmbientCalibrated}" Content="采样池温度校准 (8.1)" Margin="0,0,15,0"/>
|
|
||||||
<TextBlock Text="状态:" VerticalAlignment="Center" Margin="20,0,5,0"/>
|
|
||||||
<TextBox Text="{Binding StatusMessage}" Width="200" IsReadOnly="True" Background="#FFF7E6"/>
|
|
||||||
</WrapPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<!-- 2. 核心参数仪表盘(温度、电压、电阻、压力) -->
|
|
||||||
<Border Grid.Row="1" Background="White" CornerRadius="6" Padding="10" Margin="0,5" Effect="{StaticResource CardShadow}">
|
|
||||||
<WrapPanel>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 核心参数仪表盘 - 更新绑定属性 -->
|
|
||||||
<Border Background="#E8F0FE" Padding="6" CornerRadius="4" Margin="0,0,15,0">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text="🌡️ 样品温度:" FontWeight="SemiBold" Margin="0,0,5,0"/>
|
|
||||||
<TextBox Text="{Binding CurrentTestTemperature, StringFormat=F2}" Width="60" IsReadOnly="True"/>
|
|
||||||
<TextBlock Text="℃" Margin="3,0,0,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
<Border Background="#E8F0FE" Padding="6" CornerRadius="4" Margin="0,0,15,0">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text="⏲️ 压力:" FontWeight="SemiBold" Margin="0,0,5,0"/>
|
|
||||||
<TextBox Text="{Binding ChamberPressure, StringFormat=F2}" Width="60" IsReadOnly="True"/>
|
|
||||||
<TextBlock Text="kPa" Margin="3,0,0,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
<Border Background="#E8F0FE" Padding="6" CornerRadius="4" Margin="0,0,15,0">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text="⚡ 电阻电压:" FontWeight="SemiBold" Margin="0,0,5,0"/>
|
|
||||||
<TextBox Text="{Binding StandardResistorVoltage, StringFormat=F10}" Width="120" IsReadOnly="True"/>
|
|
||||||
<TextBlock Text="V" Margin="3,0,0,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
<Border Background="#E8F0FE" Padding="6" CornerRadius="4" Margin="0,0,15,0">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text="⚡ 铂丝电压:" FontWeight="SemiBold" Margin="0,0,5,0"/>
|
|
||||||
<TextBox Text="{Binding PlatinumVoltage, StringFormat=F4}" Width="70" IsReadOnly="True"/>
|
|
||||||
<TextBlock Text="V" Margin="3,0,0,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
<Border Background="#E8F0FE" Padding="6" CornerRadius="4" Margin="0,0,15,0">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text="🔌 铂丝电阻:" FontWeight="SemiBold" Margin="0,0,5,0"/>
|
|
||||||
<TextBox Text="{Binding PlatinumResistance, StringFormat=F4}" Width="70" IsReadOnly="True"/>
|
|
||||||
<TextBlock Text="Ω" Margin="3,0,0,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</Border>
|
|
||||||
|
|
||||||
<!-- 3. 样品体积 + 密度 + 加压设置 -->
|
|
||||||
<Border Grid.Row="2" Background="White" CornerRadius="6" Padding="10" Margin="0,5" Effect="{StaticResource CardShadow}">
|
|
||||||
<WrapPanel>
|
<WrapPanel>
|
||||||
<TextBlock Text="样品体积 (mL):" VerticalAlignment="Center" Width="100"/>
|
<CheckBox IsChecked="{Binding IsCleanConfirmed}" Content="采样池清洁 (7.1)" Margin="0,0,12,0"/>
|
||||||
<TextBox Text="{Binding SampleVolume}" Width="60" Margin="0,0,20,0"/>
|
<CheckBox IsChecked="{Binding BubbleRemoved}" Content="气泡清除 (7.6)" Margin="0,0,12,0"/>
|
||||||
|
<CheckBox IsChecked="{Binding PlatinumCompatible}" Content="铂兼容性 (1.4)" Margin="0,0,12,0"/>
|
||||||
<!-- 新增密度输入框 -->
|
<CheckBox IsChecked="{Binding AmbientCalibrated}" Content="采样池温度校准 (8.1)" Margin="0,0,15,0"/>
|
||||||
<TextBlock Text="密度 (kg/m³):" VerticalAlignment="Center" Width="100"/>
|
<TextBlock Text="状态:" VerticalAlignment="Center" Margin="10,0,5,0"/>
|
||||||
<TextBox Text="{Binding SampleDensity}" Width="80" Margin="0,0,20,0" ToolTip="输入样品密度,用于计算比热容"/>
|
<TextBox Text="{Binding StatusMessage}" Width="180" IsReadOnly="True" Background="#FFF7E6"/>
|
||||||
|
|
||||||
<CheckBox IsChecked="{Binding UsePressure}" Content="加压测试" VerticalAlignment="Center" Margin="0,0,15,0"/>
|
|
||||||
<TextBlock Text="压力 (kPa):" VerticalAlignment="Center" Margin="0,0,5,0"/>
|
|
||||||
<TextBox Text="{Binding PressureValue}" Width="60" IsEnabled="{Binding UsePressure}" Margin="0,0,20,0"/>
|
|
||||||
<TextBlock Text="(蒸气压>33.8kPa时需加压)" Foreground="Gray" VerticalAlignment="Center"/>
|
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</Border>
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<!-- 4. 温升曲线图(核心新增) -->
|
<!-- 2. 核心参数仪表盘 -->
|
||||||
<Border Grid.Row="3" Background="White" CornerRadius="6" Padding="8" Margin="0,5" Effect="{StaticResource CardShadow}">
|
<Border Grid.Row="1" Background="White" CornerRadius="4" Padding="6" Margin="0,4" Effect="{StaticResource CardShadow}">
|
||||||
<StackPanel>
|
<WrapPanel>
|
||||||
<TextBlock Text="{Binding CurveTitle}" FontWeight="Bold" FontSize="13" Margin="0,0,0,5" Foreground="#1E4F7A"/>
|
<Border Background="#E8F0FE" Padding="5" CornerRadius="4" Margin="0,0,10,0">
|
||||||
<oxy:PlotView Model="{Binding TemperatureCurveModel}" Height="350"/>
|
<StackPanel Orientation="Horizontal">
|
||||||
</StackPanel>
|
<TextBlock Text="🌡️ 样品温度:" FontWeight="SemiBold" Margin="0,0,5,0"/>
|
||||||
</Border>
|
<TextBox Text="{Binding CurrentTestTemperature, StringFormat=F2}" Width="55" IsReadOnly="True"/>
|
||||||
|
<TextBlock Text="℃" Margin="3,0,0,0"/>
|
||||||
<!-- 5. 测量数据表格(占用剩余高度) -->
|
|
||||||
<Border Grid.Row="4" Background="White" CornerRadius="6" Padding="8" Margin="0,5" Effect="{StaticResource CardShadow}">
|
|
||||||
<DataGrid ItemsSource="{Binding Measurements}" AutoGenerateColumns="False" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
||||||
CanUserAddRows="False" IsReadOnly="True"
|
|
||||||
HeadersVisibility="Column" GridLinesVisibility="Horizontal"
|
|
||||||
RowHeight="28" MinHeight="150">
|
|
||||||
|
|
||||||
<DataGrid.Columns>
|
|
||||||
<DataGridTextColumn Header="序号" Binding="{Binding Index}" Width="60">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
<DataGridTextColumn.HeaderStyle>
|
|
||||||
<Style TargetType="DataGridColumnHeader">
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.HeaderStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTextColumn Header="热导率 (W/m·K)" Binding="{Binding ThermalConductivity, StringFormat=F5}" Width="*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
<DataGridTextColumn.HeaderStyle>
|
|
||||||
<Style TargetType="DataGridColumnHeader">
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.HeaderStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTextColumn Header="热扩散率 (m²/s)" Binding="{Binding ThermalDiffusivity, StringFormat=F10}" Width="*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
<DataGridTextColumn.HeaderStyle>
|
|
||||||
<Style TargetType="DataGridColumnHeader">
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.HeaderStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTextColumn Header="体积热容 (kJ/m³·K)" Binding="{Binding VolumetricHeatCapacity, StringFormat=F2}" Width="*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
<DataGridTextColumn.HeaderStyle>
|
|
||||||
<Style TargetType="DataGridColumnHeader">
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.HeaderStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
</DataGrid.Columns>
|
|
||||||
</DataGrid>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<!-- 6. 平均值 + 操作按钮 -->
|
|
||||||
<Border Grid.Row="5" Background="#E8F0FE" CornerRadius="6" Padding="10" Margin="0,5" Effect="{StaticResource CardShadow}">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<StackPanel>
|
|
||||||
<WrapPanel Margin="0,0,0,8">
|
|
||||||
<TextBlock Text="平均热导率:" Width="100" FontWeight="SemiBold"/>
|
|
||||||
<TextBox Text="{Binding AverageThermalConductivity, StringFormat=F5}" Width="100" IsReadOnly="True"/>
|
|
||||||
<TextBlock Text="W/m·K" Margin="6,0,30,0"/>
|
|
||||||
<TextBlock Text="平均热扩散率:" Width="120" FontWeight="SemiBold"/>
|
|
||||||
<TextBox Text="{Binding AverageThermalDiffusivity, StringFormat=F10}" Width="100" IsReadOnly="True"/>
|
|
||||||
<TextBlock Text="m²/s" Margin="6,0,30,0"/>
|
|
||||||
<TextBlock Text="平均体积热容:" Width="100" FontWeight="SemiBold"/>
|
|
||||||
<TextBox Text="{Binding AverageVolumetricHeatCapacity, StringFormat=F2}" Width="100" IsReadOnly="True"/>
|
|
||||||
<TextBlock Text="kJ/m³·K" Margin="6,0,0,0"/>
|
|
||||||
</WrapPanel>
|
|
||||||
<!-- 新增:压力校准、电阻归零、进排气按钮 -->
|
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,8">
|
|
||||||
<Button Content="压力校准" Command="{Binding PressureCalibrationCommand}" Width="90" Margin="5"/>
|
|
||||||
<Button Content="电阻归零" Command="{Binding ResistanceZeroCommand}" Width="90" Margin="5"/>
|
|
||||||
<Button Content="进气阀" Command="{Binding InletValveControlCommand}" Width="80" Margin="5"/>
|
|
||||||
<Button Content="排气阀" Command="{Binding OutletValveControlCommand}" Width="80" Margin="5"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
</Border>
|
||||||
|
<Border Background="#E8F0FE" Padding="5" CornerRadius="4" Margin="0,0,10,0">
|
||||||
<Button Content="▶ 开始测试" Command="{Binding StartTestCommand}" Width="130" Height="36" Margin="8"
|
<StackPanel Orientation="Horizontal">
|
||||||
IsEnabled="{Binding IsTesting, Converter={StaticResource InverseBooleanConverter}}"
|
<TextBlock Text="⏲️ 压力:" FontWeight="SemiBold" Margin="0,0,5,0"/>
|
||||||
Background="{StaticResource PrimaryButtonBrush}"/>
|
<TextBox Text="{Binding ChamberPressure, StringFormat=F2}" Width="55" IsReadOnly="True"/>
|
||||||
|
<TextBlock Text="kPa" Margin="3,0,0,0"/>
|
||||||
<Button Content="■ 停止测试" Command="{Binding StopTestCommand}" Width="130" Height="36" Margin="8" Background="Orange"/>
|
|
||||||
|
|
||||||
|
|
||||||
<Button Content="⟳ 重置" Command="{Binding ResetCommand}" Width="100" Height="36" Margin="8"/>
|
|
||||||
<Button Content="📄 生成报告" Command="{Binding GenerateReportCommand}" Width="110" Height="36" Margin="8"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</Border>
|
||||||
</Border>
|
<Border Background="#E8F0FE" Padding="5" CornerRadius="4" Margin="0,0,10,0">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="⚡ 电阻电压:" FontWeight="SemiBold" Margin="0,0,5,0"/>
|
||||||
|
<TextBox Text="{Binding StandardResistorVoltage, StringFormat=F10}" Width="110" IsReadOnly="True"/>
|
||||||
|
<TextBlock Text="V" Margin="3,0,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border Background="#E8F0FE" Padding="5" CornerRadius="4" Margin="0,0,10,0">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="⚡ 铂丝电压:" FontWeight="SemiBold" Margin="0,0,5,0"/>
|
||||||
|
<TextBox Text="{Binding PlatinumVoltage, StringFormat=F4}" Width="65" IsReadOnly="True"/>
|
||||||
|
<TextBlock Text="V" Margin="3,0,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border Background="#E8F0FE" Padding="5" CornerRadius="4" Margin="0,0,10,0">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="🔌 铂丝电阻:" FontWeight="SemiBold" Margin="0,0,5,0"/>
|
||||||
|
<TextBox Text="{Binding PlatinumResistance, StringFormat=F4}" Width="65" IsReadOnly="True"/>
|
||||||
|
<TextBlock Text="Ω" Margin="3,0,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</WrapPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<!-- 7. 系统校准(可选,可收起到折叠区域,为节省空间放在底部) -->
|
<!-- 3. 样品体积 + 密度 + 加压设置 -->
|
||||||
<!--<Border Grid.Row="6" Background="White" CornerRadius="6" Padding="8" Margin="0,5" Effect="{StaticResource CardShadow}">
|
<Border Grid.Row="2" Background="White" CornerRadius="4" Padding="6" Margin="0,4" Effect="{StaticResource CardShadow}">
|
||||||
<StackPanel>
|
<WrapPanel>
|
||||||
<TextBlock Text="系统校准 (附录A3)" FontWeight="Bold" Margin="0,0,0,5"/>
|
<TextBlock Text="样品体积 (mL):" VerticalAlignment="Center" Width="95"/>
|
||||||
<WrapPanel>
|
<TextBox Text="{Binding SampleVolume}" Width="60" Margin="0,0,20,0"/>
|
||||||
<TextBlock Text="参考液:" VerticalAlignment="Center"/>
|
<TextBlock Text="密度 (kg/m³):" VerticalAlignment="Center" Width="95"/>
|
||||||
<ComboBox ItemsSource="{Binding ReferenceLiquids}" SelectedItem="{Binding SelectedReferenceLiquid}" Width="100" Margin="5,0"/>
|
<TextBox Text="{Binding SampleDensity}" Width="80" Margin="0,0,20,0" ToolTip="输入样品密度,用于计算比热容"/>
|
||||||
<TextBlock Text="参考热导率 (W/m·K):" VerticalAlignment="Center" Margin="10,0,5,0"/>
|
<CheckBox IsChecked="{Binding UsePressure}" Content="加压测试" VerticalAlignment="Center" Margin="0,0,12,0"/>
|
||||||
<TextBox Text="{Binding ReferenceConductivity}" Width="70" Margin="0,0,10,0"/>
|
<TextBlock Text="压力 (kPa):" VerticalAlignment="Center" Margin="0,0,5,0"/>
|
||||||
-->
|
<TextBox Text="{Binding PressureValue}" Width="60" IsEnabled="{Binding UsePressure}" Margin="0,0,15,0"/>
|
||||||
<!--<Button Content="开始校准" Command="{Binding PerformSystemCalibrationCommand}" Width="100"/>-->
|
<TextBlock Text="(蒸气压>33.8kPa时需加压)" Foreground="Gray" VerticalAlignment="Center"/>
|
||||||
<!--
|
</WrapPanel>
|
||||||
</WrapPanel>
|
</Border>
|
||||||
<TextBlock Text="{Binding CalibrationStatus}" FontSize="11" Foreground="Blue" Margin="0,5,0,0"/>
|
|
||||||
</StackPanel>
|
<!-- 4. 温升曲线图(加高,使用 * 行高) -->
|
||||||
</Border>-->
|
<Border Grid.Row="3" Background="White" CornerRadius="4" Padding="6" Margin="0,4" Effect="{StaticResource CardShadow}">
|
||||||
</Grid>
|
<StackPanel>
|
||||||
</ScrollViewer>
|
<TextBlock Text="{Binding CurveTitle}" FontWeight="Bold" FontSize="13" Margin="0,0,0,3" Foreground="#1E4F7A"/>
|
||||||
|
<!-- 将高度从350提升到380,并让控件随网格拉伸 -->
|
||||||
|
<oxy:PlotView Model="{Binding TemperatureCurveModel}" Height="220"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- 5. 测量数据表格(占据剩余高度,带滚动条,最小高度保证可见) -->
|
||||||
|
<Border Grid.Row="4" Background="White" CornerRadius="4" Padding="6" Margin="0,4" Effect="{StaticResource CardShadow}">
|
||||||
|
<DataGrid ItemsSource="{Binding Measurements}" AutoGenerateColumns="False"
|
||||||
|
CanUserAddRows="False" IsReadOnly="True"
|
||||||
|
HeadersVisibility="Column" GridLinesVisibility="Horizontal"
|
||||||
|
RowHeight="24"
|
||||||
|
Height="120"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="序号" Binding="{Binding Index}" Width="60">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="热导率 (W/m·K)" Binding="{Binding ThermalConductivity, StringFormat=F5}" Width="*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="热扩散率 (m²/s)" Binding="{Binding ThermalDiffusivity, StringFormat=F10}" Width="*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="体积热容 (kJ/m³·K)" Binding="{Binding VolumetricHeatCapacity, StringFormat=F2}" Width="*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 6. 平均值 + 按钮(水平排列并放大) -->
|
||||||
|
<Border Grid.Row="5" Background="#E8F0FE" CornerRadius="4" Padding="8" Margin="0,4,0,0" Effect="{StaticResource CardShadow}">
|
||||||
|
<StackPanel>
|
||||||
|
<!-- 平均值显示行(保持不变) -->
|
||||||
|
<WrapPanel Margin="0,0,0,8">
|
||||||
|
<TextBlock Text="平均热导率:" Width="90" FontWeight="SemiBold"/>
|
||||||
|
<TextBox Text="{Binding AverageThermalConductivity, StringFormat=F5}" Width="90" IsReadOnly="True"/>
|
||||||
|
<TextBlock Text="W/m·K" Margin="5,0,25,0"/>
|
||||||
|
<TextBlock Text="平均热扩散率:" Width="110" FontWeight="SemiBold"/>
|
||||||
|
<TextBox Text="{Binding AverageThermalDiffusivity, StringFormat=F10}" Width="100" IsReadOnly="True"/>
|
||||||
|
<TextBlock Text="m²/s" Margin="5,0,25,0"/>
|
||||||
|
<TextBlock Text="平均体积热容:" Width="100" FontWeight="SemiBold"/>
|
||||||
|
<TextBox Text="{Binding AverageVolumetricHeatCapacity, StringFormat=F2}" Width="90" IsReadOnly="True"/>
|
||||||
|
<TextBlock Text="kJ/m³·K" Margin="5,0,0,0"/>
|
||||||
|
</WrapPanel>
|
||||||
|
|
||||||
|
<!-- 按钮区域:一排,放大按钮 -->
|
||||||
|
<WrapPanel HorizontalAlignment="Center" Margin="0,4">
|
||||||
|
<Button Content="压力校准" Command="{Binding PressureCalibrationCommand}"
|
||||||
|
Width="100" Height="36" Margin="5" FontSize="13"/>
|
||||||
|
<Button Content="电阻归零" Command="{Binding ResistanceZeroCommand}"
|
||||||
|
Width="100" Height="36" Margin="5" FontSize="13"/>
|
||||||
|
<Button Content="进气阀" Command="{Binding InletValveControlCommand}"
|
||||||
|
Width="90" Height="36" Margin="5" FontSize="13"/>
|
||||||
|
<Button Content="排气阀" Command="{Binding OutletValveControlCommand}"
|
||||||
|
Width="90" Height="36" Margin="5" FontSize="13"/>
|
||||||
|
<Button Content="▶ 开始测试" Command="{Binding StartTestCommand}"
|
||||||
|
Width="130" Height="40" Margin="5" FontSize="14" FontWeight="Bold"
|
||||||
|
IsEnabled="{Binding IsTesting, Converter={StaticResource InverseBooleanConverter}}"
|
||||||
|
Background="{StaticResource PrimaryButtonBrush}"/>
|
||||||
|
<Button Content="■ 停止测试" Command="{Binding StopTestCommand}"
|
||||||
|
Width="130" Height="40" Margin="5" FontSize="14" FontWeight="Bold"
|
||||||
|
Background="Orange"/>
|
||||||
|
<Button Content="⟳ 重置" Command="{Binding ResetCommand}"
|
||||||
|
Width="100" Height="36" Margin="5" FontSize="13"/>
|
||||||
|
<Button Content="📄 生成报告" Command="{Binding GenerateReportCommand}"
|
||||||
|
Width="110" Height="36" Margin="5" FontSize="13"/>
|
||||||
|
</WrapPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<GroupBox Header="串口设置" Grid.Row="0" Margin="5">
|
<GroupBox Header="串口设置" Grid.Row="0" Margin="5">
|
||||||
<StackPanel Orientation="Horizontal" Margin="5">
|
<StackPanel Orientation="Horizontal" Margin="5">
|
||||||
<Label Content="端口:"/>
|
<Label Content="端口:"/>
|
||||||
<ComboBox x:Name="cmbPort" Width="80" IsEditable="True"/>
|
<ComboBox x:Name="cmbPort" Width="80" IsEditable="True" Text="COM2"/>
|
||||||
<Label Content="波特率:" Margin="10,0,0,0"/>
|
<Label Content="波特率:" Margin="10,0,0,0"/>
|
||||||
<ComboBox x:Name="cmbBaudrate" Width="80" SelectedIndex="1">
|
<ComboBox x:Name="cmbBaudrate" Width="80" SelectedIndex="1">
|
||||||
<ComboBoxItem>9600</ComboBoxItem>
|
<ComboBoxItem>9600</ComboBoxItem>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<RadioButton x:Name="rb50Hz" Content="50 Hz" GroupName="Freq" IsChecked="True" Margin="5,0,15,0"/>
|
<RadioButton x:Name="rb50Hz" Content="50 Hz" GroupName="Freq" IsChecked="True" Margin="5,0,15,0"/>
|
||||||
<RadioButton x:Name="rb60Hz" Content="60 Hz" GroupName="Freq"/>
|
<RadioButton x:Name="rb60Hz" Content="60 Hz" GroupName="Freq"/>
|
||||||
<Label Content="设定电流 (A):" Margin="20,0,0,0"/>
|
<Label Content="设定电流 (A):" Margin="20,0,0,0"/>
|
||||||
<TextBox x:Name="txtSetCurrent" Text="0.650" Width="80" TextAlignment="Center"/>
|
<TextBox x:Name="txtSetCurrent" Text="1" Width="80" TextAlignment="Center"/>
|
||||||
<Label Content="A"/>
|
<Label Content="A"/>
|
||||||
<Button x:Name="btnSet" Content="直接设定" Click="BtnSet_Click" Width="80" Margin="10,0,0,0"/>
|
<Button x:Name="btnSet" Content="直接设定" Click="BtnSet_Click" Width="80" Margin="10,0,0,0"/>
|
||||||
<Button x:Name="btnStop" Content="禁止输出" Click="BtnStop_Click" Width="80" Margin="5,0,0,0"/>
|
<Button x:Name="btnStop" Content="禁止输出" Click="BtnStop_Click" Width="80" Margin="5,0,0,0"/>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ namespace ConstantCurrentControl
|
|||||||
_readTimer = new DispatcherTimer();
|
_readTimer = new DispatcherTimer();
|
||||||
_readTimer.Interval = TimeSpan.FromMilliseconds(50);
|
_readTimer.Interval = TimeSpan.FromMilliseconds(50);
|
||||||
_readTimer.Tick += ReadTimer_Tick;
|
_readTimer.Tick += ReadTimer_Tick;
|
||||||
|
cmbPort.Text = "COM2";
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 串口连接
|
#region 串口连接
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
//"PlatinumWireDiameter": 0.000032,
|
//"PlatinumWireDiameter": 0.000032,
|
||||||
//"PlatinumWireLength": 0.056, //铂丝长度(单位:米)
|
//"PlatinumWireLength": 0.056, //铂丝长度(单位:米)
|
||||||
//"PlatinumWireDiameter": 0.00006,
|
//"PlatinumWireDiameter": 0.00006,
|
||||||
"PlatinumWireLength": 0.04, //铂丝长度(单位:米)
|
"PlatinumWireLength": 0.035, //铂丝长度(单位:米)
|
||||||
"PlatinumWireDiameter": 0.00006,
|
"PlatinumWireDiameter": 0.00010,
|
||||||
"ReportOutputPath": "Reports\\",
|
"ReportOutputPath": "Reports\\",
|
||||||
"DefaultSampleVolume": 40.0,
|
"DefaultSampleVolume": 40.0,
|
||||||
"DefaultPressure": 0.0,
|
"DefaultPressure": 0.0,
|
||||||
|
|||||||
BIN
瞬态热线法说明书.docx
BIN
瞬态热线法说明书.docx
Binary file not shown.
Reference in New Issue
Block a user