<UserControl x:Class="NEIntelligentControl2.Views.Infos.StateChange"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:NEIntelligentControl2.Views.Infos"
             xmlns:bc="clr-namespace:NEIntelligentControl2.Views.Basic"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800" Loaded="UserControl_Loaded">
    <UserControl.Resources>
        <Style x:Key="TextBlockStyle" TargetType="TextBlock">
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal">
            <TextBlock Text="时间：" Style="{StaticResource TextBlockStyle}"/>
            <bc:TimePicker VerticalAlignment="Center" x:Name="_tpstart"/>
            <TextBlock Text="-" Style="{StaticResource TextBlockStyle}"/>
            <bc:TimePicker VerticalAlignment="Center" x:Name="_tpend"/>
            <Button Content="查 询" Padding="12,3" Style="{StaticResource ConfirmButtonStyle}" Click="Button_Click" Tag="search"/>
            <Button Content="导 出" Padding="12,3" Style="{StaticResource ConfirmButtonStyle}" Click="Button_Click" Tag="output"/>
        </StackPanel>

        <local:StateInfo Grid.Row="1" x:Name="_si"/>

        <DataGrid x:Name="_DGMain" FontSize="14" ColumnWidth="*" Grid.Row="2" Background="#FFABABAB" IsReadOnly="True" AutoGenerateColumns="False" HorizontalGridLinesBrush="#FF9E9E9E" VerticalGridLinesBrush="#FF9E9E9E">
            <DataGrid.Columns>
                <DataGridTextColumn Header="风机" Binding="{Binding Code}"/>
                <DataGridTextColumn Header="状态" Binding="{Binding StatusName}"/>
                <DataGridTextColumn Header="开始时间" Binding="{Binding StartTime}"/>
                <DataGridTextColumn Header="结束时间" Binding="{Binding EndTime}"/>
                <DataGridTextColumn Header="持续时间（小时）" Binding="{Binding Duration}"/>
            </DataGrid.Columns>
        </DataGrid>

        <bc:HintBar x:Name="_IBMain" Grid.Row="3"/>
    </Grid>
</UserControl>
