Files
Sleep-Multi-functionality/ReportWindow5.xaml
2026-05-09 14:32:08 +08:00

166 lines
10 KiB
XML
Raw Permalink 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="ShanghaiEnvironmentalTechnology.ReportWindow5"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="{DynamicResource testReport}" Height="768" Width="1024" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen">
<Window.Resources>
<Style x:Key="MyButtonStyle" TargetType="Button">
<Setter Property="Background" Value="#4A90E2"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Margin" Value="10"/>
<Setter Property="Padding" Value="10,5"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Width" Value="120"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" CornerRadius="20">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#3A7BBE"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#2A5E9A"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="18"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Margin" Value="5"/>
</Style>
<Style TargetType="DataGrid" x:Key="CustomDataGridStyle">
<Setter Property="Background" Value="White"/>
<Setter Property="BorderBrush" Value="#4A90E2"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="RowHeight" Value="35"/>
<Setter Property="AlternatingRowBackground" Value="#F0F8FF"/>
<Setter Property="GridLinesVisibility" Value="All"/>
<Setter Property="ColumnHeaderStyle">
<Setter.Value>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="#4A90E2"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</Setter.Value>
</Setter>
<Setter Property="RowStyle">
<Setter.Value>
<Style TargetType="DataGridRow">
<Setter Property="Background" Value="White"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#E0E0E0"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#4A90E2"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<StackPanel Margin="10">
<TextBlock FontSize="20" FontWeight="Bold" Text="{DynamicResource testReport}" HorizontalAlignment="Center" Margin="0,0,0,20"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,20">
<TextBlock Text="{DynamicResource testReport1}" VerticalAlignment="Center" Foreground="Black"/>
<DatePicker x:Name="StartDatePicker" Margin="5,0" Height="30" />
<TextBlock Text="{DynamicResource testReport1}" VerticalAlignment="Center" Foreground="Black"/>
<DatePicker x:Name="EndDatePicker" Margin="5,0" Height="30"/>
<Button Content="{DynamicResource testReport3}" Click="QueryButton_Click" Margin="5,0" Style="{StaticResource MyButtonStyle}"/>
<Button Content="{DynamicResource testReport4}" Click="SelectAllButton_Click" Margin="5,0" Style="{StaticResource MyButtonStyle}"/>
<Button Content="{DynamicResource testReport5}" Click="BatchDeleteButton_Click" Margin="5,0" Style="{StaticResource MyButtonStyle}"/>
<Button Content="{DynamicResource testReport6}" Click="Export_Click" Margin="5,0" Style="{StaticResource MyButtonStyle}"/>
</StackPanel>
<DataGrid x:Name="DataGridReport" AutoGenerateColumns="False" Height="400" Margin="0,0,0,20" Style="{StaticResource CustomDataGridStyle}">
<DataGrid.Columns>
<DataGridCheckBoxColumn Header="{DynamicResource testReport7}" Binding="{Binding IsSelected}" Width="70">
</DataGridCheckBoxColumn>
<DataGridTextColumn Header="{DynamicResource testReport8}" Binding="{Binding Id}" Width="*"/>
<!--<DataGridTextColumn Header="二氧化碳浓度(%" Binding="{Binding Flow}" Width="*"/>
<DataGridTextColumn Header="压力pa" Binding="{Binding Pressure}" Width="*"/>-->
<DataGridTextColumn Header="{DynamicResource FiveReport}" Binding="{Binding BeginCO2}" Width="*"/>
<DataGridTextColumn Header="{DynamicResource FiveReport1}" Binding="{Binding EndCO2}" Width="*"/>
<DataGridTextColumn Header="{DynamicResource FiveReport2}" Binding="{Binding CO2Added}" Width="*"/>
<DataGridTextColumn Header="{DynamicResource testReport11}" Binding="{Binding RecordTime}" Width="*"/>
<DataGridTemplateColumn Header="{DynamicResource testRepor12}" Width="100">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Content="{DynamicResource FlowReport2}"
Click="DeleteButton_Click"
Background="#FF5252"
Foreground="White"
Padding="5"
Margin="2"
FontSize="14"
Height="30"
Tag="{Binding Id}">
<Button.Style>
<Style TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" CornerRadius="5">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#D32F2F"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#B71C1C"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button Content="{DynamicResource Deformation}" Click="HomePage_Click" HorizontalAlignment="Left" Style="{StaticResource MyButtonStyle}"/>
<Button Content="{DynamicResource testReport13}" Click="PreviousPage_Click" Margin="5" Style="{StaticResource MyButtonStyle}"/>
<TextBlock x:Name="PageInfo" VerticalAlignment="Center" Margin="5"/>
<Button Content="{DynamicResource testReport14}" Click="NextPage_Click" Margin="5" Style="{StaticResource MyButtonStyle}"/>
</StackPanel>
</StackPanel>
</Grid>
</Window>