178 lines
7.4 KiB
Plaintext
178 lines
7.4 KiB
Plaintext
|
|
<dx:ThemedWindow
|
||
|
|
x:Class="jiancaiburanxing.TemperatureChartWindow"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||
|
|
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
|
||
|
|
Title="温度曲线图"
|
||
|
|
Height="600"
|
||
|
|
Width="900"
|
||
|
|
WindowStartupLocation="CenterOwner"
|
||
|
|
Background="White">
|
||
|
|
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto"/>
|
||
|
|
<RowDefinition Height="*"/>
|
||
|
|
<RowDefinition Height="Auto"/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<!-- 标题栏 -->
|
||
|
|
<Border Grid.Row="0"
|
||
|
|
Background="#2C3E50"
|
||
|
|
Padding="15"
|
||
|
|
Margin="0,0,0,5">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="Auto"/>
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
|
||
|
|
<StackPanel Grid.Column="0">
|
||
|
|
<TextBlock Text="温度-时间曲线图"
|
||
|
|
FontSize="18"
|
||
|
|
FontWeight="Bold"
|
||
|
|
Foreground="White"/>
|
||
|
|
<TextBlock Text="显示炉内温度随时间变化趋势"
|
||
|
|
FontSize="12"
|
||
|
|
Foreground="#BDC3C7"/>
|
||
|
|
</StackPanel>
|
||
|
|
|
||
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal" >
|
||
|
|
<dx:SimpleButton x:Name="btnGenerateData"
|
||
|
|
Content="生成模拟数据"
|
||
|
|
Width="120"
|
||
|
|
Height="30"
|
||
|
|
FontSize="12"
|
||
|
|
Background="#3498DB"
|
||
|
|
Foreground="White"
|
||
|
|
CornerRadius="4"
|
||
|
|
Click="btnGenerateData_Click"/>
|
||
|
|
|
||
|
|
<dx:SimpleButton x:Name="btnClose"
|
||
|
|
Content="关闭"
|
||
|
|
Width="80"
|
||
|
|
Height="30"
|
||
|
|
FontSize="12"
|
||
|
|
Background="#E74C3C"
|
||
|
|
Foreground="White"
|
||
|
|
CornerRadius="4"
|
||
|
|
Click="btnClose_Click"/>
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<!-- 图表区域 -->
|
||
|
|
<Border Grid.Row="1"
|
||
|
|
Margin="10"
|
||
|
|
BorderBrush="#DDDDDD"
|
||
|
|
BorderThickness="1"
|
||
|
|
Background="White">
|
||
|
|
|
||
|
|
<dxc:ChartControl x:Name="temperatureChart">
|
||
|
|
<!-- 图表标题 -->
|
||
|
|
<dxc:ChartControl.Titles>
|
||
|
|
<dxc:Title Content="炉内温度变化曲线"
|
||
|
|
FontSize="14"
|
||
|
|
FontWeight="Bold"/>
|
||
|
|
</dxc:ChartControl.Titles>
|
||
|
|
|
||
|
|
<!-- 图例 -->
|
||
|
|
<dxc:ChartControl.Legend>
|
||
|
|
<dxc:Legend HorizontalAlignment="Right"
|
||
|
|
VerticalAlignment="Top"
|
||
|
|
Visibility="Visible"/>
|
||
|
|
</dxc:ChartControl.Legend>
|
||
|
|
|
||
|
|
<!-- XY图表 -->
|
||
|
|
<dxc:XYDiagram2D>
|
||
|
|
|
||
|
|
<!-- X轴 - 简化配置 -->
|
||
|
|
<dxc:XYDiagram2D.AxisX>
|
||
|
|
<dxc:AxisX2D>
|
||
|
|
<dxc:AxisX2D.Title>
|
||
|
|
<dxc:AxisTitle Content="时间 (分钟)"/>
|
||
|
|
</dxc:AxisX2D.Title>
|
||
|
|
<dxc:AxisX2D.WholeRange>
|
||
|
|
<dxc:Range MinValue="0" MaxValue="60"/>
|
||
|
|
</dxc:AxisX2D.WholeRange>
|
||
|
|
|
||
|
|
</dxc:AxisX2D>
|
||
|
|
</dxc:XYDiagram2D.AxisX>
|
||
|
|
|
||
|
|
<!-- Y轴 - 简化配置 -->
|
||
|
|
<dxc:XYDiagram2D.AxisY>
|
||
|
|
<dxc:AxisY2D>
|
||
|
|
<dxc:AxisY2D.Title>
|
||
|
|
<dxc:AxisTitle Content="温度 (°C)"/>
|
||
|
|
</dxc:AxisY2D.Title>
|
||
|
|
<dxc:AxisY2D.WholeRange>
|
||
|
|
<dxc:Range MinValue="0" MaxValue="800"/>
|
||
|
|
</dxc:AxisY2D.WholeRange>
|
||
|
|
|
||
|
|
</dxc:AxisY2D>
|
||
|
|
</dxc:XYDiagram2D.AxisY>
|
||
|
|
|
||
|
|
<!-- 温度曲线 -->
|
||
|
|
<dxc:LineSeries2D x:Name="temperatureSeries"
|
||
|
|
DisplayName="炉内温度"
|
||
|
|
MarkerVisible="True"
|
||
|
|
MarkerSize="8"
|
||
|
|
CrosshairLabelPattern="{}{S}: {V:F1}°C">
|
||
|
|
<dxc:LineSeries2D.LineStyle>
|
||
|
|
<dxc:LineStyle Thickness="2"/>
|
||
|
|
</dxc:LineSeries2D.LineStyle>
|
||
|
|
</dxc:LineSeries2D>
|
||
|
|
|
||
|
|
<!-- 目标温度线 -->
|
||
|
|
<dxc:LineSeries2D x:Name="targetSeries"
|
||
|
|
DisplayName="目标温度 (750°C)"
|
||
|
|
MarkerVisible="False"
|
||
|
|
CrosshairEnabled="False">
|
||
|
|
<dxc:LineSeries2D.LineStyle>
|
||
|
|
<dxc:LineStyle Thickness="2">
|
||
|
|
<dxc:LineStyle.DashStyle>
|
||
|
|
<DashStyle Dashes="4,2"/>
|
||
|
|
</dxc:LineStyle.DashStyle>
|
||
|
|
</dxc:LineStyle>
|
||
|
|
</dxc:LineSeries2D.LineStyle>
|
||
|
|
</dxc:LineSeries2D>
|
||
|
|
|
||
|
|
</dxc:XYDiagram2D>
|
||
|
|
</dxc:ChartControl>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<!-- 统计信息 -->
|
||
|
|
<Border Grid.Row="2"
|
||
|
|
Background="#F5F7FA"
|
||
|
|
Padding="15"
|
||
|
|
Margin="10,5,10,10"
|
||
|
|
CornerRadius="4"
|
||
|
|
BorderBrush="#DDDDDD"
|
||
|
|
BorderThickness="1">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
|
||
|
|
<StackPanel Grid.Column="0">
|
||
|
|
<TextBlock Text="最高温度:" FontSize="12" Foreground="#666666"/>
|
||
|
|
<TextBlock x:Name="txtMaxTemp" Text="0°C" FontSize="14" FontWeight="Bold" Foreground="#2C3E50"/>
|
||
|
|
</StackPanel>
|
||
|
|
|
||
|
|
<StackPanel Grid.Column="1">
|
||
|
|
<TextBlock Text="平均温度:" FontSize="12" Foreground="#666666"/>
|
||
|
|
<TextBlock x:Name="txtAvgTemp" Text="0°C" FontSize="14" FontWeight="Bold" Foreground="#2C3E50"/>
|
||
|
|
</StackPanel>
|
||
|
|
|
||
|
|
<StackPanel Grid.Column="2">
|
||
|
|
<TextBlock Text="数据点数:" FontSize="12" Foreground="#666666"/>
|
||
|
|
<TextBlock x:Name="txtDataPoints" Text="0" FontSize="14" FontWeight="Bold" Foreground="#2C3E50"/>
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
</dx:ThemedWindow>
|