<Window x:Class="MeterVision.Patch.AddCompDlg2"
        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:local="clr-namespace:MeterVision.Patch"
        mc:Ignorable="d"
        Background="WhiteSmoke"
        ShowInTaskbar="False"
        WindowStartupLocation="CenterOwner"
        Title="选择要比较的批量任务" Height="600" Width="800">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="40" />
        </Grid.RowDefinitions>

        <TextBlock Text="注意：先选择新任务，再选择时间小于新任务的任务，新旧任务必须来源与一个模板" 
                   FontSize="14px"
                   Foreground="Red" Margin="10 10 10 10"  TextWrapping="Wrap"/>


        <Border Grid.Row="1" BorderBrush="#D3D3D3" BorderThickness="0 0 0 1" Background="White" Margin="0 0 0 0">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <Border  Grid.Column="0" Margin="10" BorderBrush="#666666" BorderThickness="0" Padding="5">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <TextBlock Text="选择新的批量任务:" FontSize="14px" Foreground="#000000" 
                               Margin="0 0 0 5"
                               HorizontalAlignment="Left" VerticalAlignment="Center" />
                        <ListView Grid.Row="1" x:Name="lvNPatch" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                                  Foreground="#000000" FontSize="13px" SelectionChanged="LvNPatch_SelectionChanged">
                            <ListView.ItemContainerStyle>
                                <Style TargetType="ListViewItem">
                                    <Setter Property="BorderBrush" Value="#D3D3D3"/>
                                    <Setter Property="BorderThickness" Value="0,0,0,1"/>
                                </Style>
                            </ListView.ItemContainerStyle>
                            <ListView.View>
                                <GridView>
                                    <GridViewColumn Header="任务名称" Width="220" DisplayMemberBinding="{Binding PatchName2}" />
                                    <!--<GridViewColumn Header="任务时间" DisplayMemberBinding="{Binding TimeName}" />-->
                                    <GridViewColumn Header="正确率" DisplayMemberBinding="{Binding EqualRate}" />
                                    <!--<GridViewColumn Header="模板" DisplayMemberBinding="{Binding StandName}" />-->
                                </GridView>
                            </ListView.View>
                        </ListView>
                    </Grid>
                </Border>


                <Border  Grid.Column="1" Margin="10" BorderBrush="#666666" BorderThickness="0" Padding="5">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <TextBlock Text="选择旧的批量任务:" FontSize="14px" Foreground="#000000" 
                               Margin="0 0 0 5"
                               HorizontalAlignment="Left" VerticalAlignment="Center" />
                        <ListView Grid.Row="1" x:Name="lvOPatch" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                                  Foreground="#000000" FontSize="13px">
                            <ListView.ItemContainerStyle>
                                <Style TargetType="ListViewItem">
                                    <Setter Property="BorderBrush" Value="#D3D3D3"/>
                                    <Setter Property="BorderThickness" Value="0,0,0,1"/>
                                </Style>
                            </ListView.ItemContainerStyle>
                            <ListView.View>
                                <GridView>
                                    <GridViewColumn Header="任务名称" Width="220" DisplayMemberBinding="{Binding PatchName2}" />
                                    <!--<GridViewColumn Header="任务时间" DisplayMemberBinding="{Binding TimeName}" />-->
                                    <GridViewColumn Header="正确率" DisplayMemberBinding="{Binding EqualRate}" />
                                    <!--<GridViewColumn Header="模板" DisplayMemberBinding="{Binding StandName}" />-->
                                </GridView>
                            </ListView.View>
                        </ListView>
                    </Grid>
                </Border>

            </Grid>
        </Border>

        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center">
            <Button Name="btnOK" Content="确定" HorizontalAlignment="Center" Margin="0 0 20 0"
                    VerticalAlignment="Center" Width="80" Height="26" Click="BtnOK_Click" />
            <Button Name="btnClose" Content="取消" HorizontalAlignment="Center" 
                    VerticalAlignment="Center" Width="80" Height="26" Click="BtnClose_Click" />
        </StackPanel>

    </Grid>
</Window>
