Files
Sleep-Multi-functionality/ReportWindow4.xaml

163 lines
9.7 KiB
Plaintext
Raw Normal View History

2026-05-04 14:46:58 +08:00
<Window x:Class="ShanghaiEnvironmentalTechnology.ReportWindow4"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2026-05-11 19:06:26 +08:00
Title="{DynamicResource FxNReport}" WindowState="Maximized" Height="768" Width="1024" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen">
2026-05-04 14:46:58 +08:00
<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">
2026-05-09 14:32:08 +08:00
<TextBlock FontSize="20" FontWeight="Bold" Text="{DynamicResource FxNReport}" HorizontalAlignment="Center" Margin="0,0,0,20"/>
2026-05-04 14:46:58 +08:00
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,20">
2026-05-09 14:32:08 +08:00
<TextBlock Text="{DynamicResource testReport1}" VerticalAlignment="Center" Foreground="Black"/>
2026-05-04 14:46:58 +08:00
<DatePicker x:Name="StartDatePicker" Margin="5,0" Height="30" />
2026-05-09 14:32:08 +08:00
<TextBlock Text="{DynamicResource testReport111}" VerticalAlignment="Center" Foreground="Black"/>
2026-05-04 14:46:58 +08:00
<DatePicker x:Name="EndDatePicker" Margin="5,0" Height="30"/>
2026-05-09 14:32:08 +08:00
<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}"/>
2026-05-04 14:46:58 +08:00
</StackPanel>
<DataGrid x:Name="DataGridReport" AutoGenerateColumns="False" Height="400" Margin="0,0,0,20" Style="{StaticResource CustomDataGridStyle}">
<DataGrid.Columns>
2026-05-09 14:32:08 +08:00
<DataGridCheckBoxColumn Header="{DynamicResource testReport7}" Binding="{Binding IsSelected}" Width="70">
2026-05-04 14:46:58 +08:00
</DataGridCheckBoxColumn>
2026-05-09 14:32:08 +08:00
<DataGridTextColumn Header="{DynamicResource testReport8}" Binding="{Binding Id}" Width="*"/>
<DataGridTextColumn Header="{DynamicResource FxNReport1}" Binding="{Binding Flow}" Width="*"/>
<DataGridTextColumn Header="{DynamicResource FxNReport2}" Binding="{Binding Pressure}" Width="*"/>
<DataGridTextColumn Header="{DynamicResource testReport11}" Binding="{Binding RecordTime}" Width="*"/>
<DataGridTemplateColumn Header="{DynamicResource testReport12}" Width="100">
2026-05-04 14:46:58 +08:00
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
2026-05-09 14:58:03 +08:00
<Button Content="{DynamicResource FlowReport2}"
2026-05-04 14:46:58 +08:00
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">
2026-05-09 14:32:08 +08:00
<Button Content="{DynamicResource Deformation}" Click="HomePage_Click" HorizontalAlignment="Left" Style="{StaticResource MyButtonStyle}"/>
<Button Content="{DynamicResource testReport13}" Click="PreviousPage_Click" Margin="5" Style="{StaticResource MyButtonStyle}"/>
2026-05-04 14:46:58 +08:00
<TextBlock x:Name="PageInfo" VerticalAlignment="Center" Margin="5"/>
2026-05-09 14:32:08 +08:00
<Button Content="{DynamicResource testReport14}" Click="NextPage_Click" Margin="5" Style="{StaticResource MyButtonStyle}"/>
2026-05-04 14:46:58 +08:00
</StackPanel>
</StackPanel>
</Grid>
</Window>