<UserControl x:Class="VIZ.TVP.CBA.Module.PlayerComPareView"
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
                      xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
                      xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
                      xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
                      xmlns:dxrudex="http://schemas.devexpress.com/winfx/2008/xaml/reports/userdesignerextensions"
                      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                      xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
                      xmlns:storage="clr-namespace:VIZ.TVP.CBA.Module"
             mc:Ignorable="d"
             d:DesignHeight="800" d:DesignWidth="650" >
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/VIZ.TVP.CBA.Module;component/Style/DataGrid.xaml"></ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>

            <core:Enum2EnumDescriptionConverter x:Key="Enum2EnumDescriptionConverter" EnumType="{x:Type storage:HighLightEnum}"></core:Enum2EnumDescriptionConverter>

            <core:Enum2EnumDescriptionConverter x:Key="TechStatsEnumDescriptionConverter" EnumType="{x:Type storage:TechStats}"></core:Enum2EnumDescriptionConverter>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="197*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="0"/>
            <RowDefinition Height="200"/>
            <RowDefinition Height="160"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
     
        <WrapPanel Grid.Row="1" Height="160" Width="650" HorizontalAlignment="Left" VerticalAlignment="Center"  >
            <Grid >
                <Grid.RowDefinitions>
                    <RowDefinition Height="40"/>
                    <RowDefinition Height="40"/>
                    <RowDefinition Height="40"/>
                    <RowDefinition Height="40"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="127"/>
                    <ColumnDefinition Width="127"/>
                </Grid.ColumnDefinitions>

                <TextBlock Grid.Row="0" Grid.Column="0"  Text="标题"  FontSize="16"  HorizontalAlignment="Center" VerticalAlignment="Center"  />


                <Button  Grid.Row="0" Content="任务开始"  Name="task_Start" Click="task_Start_Click" Grid.Column="3" FontSize="14" Height="30" Width="90"/>

                <Button  Grid.Row="0" Content="任务暂停"  Name="task_continue" Click="task_continue_Click" Grid.Column="4" FontSize="14" Height="30" Width="90"/>

                <Button  Grid.Row="0" Content="任务停止"  Name="task_Stop" Click="task_Stop_Click" Grid.Column="5" FontSize="14" Height="30" Width="90"/>

                <dxe:TextEdit Grid.Row="0" Grid.Column="1"   Width="120" 
                         FontSize="16"   HorizontalContentAlignment="Center" 
                         HorizontalAlignment="Center" VerticalAlignment="Center"  Text="{Binding Title,Mode=TwoWay }" />
                <TextBlock  TextBlock.TextAlignment="Center" Text="主队" Width="65"  FontSize="16"   Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>


                <dxe:TextEdit Text="{Binding HName,Mode=TwoWay}"  Width="120"  FontSize="16" Grid.Column="1"  Grid.Row="1" VerticalAlignment="Center" />

                <TextBlock  TextBlock.TextAlignment="Center" Text="客队" Width="65"  FontSize="16"    Grid.Row="1"  Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center"/>

                <dxe:TextEdit Text="{Binding AName,Mode=TwoWay}"  Grid.Row="1" Grid.Column="3" Width="120"  FontSize="16"  VerticalAlignment="Center" />

                <Button Content="刷新" Command="{Binding BtnCommand}" HorizontalContentAlignment="Center"  
                        Grid.Row="1"      Grid.Column="5" Width="90" Height="30"  FontSize="14"/>

                <TextBlock Grid.Row="2" TextBlock.TextAlignment="Center" Text="主队球员" Width="65" FontSize="16"    HorizontalAlignment="Center" VerticalAlignment="Center"/>

                <dxe:ComboBoxEdit  Grid.Row="2" Grid.Column="1" x:Name="com_HPlayer" HorizontalAlignment="Center" VerticalAlignment="Center" Width="120" FontSize="16"
                          ItemsSource="{Binding Path=HPlayers,Mode=TwoWay}"
                          SelectedItem="{Binding Path=HPlayer,Mode=TwoWay}">
                </dxe:ComboBoxEdit>

                <TextBlock Grid.Row="2" Grid.Column="2" TextBlock.TextAlignment="Center" Text="客队球员" Width="65"  FontSize="16"   HorizontalAlignment="Center" VerticalAlignment="Center" />

                <dxe:ComboBoxEdit  Grid.Row="2" Grid.Column="3" x:Name="com_APlayer" HorizontalAlignment="Center" VerticalAlignment="Center" Width="120" FontSize="16"
                          ItemsSource="{Binding Path=APlayers,Mode=TwoWay}"
                          SelectedItem="{Binding Path=APlayer,Mode=TwoWay}"  >

                </dxe:ComboBoxEdit>


                <WrapPanel Grid.Row="3" Grid.Column="1" VerticalAlignment="Center">

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="55"/>
                            <ColumnDefinition Width="70"/>
                        </Grid.ColumnDefinitions>
                        
                        <TextBlock  Grid.Column="0" TextBlock.TextAlignment="Center" Text="球衣号:" Width="50"  FontSize="16"   HorizontalAlignment="Left" VerticalAlignment="Center" />

                        <dxe:TextEdit Text="{Binding HNums}"  Width="70" FontSize="16"  Grid.Column="1" 
                         HorizontalContentAlignment="Center" 
                         HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Grid>

                  
                </WrapPanel>
                <TextBlock Grid.Row="3" Grid.Column="2" TextBlock.TextAlignment="Center" Text="VS" Width="50"  FontSize="16"   HorizontalAlignment="Center" VerticalAlignment="Center" />

                <WrapPanel Grid.Row="3" Grid.Column="3" VerticalAlignment="Center">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="55"/>
                            <ColumnDefinition Width="70"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock  Grid.Column="0" TextBlock.TextAlignment="Center" Text="球衣号:" Width="50"  FontSize="16"   HorizontalAlignment="Left" VerticalAlignment="Center" />
                        <dxe:TextEdit Text="{Binding ANums}" Width="70" FontSize="16"  Grid.Column="1"  
                         HorizontalContentAlignment="Center" 
                         HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Grid>
                </WrapPanel>

                <WrapPanel Grid.Row="3" Grid.Column="4" VerticalAlignment="Center">

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="45"/>
                            <ColumnDefinition Width="80"/>
                        </Grid.ColumnDefinitions>

                        <TextBlock  Grid.Column="0" TextBlock.TextAlignment="Center" Text="项数:" Width="45"  FontSize="16"   HorizontalAlignment="Left" VerticalAlignment="Center" />
                        <dxe:ComboBoxEdit Grid.Column="1" x:Name="com_matchStatsId"  HorizontalAlignment="Left" VerticalAlignment="Center" Width="80" FontSize="16"
                          ItemsSource="{Binding Path=MatchStatsIds,Mode=TwoWay}"
                          SelectedItem="{Binding Path=MatchStatsId,Mode=TwoWay}" >
                    </dxe:ComboBoxEdit>
                   </Grid>

                </WrapPanel>



                <!--<Button Content="球员对比上" Command="{Binding PlayerComCommand}" HorizontalContentAlignment="Center"  
                              Grid.Column="5" Grid.Row="3" Width="100" Height="30"  FontSize="14"/>-->

            </Grid>
        </WrapPanel>

        <WrapPanel Grid.Row="2" Margin="90,0,0,0">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="150"/>
                    <ColumnDefinition  Width="200"/>
                </Grid.ColumnDefinitions>

                <dxe:ImageEdit Grid.Column="0" Height="150" Width="120" x:Name="HPlayer_Logo" ShowMenu="False" EditValue="{Binding Path=HPlayerLogo}"  
                               ShowLoadDialogOnClickMode="Never"/>
                <dxe:ImageEdit Grid.Column="1" Height="150" Width="120" x:Name="APlayer_Logo" ShowMenu="False" EditValue="{Binding Path=APlayerLogo}" 
                               ShowLoadDialogOnClickMode="Never" Margin="-25,0,0,0"/>
            </Grid>

        </WrapPanel>


        <DockPanel  Grid.Row="3">

            <ScrollViewer HorizontalScrollBarVisibility="Disabled"
                      VerticalScrollBarVisibility="Auto"
                      Name="PART_Options"
                      DockPanel.Dock="Right"
                      dx:ScrollBarExtensions.ScrollBarMode="TouchOverlap"
                      Focusable="False">

            </ScrollViewer>
            <dxg:GridControl x:Name="grid" ShowBorder="False" ItemsSource="{Binding Path= PlayerComModels,Mode=TwoWay}" SelectedItem="{Binding PlayerComModel,Mode=TwoWay}">

                <dxg:GridColumn FieldName="SelectLight"  Header="" Width="112">
                    <dxg:GridColumn.EditSettings>
                        <dxe:ComboBoxEditSettings 
                                        ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.EnumDescriptions}}"   IsTextEditable="False" >
                        </dxe:ComboBoxEditSettings>
                    </dxg:GridColumn.EditSettings>

                </dxg:GridColumn>

                <dxg:GridColumn FieldName="HScore"  Header="主队球员本场" Width="112"  />
                <dxg:GridColumn FieldName="HSeasonScore"  Header="主队球员赛季" Width="112"    />

                <dxg:GridColumn  FieldName="TechStatsName"  Header="" Width="112">
                    <dxg:GridColumn.EditSettings>
                        <dxe:ComboBoxEditSettings 
                                        ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.EnumTechStatsDescriptions}}"  IsTextEditable="False"     >
                            <!--<dxe:ComboBoxEditSettings.CommandBindings>
                                        <CommandBinding Command=""/>
                                    </dxe:ComboBoxEditSettings.CommandBindings>-->
                        </dxe:ComboBoxEditSettings>
                    </dxg:GridColumn.EditSettings>

                    <!--<dxg:GridColumn.CellTemplate>
                                <DataTemplate>
                                    <dxe:ComboBoxEdit x:Name="PART_Editor" ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.EnumTechStatsDescriptions}}"  />
                                </DataTemplate>
                            </dxg:GridColumn.CellTemplate>-->
                </dxg:GridColumn>

                <dxg:GridColumn FieldName="AScore"  Header="客队球员本场" Width="112"  />
                <dxg:GridColumn FieldName="ASeasonScore"  Header="客队球员赛季" Width="112"    />


                <!--#endregion-->
                <dxg:GridControl.View>
                    <dxg:TableView AutoWidth="True"  ShowGroupPanel="False" 
                               BorderThickness="0"  
                               ShowFilterPanelMode="Never" 
                               AllowColumnFiltering="False"
                               AllowSorting="False"
                               IsColumnMenuEnabled="False" >
                    </dxg:TableView>
                </dxg:GridControl.View>
            </dxg:GridControl>
        </DockPanel>
    </Grid>
</UserControl>
