<Page x:Class="B20UVLog.Pages.ANALogData"
      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:B20UVLog.Pages" xmlns:My="clr-namespace:MyWPFControl.Controls;assembly=MyWPFControl" xmlns:viewmodels="clr-namespace:B20UVLog.ViewModels"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="ANALogData">
    <Page.DataContext>
        <viewmodels:ANALogDataViewModel/>
    </Page.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <!--<TextBlock Grid.Row="0" Text="ANALog Data" FontSize="25" Margin="10 5"/>-->
        <StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center">
            <!--<My:MTextBox x:Name="TextIndex" Title="Index_No"/>-->
            <My:MDateTimePicker x:Name="DTPStart" Title="开始时间"/>
            <TextBlock Text="--" VerticalAlignment="Center" Margin="2"/>
            <My:MDateTimePicker x:Name="DTPEnd" Title="结束时间"/>
            <My:MButton x:Name="BtnSearch" Content="查询" Type="Primary"  Click="BtnSearch_Click"/>
            <My:MButton x:Name="BtnReset" Content="条件重置"  Click="BtnReset_Click"/>
            <My:MButton x:Name="BtnExport" Content="导出报表"  Click="BtnExport_Click" Type="Warning"/>
        </StackPanel>
        <Grid Grid.Row="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <My:MDataGrid ItemsSource="{Binding GridData}">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="StageMainCDA(Mpa)" Binding="{Binding StageMainCDA,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.001}"/>
                    <DataGridTextColumn Header="照射器MainCDA(Mpa)" Binding="{Binding IrradiatorMainCDA,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.001}"/>
                    <DataGridTextColumn Header="MaskBar1吸着压力(Kpa)" Binding="{Binding MaskBar1Press,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="MaskBar2吸着压力(Kpa)" Binding="{Binding MaskBar2Press,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="MaskBar3吸着压力(Kpa)" Binding="{Binding MaskBar3Press,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="MaskBar4吸着压力(Kpa)" Binding="{Binding MaskBar4Press,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="MaskBar5吸着压力(Kpa)" Binding="{Binding MaskBar5Press,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="MaskBar6吸着压力(Kpa)" Binding="{Binding MaskBar6Press,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="MaskBar7吸着压力(Kpa)" Binding="{Binding MaskBar7Press,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="MaskBar8吸着压力(Kpa)" Binding="{Binding MaskBar8Press,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="MaskBar9吸着压力(Kpa)" Binding="{Binding MaskBar9Press,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="MaskBar10吸着压力(Kpa)" Binding="{Binding MaskBar10Press,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="MaskBar11吸着压力(Kpa)" Binding="{Binding MaskBar11Press,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="照度1-5(度)" Binding="{Binding Temperature15,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="照度6-10(度)" Binding="{Binding Temperature610,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="Mask温度1(度)" Binding="{Binding MaskTemp1,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="Mask温度2(度)" Binding="{Binding MaskTemp2,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量1(L/min)" Binding="{Binding RadiatorCoolWaterFlow1,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量2(L/min)" Binding="{Binding RadiatorCoolWaterFlow2,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量3(L/min)" Binding="{Binding RadiatorCoolWaterFlow3,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量4(L/min)" Binding="{Binding RadiatorCoolWaterFlow4,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量5(L/min)" Binding="{Binding RadiatorCoolWaterFlow5,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量6(L/min)" Binding="{Binding RadiatorCoolWaterFlow6,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量7(L/min)" Binding="{Binding RadiatorCoolWaterFlow7,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量8(L/min)" Binding="{Binding RadiatorCoolWaterFlow8,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量9(L/min)" Binding="{Binding RadiatorCoolWaterFlow9,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量10(L/min)" Binding="{Binding RadiatorCoolWaterFlow10,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量11(L/min)" Binding="{Binding RadiatorCoolWaterFlow11,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量12(L/min)" Binding="{Binding RadiatorCoolWaterFlow12,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量13(L/min)" Binding="{Binding RadiatorCoolWaterFlow13,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="散热器冷却水流量14(L/min)" Binding="{Binding RadiatorCoolWaterFlow14,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量1(L/min)" Binding="{Binding LampSutterCoolWaterFlow1,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量2(L/min)" Binding="{Binding LampSutterCoolWaterFlow2,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量3(L/min)" Binding="{Binding LampSutterCoolWaterFlow3,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量4(L/min)" Binding="{Binding LampSutterCoolWaterFlow4,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量5(L/min)" Binding="{Binding LampSutterCoolWaterFlow5,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量6(L/min)" Binding="{Binding LampSutterCoolWaterFlow6,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量7(L/min)" Binding="{Binding LampSutterCoolWaterFlow7,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量8(L/min)" Binding="{Binding LampSutterCoolWaterFlow8,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量9(L/min)" Binding="{Binding LampSutterCoolWaterFlow9,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量10(L/min)" Binding="{Binding LampSutterCoolWaterFlow10,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量11(L/min)" Binding="{Binding LampSutterCoolWaterFlow11,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量12(L/min)" Binding="{Binding LampSutterCoolWaterFlow12,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量13(L/min)" Binding="{Binding LampSutterCoolWaterFlow13,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="LampSutter冷却水流量14(L/min)" Binding="{Binding LampSutterCoolWaterFlow14,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="Z1电流值(%)" Binding="{Binding Z1Current,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="Z2电流值(%)" Binding="{Binding Z2Current,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="Z3电流值(%)" Binding="{Binding Z3Current,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="Z4电流值(%)" Binding="{Binding Z4Current,Converter={StaticResource ConverterMultipleDouble},ConverterParameter=0.1}"/>
                    <DataGridTextColumn Header="记录时间" Binding="{Binding RecordTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/>
                </DataGrid.Columns>
            </My:MDataGrid>
            <My:MPagination Grid.Row="1" x:Name="MyPagination" PageIndexChange="MyPagination_PageIndexChange" PageSizeChange="MyPagination_PageSizeChange"/>
        </Grid>

    </Grid>

</Page>
