201 lines
9.8 KiB
XML
201 lines
9.8 KiB
XML
<Window
|
|
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:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" x:Class="jiancaiburanxing.TestReportWindow"
|
|
mc:Ignorable="d"
|
|
Title="建材不燃性试验数据报表"
|
|
Height="800"
|
|
Width="1280"
|
|
WindowStartupLocation="CenterScreen"
|
|
ResizeMode="CanMinimize">
|
|
|
|
<Window.Resources>
|
|
<!-- 表格列标题样式 -->
|
|
<Style x:Key="DataGridHeaderStyle" TargetType="{x:Type DataGridColumnHeader}">
|
|
<Setter Property="Background" Value="#2C3E50"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="FontSize" Value="14"/>
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="Padding" Value="10,8"/>
|
|
</Style>
|
|
|
|
<!-- 按钮样式 -->
|
|
<Style x:Key="OperationButtonStyle" TargetType="{x:Type Button}">
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="FontSize" Value="15"/>
|
|
<Setter Property="FontWeight" Value="Medium"/>
|
|
<Setter Property="Padding" Value="15,8"/>
|
|
<Setter Property="Margin" Value="10,0"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Border.CornerRadius" Value="4"/>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Grid Background="#F5F7FA">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 1. 标题区域 -->
|
|
<Border Grid.Row="0"
|
|
Background="White"
|
|
Padding="20"
|
|
Margin="0,0,0,10"
|
|
BorderBrush="#DDD"
|
|
BorderThickness="0,0,0,1">
|
|
<TextBlock Text="建材不燃性试验数据报表"
|
|
FontSize="26"
|
|
FontWeight="Bold"
|
|
Foreground="#2C3E50"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
</Border>
|
|
|
|
<!-- 2. 数据表格区域 -->
|
|
<Border Grid.Row="1"
|
|
Margin="20,0,20,20"
|
|
Background="White"
|
|
CornerRadius="4"
|
|
BorderBrush="#DDD"
|
|
BorderThickness="1">
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
|
<DataGrid x:Name="dgTestReport"
|
|
AutoGenerateColumns="False"
|
|
CanUserAddRows="False"
|
|
CanUserDeleteRows="False"
|
|
IsReadOnly="True"
|
|
SelectionMode="Single"
|
|
RowHeight="38"
|
|
ColumnHeaderHeight="42"
|
|
FontSize="14"
|
|
Background="White"
|
|
BorderThickness="0"
|
|
GridLinesVisibility="None"
|
|
AlternatingRowBackground="#F8F9FA"
|
|
ColumnHeaderStyle="{StaticResource DataGridHeaderStyle}">
|
|
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="试样编号"
|
|
Binding="{Binding SampleCode}"
|
|
Width="100"/>
|
|
<DataGridTextColumn Header="试样名称"
|
|
Binding="{Binding SampleName}"
|
|
Width="100"/>
|
|
<DataGridTextColumn Header="试样规格"
|
|
Binding="{Binding SampleSpec}"
|
|
Width="100"/>
|
|
<DataGridTextColumn Header="炉内初始温度(℃)"
|
|
Binding="{Binding MaxTemp, StringFormat=\{0:0.0\}}"
|
|
Width="150"/>
|
|
<DataGridTextColumn Header="炉内最高温度(℃)"
|
|
Binding="{Binding MaxTemp, StringFormat=\{0:0.0\}}"
|
|
Width="150"/>
|
|
<DataGridTextColumn Header="炉内最终温度(℃)"
|
|
Binding="{Binding FinalTemp, StringFormat=\{0:0.0\}}"
|
|
Width="150"/>
|
|
<DataGridTextColumn Header="温升(℃)"
|
|
Binding="{Binding TempRise, StringFormat=\{0:0.0\}}"
|
|
Width="100"/>
|
|
<DataGridTextColumn Header="试样中心最高温度(℃)"
|
|
Binding="{Binding MaxTemp, StringFormat=\{0:0.0\}}"
|
|
Width="160"/>
|
|
<DataGridTextColumn Header="试样中心最终温度(℃)"
|
|
Binding="{Binding FinalTemp, StringFormat=\{0:0.0\}}"
|
|
Width="160"/>
|
|
<DataGridTextColumn Header="试样表面最高温度(℃)"
|
|
Binding="{Binding MaxTemp, StringFormat=\{0:0.0\}}"
|
|
Width="160"/>
|
|
<DataGridTextColumn Header="试样表面最终温度(℃)"
|
|
Binding="{Binding FinalTemp, StringFormat=\{0:0.0\}}"
|
|
Width="160"/>
|
|
<DataGridTextColumn Header="试样初始质量(g)"
|
|
Binding="{Binding InitialWeight, StringFormat=\{0:0.00\}}"
|
|
Width="150"/>
|
|
<DataGridTextColumn Header="试样结束质量(g)"
|
|
Binding="{Binding FinalWeight, StringFormat=\{0:0.00\}}"
|
|
Width="150"/>
|
|
<DataGridTextColumn Header="质量损失(%)"
|
|
Binding="{Binding LossPercent, StringFormat=\{0:0.00\}%}"
|
|
Width="120"/>
|
|
<DataGridTextColumn Header="火焰持续时间(s)"
|
|
Binding="{Binding FlameDuration}"
|
|
Width="140"/>
|
|
</DataGrid.Columns>
|
|
|
|
<DataGrid.CellStyle>
|
|
<Style TargetType="{x:Type DataGridCell}">
|
|
<Setter Property="BorderBrush" Value="#EEE"/>
|
|
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
|
<Setter Property="Padding" Value="8,0"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
|
</Style>
|
|
</DataGrid.CellStyle>
|
|
|
|
<dxmvvm:Interaction.Behaviors>
|
|
<dxmvvm:EnumItemsSourceBehavior/>
|
|
<dxmvvm:UIObjectService/>
|
|
</dxmvvm:Interaction.Behaviors>
|
|
|
|
</DataGrid>
|
|
</ScrollViewer>
|
|
</Border>
|
|
|
|
<!-- 3. 按钮区域 -->
|
|
<Border Grid.Row="2"
|
|
Background="White"
|
|
Padding="20,15"
|
|
BorderBrush="#DDD"
|
|
BorderThickness="0,1,0,0">
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
|
|
|
<Button x:Name="btnClearData"
|
|
Content="清除数据"
|
|
Width="130"
|
|
Height="40"
|
|
Style="{StaticResource OperationButtonStyle}"
|
|
Background="#E74C3C"
|
|
BorderBrush="#E74C3C">
|
|
<Button.ToolTip>
|
|
<TextBlock Text="清空表格所有试验数据" FontSize="14"/>
|
|
</Button.ToolTip>
|
|
</Button>
|
|
|
|
<Button x:Name="btnExportReport"
|
|
Content="导出报表"
|
|
Width="130"
|
|
Height="40"
|
|
Style="{StaticResource OperationButtonStyle}"
|
|
Background="#27AE60"
|
|
BorderBrush="#27AE60">
|
|
<Button.ToolTip>
|
|
<TextBlock Text="将试验数据导出为Excel/Word报表" FontSize="14"/>
|
|
</Button.ToolTip>
|
|
</Button>
|
|
|
|
<Button x:Name="btnReturn"
|
|
Content="返回"
|
|
Width="130"
|
|
Height="40"
|
|
Style="{StaticResource OperationButtonStyle}"
|
|
Background="#3498DB"
|
|
BorderBrush="#3498DB" Click="btnReturn_Click">
|
|
<Button.ToolTip>
|
|
<TextBlock Text="返回试验主界面" FontSize="14"/>
|
|
</Button.ToolTip>
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
</Window>
|