Files
NoBuilding/建材不燃性试验炉/MainWindow.xaml
2026-02-03 16:12:03 +08:00

1255 lines
68 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<Window x:Class="建材不燃性试验炉.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:建材不燃性试验炉"
mc:Ignorable="d"
Title="建材不燃性试验炉控制系统"
Height="800"
Width="1280"
WindowStartupLocation="CenterScreen"
Loaded="ThemedWindow_Loaded" Closing="Window_Closing">
<!-- 原有资源部分保持不变 -->
<Window.Resources>
<!-- 基础样式 -->
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="BorderBrush" Value="#CCCCCC"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style x:Key="IconButtonStyle" TargetType="Button">
<Setter Property="Width" Value="28"/>
<Setter Property="Height" Value="28"/>
<Setter Property="Background" Value="#3498DB"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="#2980B9"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#2980B9"/>
<Setter Property="BorderBrush" Value="#1F6393"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#1F6393"/>
<Setter Property="BorderBrush" Value="#154360"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#BDC3C7"/>
<Setter Property="BorderBrush" Value="#95A5A6"/>
<Setter Property="Foreground" Value="#7F8C8D"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Button">
<Setter Property="Background" Value="#3498DB"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Opacity" Value="0.8"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Opacity" Value="0.6"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CardStyle" TargetType="Border">
<Setter Property="CornerRadius" Value="6"/>
<Setter Property="Padding" Value="15"/>
<Setter Property="Margin" Value="0,0,0,10"/>
<Setter Property="Background" Value="White"/>
</Style>
<!-- 带占位文本的文本框样式 -->
<Style x:Key="PlaceholderTextBoxStyle" TargetType="TextBox">
<Setter Property="Height" Value="35"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="10,0"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="#DDDDDD"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Grid>
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"/>
<!-- 占位文本 -->
<TextBlock x:Name="placeholderText"
Text="{TemplateBinding Tag}"
Foreground="#999999"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Margin="10,0,0,0"
IsHitTestVisible="False">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Visibility" Value="Collapsed"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}" Value="">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<!-- 实际文本 -->
<ScrollViewer x:Name="PART_ContentHost"
VerticalAlignment="Center"
Margin="10,0"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<!-- 简单背景 -->
<Grid.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#F5F7FA" Offset="0"/>
<GradientStop Color="#E4E7EB" Offset="1"/>
</LinearGradientBrush>
</Grid.Background>
<!-- 顶部标题栏 -->
<Border Height="60" Background="#2C3E50" VerticalAlignment="Top">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- 左侧Logo和标题 -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Column="0">
<TextBlock Text="🔥" FontSize="24" Margin="0,0,10,0"/>
<TextBlock Text="建材不燃性试验炉控制系统"
FontSize="22"
FontWeight="Bold"
Foreground="White"/>
<!-- 系数设置按钮 -->
<Button x:Name="btnCoefficient"
Width="80"
Height="35"
Background="#2C3E50"
BorderThickness="0"
Foreground="White"
Margin="10,0,0,0"
Cursor="Hand"
PreviewMouseLeftButtonDown="btnCoefficient_PreviewMouseLeftButtonDown"
PreviewMouseLeftButtonUp="btnCoefficient_PreviewMouseLeftButtonUp">
<Button.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</Button.Resources>
</Button>
</StackPanel>
<!-- 最右侧:所有功能按钮和状态显示 -->
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Grid.Column="1">
<!-- 设备状态显示 -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,20,0">
<Border Width="10" Height="10" CornerRadius="5"
Background="Gray" Margin="0,0,8,0"
VerticalAlignment="Center"
x:Name="statusIndicator"/>
<TextBlock x:Name="txtDeviceStatus"
Text="设备未启动"
Foreground="White"
VerticalAlignment="Center"
FontSize="14"/>
</StackPanel>
<!-- 启动设备按钮 -->
<Button x:Name="btnStartDevice"
Content="启动设备"
Width="80"
Height="35"
Background="#27AE60"
BorderThickness="0"
Foreground="White"
Margin="10,0,20,0"
Cursor="Hand"
Click="btnStartDevice_Click">
<Button.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</Button.Resources>
</Button>
</StackPanel>
</Grid>
</Border>
<!-- 主内容区域 -->
<Grid Margin="20,80,20,20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<!-- 左侧控制面板 -->
<Border Grid.Column="0"
Margin="0,0,8,0"
Background="White"
Padding="20">
<ScrollViewer VerticalScrollBarVisibility="Auto" MaxHeight="700">
<StackPanel>
<TextBlock Text="试验参数设置"
FontSize="18"
FontWeight="Bold"
Foreground="#2C3E50"
Margin="0,0,0,20"/>
<!-- 原有试样基础信息、称重、温度校准、试验参数、燃烧状态部分保持不变 -->
<!-- 1. 试样基础信息 -->
<StackPanel Margin="0,0,0,15">
<TextBlock Text="试样基础信息:"
FontSize="14"
FontWeight="SemiBold"
Foreground="#333333"
Margin="0,0,0,5"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.9*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1.1*"/>
</Grid.ColumnDefinitions>
<!-- 试验编号 -->
<TextBox x:Name="txtTestNo"
Grid.Column="0"
Style="{StaticResource PlaceholderTextBoxStyle}"
Tag="请输入试验编号"
Margin="0,0,5,0"/>
<!-- 试样名称/型号 -->
<TextBox x:Name="txtSampleName"
Grid.Column="1"
Style="{StaticResource PlaceholderTextBoxStyle}"
Tag="试样名称/型号"
Margin="0,0,5,0" />
<!-- 试样规格 -->
<TextBox x:Name="txtSampleSpec"
Grid.Column="2"
Style="{StaticResource PlaceholderTextBoxStyle}"
Tag="规格(mm)"/>
</Grid>
</StackPanel>
<!-- 2. 试样称重 -->
<StackPanel Margin="0,0,0,15">
<TextBlock Text="试样重量 (g):"
FontSize="14"
FontWeight="SemiBold"
Foreground="#333333"
Margin="0,0,0,5"/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="txtInitialWeight"
Grid.Column="0"
Style="{StaticResource PlaceholderTextBoxStyle}"
Tag="请输入试验前重量(g)"
Text="" Margin="0,0,5,0"
TextChanged="txtInitialWeight_TextChanged"/>
</Grid>
<Grid Grid.Row="1" Margin="0,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="txtFinalWeight"
Grid.Column="1"
Style="{StaticResource PlaceholderTextBoxStyle}"
Tag="请输入试验后重量(g)"
Text=""
TextChanged="txtFinalWeight_TextChanged"/>
</Grid>
</Grid>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
<TextBlock x:Name="txtWeightLoss"
FontSize="12"
Foreground="#E74C3C"
FontWeight="SemiBold"
Margin="0,0,10,0"/>
<TextBlock x:Name="txtWeightStatus"
FontSize="12"
Foreground="#666666"/>
</StackPanel>
</StackPanel>
<!-- 4. 试验参数优化 -->
<StackPanel>
<TextBlock Text="试验控制参数:"
FontSize="14"
FontWeight="SemiBold"
Foreground="#333333"
Margin="0,0,0,5"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 试验温度标签 -->
<TextBlock Grid.Column="0"
Text="试验温度(℃):"
FontSize="13"
VerticalAlignment="Center"
Margin="0,0,5,0"/>
<!-- 试验温度显示 -->
<TextBlock Grid.Column="1"
x:Name="txtTestTemp"
Text="750"
FontSize="14"
FontWeight="SemiBold"
Foreground="#2C3E50"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Padding="5,2"/>
<!-- 温度波动标签 -->
<TextBlock Grid.Column="2"
Text="温度波动(℃):"
FontSize="13"
VerticalAlignment="Center"
Margin="20,0,5,0"/>
<!-- 温度波动显示 -->
<TextBlock Grid.Column="3"
x:Name="txtTempFluctuation"
Text="5"
FontSize="14"
FontWeight="SemiBold"
Foreground="#2C3E50"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Padding="5,2"/>
</Grid>
</Grid>
</StackPanel>
<!-- 新增:温度平衡设置区域 -->
<StackPanel Margin="0,15,0,20">
<TextBlock Text="温度平衡判断参数:"
FontSize="14"
FontWeight="SemiBold"
Foreground="#333333"
Margin="0,0,0,5"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<!-- 平衡时间显示 -->
<TextBlock Text="平衡时间(s):"
FontSize="13"
Foreground="#666666"
VerticalAlignment="Center"
Margin="0,0,5,5"/>
<TextBlock x:Name="txtBalanceTime"
Width="40"
Text="600"
FontSize="14"
FontWeight="SemiBold"
Foreground="#2C3E50"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Background="#F8F9FA"
Padding="5,3"
Margin="0,0,10,5"/>
<!-- 最大温差显示 -->
<TextBlock Text="最大温差(℃):"
FontSize="13"
Foreground="#666666"
VerticalAlignment="Center"
Margin="0,0,5,5"/>
<TextBlock x:Name="txtMaxTempDiff"
Width="40"
Text="10"
FontSize="14"
FontWeight="SemiBold"
Foreground="#2C3E50"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Background="#F8F9FA"
Padding="5,3"
Margin="0,0,10,5"/>
<!-- 漂移显示 -->
<TextBlock Text="漂移(℃):"
FontSize="13"
Foreground="#666666"
VerticalAlignment="Center"
Margin="0,0,5,5"/>
<TextBlock x:Name="txtTempRange"
Width="40"
Text="2"
FontSize="14"
FontWeight="SemiBold"
Foreground="#2C3E50"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Background="#F8F9FA"
Padding="5,3"
Margin="0,0,0,5"/>
</StackPanel>
<TextBlock Text="平衡条件: 温度波动正常至少10分钟最大温差10°C 且 温度漂移2°C"
FontSize="12"
Foreground="#666666"
Margin="0,3,0,0"/>
<TextBlock x:Name="txtBalanceStatus"
Text="温度平衡状态: 未开始判断"
FontSize="12"
Foreground="#95A5A6"
Margin="0,8,0,0"/>
</StackPanel>
<!-- 调整为垂直StackPanel放置按钮组 -->
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="4,2,6,2">
<Button x:Name="btnStartBalanceCheck"
Content="开始平衡判断"
Width="100"
Height="35"
FontSize="13"
Background="#2980B9"
Margin="5,0,0,4"
Click="btnStartBalanceCheck_Click"/>
<!-- 第二行:两个按钮水平排列 -->
<Grid Margin="0,2,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="4"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 左侧:停止平衡判断按钮 -->
<Button x:Name="btnStopBalanceCheck"
Grid.Column="2"
Content="停止平衡判断"
Width="100"
Height="35"
FontSize="13"
Background="#E74C3C"
Click="btnStopBalanceCheck_Click"/>
<!-- 右侧:平衡实时曲线图按钮 -->
<!--<Button x:Name="btnBalanceChart"
Grid.Column="2"
Content="平衡实时曲线图"
Width="100"
Height="35"
FontSize="13"
Background="#27AE60"
Click="btnBalanceChart_Click"/>-->
</Grid>
</StackPanel>
</Grid>
</StackPanel>
<!-- 5. 新增试样燃烧状态记录 -->
<StackPanel Margin="0,0,0,20">
<TextBlock Text="试样燃烧状态记录:"
FontSize="14"
FontWeight="SemiBold"
Foreground="#333333"
Margin="0,10,0,5"/>
<StackPanel Orientation="Horizontal">
<CheckBox x:Name="chkHasFlame" Content="有火焰" FontSize="13" Margin="0,10,20,0" Unchecked="chkHasFlame_Unchecked" Checked="chkHasFlame_Checked" />
<TextBox x:Name="txtCombustionNote"
Width="200"
Style="{StaticResource PlaceholderTextBoxStyle}"
Tag="火焰持续时间备注(s)"
Height="35" TextChanged="txtCombustionNote_TextChanged" />
<CheckBox x:Name="chkHasSmoke" Content="有冒烟" FontSize="13" Margin="30,10,20,0" Unchecked="chkHasSmoke_Unchecked" Checked="chkHasSmoke_Checked" />
</StackPanel>
</StackPanel>
<!-- 试验控制按钮区域 -->
<!-- 试验控制按钮区域 -->
<StackPanel Margin="0,0,0,0" HorizontalAlignment="Center">
<!-- 新增的按钮组 -->
<!-- 新增的按钮组调整高度为45 -->
<StackPanel Orientation="Horizontal" Margin="0,0,0,15">
<Button x:Name="btnTestFan"
Content="测试腔体风机"
Width="130"
Height="45"
FontSize="14"
FontWeight="Bold"
Background="#3498DB"
Foreground="White"
BorderBrush="#2980B9"
BorderThickness="0"
Padding="10,0"
Click="btnTestFan_Click">
<Button.Effect>
<DropShadowEffect ShadowDepth="2" Opacity="0.3" BlurRadius="4"/>
</Button.Effect>
</Button>
<Button x:Name="btnMoveUp"
Content="↑ 上升"
Width="120"
Height="45"
FontSize="14"
FontWeight="Bold"
Background="#8E44AD"
Foreground="White"
BorderBrush="#7D3C98"
BorderThickness="0"
Padding="10,0"
Margin="10,0,0,0"
Click="btnMoveUp_Click">
<Button.Effect>
<DropShadowEffect ShadowDepth="2" Opacity="0.3" BlurRadius="4"/>
</Button.Effect>
</Button>
<Button x:Name="btnMoveDown"
Content="↓ 下降"
Width="120"
Height="45"
FontSize="14"
FontWeight="Bold"
Background="#8E44AD"
Foreground="White"
BorderBrush="#7D3C98"
BorderThickness="0"
Padding="10,0"
Margin="10,0,0,0"
Click="btnMoveDown_Click">
<Button.Effect>
<DropShadowEffect ShadowDepth="2" Opacity="0.3" BlurRadius="4"/>
</Button.Effect>
</Button>
</StackPanel>
<!-- 原有的按钮组 -->
<StackPanel Orientation="Horizontal" Margin="0,0,0,15">
<Button x:Name="btnStartTest"
Content="▶ 开始测试"
Width="130"
Height="45"
FontSize="14"
FontWeight="Bold"
Background="#27AE60"
Foreground="White"
BorderBrush="#219653"
BorderThickness="0"
Padding="10,0"
Click="btnStartTest_Click">
<Button.Effect>
<DropShadowEffect ShadowDepth="2" Opacity="0.3" BlurRadius="4"/>
</Button.Effect>
</Button>
<Button x:Name="btnStop"
Content="⏹ 停止测试"
Width="120"
Height="45"
FontSize="14"
FontWeight="Bold"
Background="#E74C3C"
Foreground="White"
BorderBrush="#C0392B"
BorderThickness="0"
Padding="10,0"
Margin="10,0,0,0"
Click="btnStop_Click">
<Button.Effect>
<DropShadowEffect ShadowDepth="2" Opacity="0.3" BlurRadius="4"/>
</Button.Effect>
</Button>
<!--<Button x:Name="btnShowChart"
Content=" 测试温度曲线图"
Width="120"
Height="45"
FontSize="14"
FontWeight="SemiBold"
Background="#F39C12"
Foreground="White"
BorderBrush="#E67E22"
BorderThickness="0"
Margin="10,0,0,0"
HorizontalAlignment="Center"
Click="btnShowChart_Click">
<Button.Effect>
<DropShadowEffect ShadowDepth="2" Opacity="0.3" BlurRadius="4"/>
</Button.Effect>
</Button>-->
</StackPanel>
</StackPanel>
</StackPanel>
</ScrollViewer>
</Border>
<!-- 右侧状态显示 -->
<Border Grid.Column="1"
Margin="5,0,0,0"
Background="White"
Padding="20">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- 标题和系统状态 -->
<Grid Grid.Row="0" Margin="0,0,0,20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- 标题 -->
<TextBlock Text="系统状态监控"
FontSize="18"
FontWeight="Bold"
Foreground="#2C3E50"
Grid.Column="0"/>
<!-- 系统状态显示 -->
<StackPanel Grid.Column="1"
Orientation="Horizontal"
VerticalAlignment="Center"
Margin="15,0,0,0">
<Ellipse x:Name="statusIndicator2"
Width="10"
Height="10"
Fill="#F39C12"
Margin="0,0,8,0"
VerticalAlignment="Center"/>
<TextBlock x:Name="txtSystemStatus"
Text="试验空闲中"
FontSize="14"
FontWeight="SemiBold"
Foreground="#2C3E50"/>
</StackPanel>
<!-- 操作按钮 -->
<StackPanel Orientation="Horizontal" Grid.Column="2" Margin="15,0,0,0">
<Button x:Name="btnClearData"
Content="清空数据"
Width="80"
Height="30"
FontSize="12"
Background="#95A5A6"
Click="btnClearData_Click" />
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="3" Margin="10,0,0,0">
<Button Content="数据报表"
Width="80"
Height="30"
FontSize="12"
Background="#95A5A6" Click="Button_Click"/>
</StackPanel>
</Grid>
<!-- 状态卡片区域 -->
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
<StackPanel>
<!-- 2. 优化称重状态卡片 -->
<Border Background="#E8F6F3" Style="{StaticResource CardStyle}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1">
<TextBlock Text="试样重量"
FontSize="13"
Foreground="#666666"/>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="txtCurrentWeight"
Text="前:0.0g | 后:0.0g"
FontSize="18"
FontWeight="Bold"
Foreground="#2C3E50"
Margin="0,0,10,0"/>
<TextBlock x:Name="txtWeightLossDisplay"
Text="损失:0.0%"
FontSize="16"
FontWeight="Bold"
Foreground="#E74C3C"/>
</StackPanel>
</StackPanel>
<Border Grid.Column="2"
x:Name="weightStatusBorder"
Background="#BDC3C7"
CornerRadius="4"
Padding="8,4">
<TextBlock x:Name="txtWeightState"
Text="未称重"
Foreground="White"
FontSize="12"
FontWeight="SemiBold"/>
</Border>
</Grid>
</Border>
<!-- 4. 新增多温度监控卡片 -->
<!-- ========== 新增:温度平衡状态卡片 ========== -->
<Border Background="#E0F7FA" Style="{StaticResource CardStyle}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1">
<TextBlock Text="温度平衡状态"
FontSize="13"
Foreground="#666666"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="计时:"
FontSize="16"
Foreground="#2C3E50"
Margin="0,0,5,0"/>
<TextBlock x:Name="txtBalanceTimeElapsed"
Text="0秒"
FontSize="18"
FontWeight="Bold"
Foreground="#2C3E50"
Margin="0,0,15,0"/>
</StackPanel>
<TextBlock x:Name="txtBalanceCondition"
Text="平衡条件: 炉内温度波动正常至少10分钟 且 最大温差10°C 且 温度漂移2°C"
FontSize="12"
Foreground="#666666"
Margin="0,5,0,0"/>
<Border x:Name="balanceStatusBorder"
Background="#BDC3C7"
CornerRadius="4"
Padding="8,4"
Margin="0,5,0,0">
<TextBlock x:Name="txtBalanceResult"
Text="未判断"
Foreground="White"
FontSize="12"
FontWeight="SemiBold"/>
</Border>
</StackPanel>
</Grid>
</Border>
<Border Background="#F0F7FF" Style="{StaticResource CardStyle}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1">
<TextBlock Text="温度监控"
FontSize="13"
Foreground="#666666"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="炉内温度:"
FontSize="16"
Foreground="#2C3E50"
Margin="0,0,5,0"/>
<TextBlock x:Name="txtFurnaceWallTemp"
Text="25°C"
FontSize="18"
FontWeight="Bold"
Foreground="#2C3E50"
Margin="0,0,15,0"/>
<TextBlock Text="试样中心温度:"
FontSize="16"
Foreground="#2C3E50"
Margin="0,0,5,0"/>
<TextBlock x:Name="txtSampleCenterTemp"
Text="25°C"
FontSize="18"
FontWeight="Bold"
Foreground="#2C3E50"
Margin="0,0,15,0"/>
<TextBlock Text="试样表面温度:"
FontSize="16"
Foreground="#2C3E50"
Margin="0,0,5,0"/>
<TextBlock x:Name="txtSampleSurfaceTemp"
Text="25°C"
FontSize="18"
FontWeight="Bold"
Foreground="#2C3E50"/>
</StackPanel>
<StackPanel Orientation="Horizontal" >
<Border Background="#27AE60"
CornerRadius="4"
Padding="8,4" Margin="0,5,0,5">
<TextBlock x:Name="txtFurnaceTempStatus"
Text="炉内温度波动"
Foreground="White"
FontSize="12"
FontWeight="SemiBold"/>
</Border>
<Border Background="#27AE60"
CornerRadius="4"
Padding="8,4" Margin="10,5,0,5">
<TextBlock x:Name="txtSampleInternalTempStatus"
Text="式样中心温度波动"
Foreground="White"
FontSize="12"
FontWeight="SemiBold" />
</Border>
<Border Background="#27AE60"
CornerRadius="4"
Padding="8,4" Margin="10,5,0,5">
<TextBlock x:Name="txtSampleSurfaceTempStatus"
Text="式样表面温度波动"
Foreground="White"
FontSize="12"
FontWeight="SemiBold"/>
</Border>
</StackPanel>
</StackPanel>
</Grid>
</Border>
<!-- 新增:最终平衡判断状态卡片 -->
<Border Background="#FFECB3" Style="{StaticResource CardStyle}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- 中间:状态信息 -->
<StackPanel Grid.Column="1">
<TextBlock Text="三通道温度平衡判断"
FontSize="13"
Foreground="#666666"
FontWeight="SemiBold"/>
<!-- 第一行:状态和计时 -->
<StackPanel Orientation="Horizontal" Margin="0,2,0,0">
<TextBlock x:Name="txtFinalBalanceState"
Text="实验未开始"
FontSize="16"
FontWeight="Bold"
Foreground="#2C3E50"
Margin="0,0,15,0"/>
<TextBlock Text="实验时间:"
FontSize="14"
Foreground="#666666"
Margin="0,0,5,0"/>
<TextBlock x:Name="txtFinalBalanceTimer"
Text="00:00 / 60:00"
FontSize="14"
FontWeight="SemiBold"
Foreground="#E74C3C"/>
</StackPanel>
<!-- 第二行:温度数据和窗口信息 -->
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
<TextBlock Text="当前窗口:"
FontSize="12"
Foreground="#666666"/>
<TextBlock x:Name="txtCurrentWindow"
Text="0-10min"
FontSize="12"
FontWeight="SemiBold"
Foreground="#2C3E50"
Margin="0,0,15,0"/>
<TextBlock Text="计算次数:"
FontSize="12"
Foreground="#666666"/>
<TextBlock x:Name="txtCalculationCount"
Text="第1次"
FontSize="12"
FontWeight="SemiBold"
Foreground="#E74C3C"/>
</StackPanel>
<!-- 第三行:三路温度显示 -->
<StackPanel Margin="0,3,0,0">
<StackPanel Orientation="Horizontal">
<TextBlock Text="炉内:"
FontSize="12"
Foreground="#666666"/>
<TextBlock x:Name="txtFurnaceTemp"
Text="0.0°C"
FontSize="12"
FontWeight="SemiBold"
Foreground="#E74C3C"
Margin="0,0,15,0"/>
<TextBlock Text="样品内:"
FontSize="12"
Foreground="#666666"/>
<TextBlock x:Name="txtSampleInnerTemp"
Text="0.0°C"
FontSize="12"
FontWeight="SemiBold"
Foreground="#3498DB"
Margin="0,0,15,0"/>
<TextBlock Text="样品表面:"
FontSize="12"
Foreground="#666666"/>
<TextBlock x:Name="txtSampleOuterTemp"
Text="0.0°C"
FontSize="12"
FontWeight="SemiBold"
Foreground="#9B59B6"/>
</StackPanel>
<!-- 三路温度斜率 -->
<StackPanel Orientation="Horizontal" Margin="0,2,0,0">
<Border Background="#FFE5E5" CornerRadius="2" Padding="3,1" Margin="0,0,4,0">
<TextBlock x:Name="txtFurnaceSlope"
Text="炉内: 0.00℃/10min"
FontSize="10"
FontWeight="SemiBold"
Foreground="#E74C3C"/>
</Border>
<Border Background="#E5F3FF" CornerRadius="2" Padding="3,1" Margin="4,0,4,0">
<TextBlock x:Name="txtSampleInnerSlope"
Text="样品内: 0.00℃/10min"
FontSize="10"
FontWeight="SemiBold"
Foreground="#3498DB"/>
</Border>
<Border Background="#F0E5FF" CornerRadius="2" Padding="3,1" Margin="4,0,0,0">
<TextBlock x:Name="txtSampleOuterSlope"
Text="样品表面: 0.00℃/10min"
FontSize="10"
FontWeight="SemiBold"
Foreground="#9B59B6"/>
</Border>
</StackPanel>
</StackPanel>
<!-- 第四行:平衡状态和平衡条件 -->
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
<TextBlock Text="平衡状态:"
FontSize="12"
Foreground="#666666"/>
<TextBlock x:Name="txtBalanceStatus2"
Text="未平衡"
FontSize="12"
FontWeight="SemiBold"
Foreground="#E74C3C"
Margin="0,0,15,0"/>
<TextBlock Text="平衡条件:"
FontSize="12"
Foreground="#666666"/>
<TextBlock x:Name="txtBalanceCondition2"
Text="三通道2℃/10min"
FontSize="12"
FontWeight="SemiBold"
Foreground="#27AE60"/>
</StackPanel>
<!-- 第五行:平衡时间和窗口统计 -->
<StackPanel Orientation="Horizontal" Margin="0,3,0,0">
<TextBlock Text="最终平衡时间:"
FontSize="12"
Foreground="#666666"/>
<TextBlock x:Name="txtFinalBalanceTime"
Text="未达到"
FontSize="12"
FontWeight="SemiBold"
Foreground="#27AE60"
Margin="0,0,15,0"/>
<TextBlock Text="平衡窗口:"
FontSize="12"
Foreground="#666666"/>
<TextBlock x:Name="txtBalancedWindowsCount"
Text="0/0"
FontSize="12"
FontWeight="SemiBold"
Foreground="#2C3E50"/>
</StackPanel>
<!-- 第六行:进度条 -->
<StackPanel Margin="0,8,0,0">
<Grid Margin="0,0,0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- 进度文本 -->
<TextBlock x:Name="txtExperimentProgress"
Text="实验进度: 0/60分钟 (0%)"
FontSize="10"
Foreground="#666666"/>
<!-- 数据统计 -->
<StackPanel Grid.Column="1" Orientation="Horizontal">
<TextBlock Text="数据点:"
FontSize="10"
Foreground="#666666"/>
<TextBlock x:Name="txtDataPointCount"
Text="0"
FontSize="10"
FontWeight="SemiBold"
Foreground="#2C3E50"
Margin="0,0,10,0"/>
</StackPanel>
</Grid>
<!-- 进度条 -->
<ProgressBar x:Name="progressExperiment"
Height="8"
Minimum="0"
Maximum="60"
Value="0"
Foreground="#3498DB"
Background="#ECF0F1"/>
</StackPanel>
</StackPanel>
<!-- 右侧:状态指示和控制按钮 -->
<StackPanel Grid.Column="2"
Margin="10,0,0,0"
VerticalAlignment="Center">
<!-- 状态指示 -->
<Border x:Name="finalBalanceStatusBorder"
Background="#BDC3C7"
CornerRadius="4"
Padding="8,4"
Margin="0,0,0,8">
<StackPanel>
<TextBlock x:Name="txtFinalBalanceStatusText"
Text="等待开始"
Foreground="White"
FontSize="12"
FontWeight="SemiBold"/>
<TextBlock x:Name="txtExperimentPhase"
Text="前30分钟"
Foreground="White"
FontSize="10"
Margin="0,2,0,0"
HorizontalAlignment="Center"/>
</StackPanel>
</Border>
<!-- 控制按钮 -->
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
Margin="0,5,0,0">
<!-- 暂停按钮 -->
<Button x:Name="btnPauseExperiment"
Style="{StaticResource IconButtonStyle}"
ToolTip="暂停实验"
Click="btnPauseExperiment_Click"
Margin="2,0,2,0"
IsEnabled="False">
<Viewbox Width="16" Height="16">
<Canvas Width="24" Height="24">
<Rectangle Width="4" Height="14" Fill="White" Canvas.Left="6" Canvas.Top="5"/>
<Rectangle Width="4" Height="14" Fill="White" Canvas.Left="14" Canvas.Top="5"/>
</Canvas>
</Viewbox>
</Button>
<!-- 重置按钮 -->
<Button x:Name="btnResetExperiment"
Style="{StaticResource IconButtonStyle}"
ToolTip="重置实验"
Click="btnResetExperiment_Click"
Margin="2,0,0,0">
<Viewbox Width="16" Height="16">
<Canvas Width="24" Height="24">
<Path Data="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
Fill="White"/>
</Canvas>
</Viewbox>
</Button>
</StackPanel>
</StackPanel>
</Grid>
</Border>
<!-- 5. 合并时间状态、燃烧状态和试验进度 -->
<Border Background="#FFF8E1" Style="{StaticResource CardStyle}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 第一行:时间和燃烧状态 -->
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 燃烧状态信息 -->
<StackPanel Grid.Column="3">
<TextBlock Text="燃烧状态"
FontSize="13"
Foreground="#666666"/>
<!-- 无火焰行 -->
<StackPanel Orientation="Horizontal"
VerticalAlignment="Center"
Margin="0,4,0,2">
<TextBlock Name="texfire"
Text="无火焰"
FontSize="18"
FontWeight="Bold"
Foreground="#2C3E50"/>
<!-- 火焰持续时间提示 -->
<TextBlock Name="txtbfiretime"
FontSize="12"
Foreground="#7F8C8D"
Margin="8,0,0,0"
VerticalAlignment="Center" />
</StackPanel>
<!-- 无冒烟行 -->
<TextBlock Name="texsmoking"
Text="无冒烟"
FontSize="18"
FontWeight="Bold"
Foreground="#2C3E50"
Margin="0,2,0,4"/>
</StackPanel>
</Grid>
</Grid>
</Border>
</StackPanel>
</ScrollViewer>
</Grid>
</Border>
</Grid>
<!-- 底部状态栏 -->
<Border Height="30"
Background="#2C3E50"
VerticalAlignment="Bottom">
<Grid>
<TextBlock x:Name="txtStatusBar"
Text="系统就绪"
Foreground="#95A5A6"
VerticalAlignment="Center"
HorizontalAlignment="Left"
FontSize="12"
Margin="20,0,0,0"/>
<TextBlock Text="© 建材不燃性试验炉控制系统 | 符合GB/T 5464-2010标准"
Foreground="White"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="12"/>
</Grid>
</Border>
</Grid>
</Window>