Files
NoBuilding/建材不燃性试验炉/BalanceChartWindow.xaml
2026-02-02 16:18:52 +08:00

96 lines
4.2 KiB
XML

<Window x:Class="jiancaiburanxing.BalanceChartWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:oxy="http://oxyplot.org/wpf"
Title="温度平衡曲线图" Height="750" Width="1100"
WindowStartupLocation="CenterScreen"
Loaded="Window_Loaded"
Closing="Window_Closing">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 标题栏 -->
<Border Grid.Row="0" Background="#2196F3" Padding="15">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="炉内温度平衡曲线"
Foreground="White"
FontSize="20"
FontWeight="Bold"
VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button x:Name="btnClearData"
Content="清空数据"
Width="100"
Height="35"
Margin="5,0"
Background="#FF5722"
Foreground="White"
FontWeight="Bold"
Click="btnClearData_Click"/>
<Button x:Name="btnClose"
Content="关闭"
Width="100"
Height="35"
Margin="5,0"
Background="#607D8B"
Foreground="White"
FontWeight="Bold"
Click="btnClose_Click"/>
</StackPanel>
</Grid>
</Border>
<!-- 主图表区域 -->
<Grid Grid.Row="1" Margin="10">
<oxy:PlotView x:Name="TemperaturePlot"
Background="White"
BorderBrush="#E0E0E0"
BorderThickness="1"/>
</Grid>
<!-- 统计信息栏 -->
<Border Grid.Row="2"
Background="#F5F5F5"
BorderBrush="#E0E0E0"
BorderThickness="0,1,0,0"
Padding="10">
<WrapPanel>
<!-- 运行时间 -->
<TextBlock Margin="10,0" Text="运行时间:" VerticalAlignment="Center"/>
<TextBlock x:Name="txtElapsedTime" Text="0秒" FontWeight="Bold" MinWidth="50" VerticalAlignment="Center"/>
<!-- 当前温度 -->
<TextBlock Margin="20,0,10,0" Text="当前温度:" VerticalAlignment="Center"/>
<TextBlock x:Name="txtCurrentTemp" Text="0°C" FontWeight="Bold" Foreground="#2196F3" MinWidth="50" VerticalAlignment="Center"/>
<!-- 与目标差值 -->
<TextBlock Margin="20,0,10,0" Text="差值:" VerticalAlignment="Center"/>
<TextBlock x:Name="txtTempDifference" Text="0°C" FontWeight="Bold" MinWidth="50" VerticalAlignment="Center"/>
<!-- 最高温度 -->
<TextBlock Margin="20,0,10,0" Text="最高:" VerticalAlignment="Center"/>
<TextBlock x:Name="txtMaxTemp" Text="0°C" FontWeight="Bold" Foreground="#F44336" MinWidth="50" VerticalAlignment="Center"/>
<!-- 最低温度 -->
<TextBlock Margin="20,0,10,0" Text="最低:" VerticalAlignment="Center"/>
<TextBlock x:Name="txtMinTemp" Text="0°C" FontWeight="Bold" Foreground="#4CAF50" MinWidth="50" VerticalAlignment="Center"/>
<!-- 数据点数 -->
<TextBlock Margin="20,0,10,0" Text="点数:" VerticalAlignment="Center"/>
<TextBlock x:Name="txtDataPoints" Text="0" FontWeight="Bold" MinWidth="30" VerticalAlignment="Center"/>
</WrapPanel>
</Border>
</Grid>
</Window>