<UserControl x:Class="VIZ.TVP.CBA.Module.DayMatchView"
                      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="400"
                      d:DesignWidth="750"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch">
    <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>

            <Style x:Name="gridCenter"  TargetType = "{x:Type dxg:GridColumn}" >
                <!--列头居中-->
                <Setter  Property = "HorizontalHeaderContentAlignment"  Value = "Center"  />
                <!--列值居中-->
                <Setter  Property = "EditSettings" >
                    <Setter.Value >
                        <dxe:TextEditSettings  HorizontalContentAlignment = "Center"  />
                    </Setter.Value >
                </Setter >
            </Style >
        </ResourceDictionary>


    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="60"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <WrapPanel  Grid.Row="0" Width="750" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="-2,0,0,0" >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="175"/>
                    <ColumnDefinition Width="90"/>
                    <ColumnDefinition Width="80"/>
                    <ColumnDefinition Width="60"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="140"/>

                </Grid.ColumnDefinitions>

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

                <dxe:TextEdit Grid.Column="1"   Width="170" FontSize="16"   HorizontalContentAlignment="Left" 
                         HorizontalAlignment="Center" VerticalAlignment="Center"  Text="{Binding  Title,Mode=TwoWay }"></dxe:TextEdit>

                <TextBlock Grid.Column="2" TextBlock.TextAlignment="Center"  Text="查询方式：" FontSize="16" VerticalAlignment="Center"  Width="70" />
                
                <dxe:ComboBoxEdit Grid.Column="3" Width="60" FontSize="14" ItemsSource="{Binding Path=ChooseMatchItems,Mode=TwoWay}" 
                                                                           SelectedItem="{Binding Path=SelectChooseMatchItem,Mode=TwoWay}" />

                <TextBlock  TextBlock.TextAlignment="Center" Text="日期：" Width="60" Grid.Column="4"  FontSize="16"  VerticalAlignment="Center"/>


                <dxe:DateEdit Grid.Column="5" HorizontalAlignment="Center"  FontSize="16" EditValue="{Binding MatchDate,Mode=TwoWay}" 
                                  ShowToday="False" ShowClearButton="False"  
                                  VerticalAlignment="Center"  MaskUseAsDisplayFormat="True"
                                  Width="120" IsEnabled="{Binding MateDateEnable,Mode=TwoWay}">
                </dxe:DateEdit>






                <WrapPanel Grid.Row="0" Grid.Column="6" HorizontalAlignment="Center" VerticalAlignment="Center">

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="110"/>
                            <ColumnDefinition Width="30"/>
                        </Grid.ColumnDefinitions>
                        <Button Content="加载赛程" Command="{Binding BtnCmd}" HorizontalContentAlignment="Center"  
                              Grid.Column="0" Width="100" Height="30"  FontSize="14" IsEnabled="{Binding  BtmEnable,Mode=TwoWay}" />
                        
                        <dx:SimpleButton  Grid.Row="1" Grid.Column="1"  Glyph='/VIZ.TVP.CBA.Module;component/Image/CBAPng/Prompt2525.png' FontSize="16" 
                                          Command="{Binding PromptCommand}" HorizontalContentAlignment="Center"  Width="30" Height="30"  />
                    </Grid>
                </WrapPanel>






            </Grid>
        </WrapPanel>


        <WrapPanel  Grid.Row="1" Width="750" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="-2,0,0,0" >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="175"/>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="100"/>
                    <ColumnDefinition Width="60"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="140"/>
        
      
                </Grid.ColumnDefinitions>

                <TextBlock  TextBlock.TextAlignment="Center" Text="轮次：" Width="60" Grid.Column="4"  FontSize="16"  VerticalAlignment="Center"/>

                <dxe:ComboBoxEdit Grid.Column="5"  HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"
                          Width="120" ItemsSource="{Binding Path=RoundMatchs,Mode=TwoWay}" 
                          SelectedItem="{Binding Path=RoundMatchItem,Mode=TwoWay}"  IsEnabled="{Binding RoundComEnable,Mode=TwoWay}">
                </dxe:ComboBoxEdit>




                <WrapPanel Grid.Row="0" Grid.Column="6" HorizontalAlignment="Center" VerticalAlignment="Center">

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="110"/>
                            <ColumnDefinition Width="30"/>
                        </Grid.ColumnDefinitions>
                        <Button Grid.Row="0" Grid.Column="0" Content="加载轮次"   FontSize="16" 
                                          Command="{Binding BtnRoundCmd}" HorizontalContentAlignment="Center"
                                          Width="100" Height="30" IsEnabled="{Binding RoundBtnEnable,Mode=TwoWay}" />

                        <!--<dx:SimpleButton  Grid.Row="1" Grid.Column="1"  Glyph='/VIZ.TVP.CBA.Module;component/Image/CBAPng/Prompt2525.png' FontSize="16" 
                                          Command="{Binding PromptCommand}" HorizontalContentAlignment="Center"  Width="30" Height="30"  />-->
                    </Grid>
                </WrapPanel>


            </Grid>
        </WrapPanel>

        <!--<WrapPanel  Width="650" HorizontalAlignment="Left" Grid.Row="1" VerticalAlignment="Center" Margin="-2,0,0,0" >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="120"/>
                    <ColumnDefinition Width="120"/>
                    <ColumnDefinition Width="120"/>

                </Grid.ColumnDefinitions>


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

                <Button Content="任务暂停"  Name="task_continue" Click="task_continue_Click" Grid.Column="1" FontSize="16" Height="30" Width="90"/>

                <Button Content="任务停止"  Name="task_Stop" Click="task_Stop_Click" Grid.Column="2" FontSize="16" Height="30" Width="90"/>

            </Grid>
        </WrapPanel>-->

        <DockPanel  Grid.Row="2" >

            <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= MatchData,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" />
                    </dxg:GridColumn.EditSettings>
                </dxg:GridColumn>
                <dxg:GridColumn FieldName="dates"  Header="日期" Width="112"  />
                <dxg:GridColumn FieldName="time"  Header="时间" Width="112"    />
                <dxg:GridColumn FieldName="HomeTeamName" Header="主队" Width="180" />
                <dxg:GridColumn FieldName="HomeTeamScore" Header="主队得分" Width="180"   />
                <dxg:GridColumn FieldName="VisitingTeamName" Header="客队" Width="180" />
                <dxg:GridColumn FieldName="VisitingTeamScore" Header="客队得分" Width="180"  />
                <dxg:GridColumn FieldName="Status"  Header="比赛状态" Width="180"  />
                <!--<dxg:GridColumn FieldName="ModelTrademarkName" Header="高亮" Width="112">
                            <dxg:GridColumn.EditSettings>
                                <dxe:ComboBoxEditSettings  IsTextEditable="False" />
                            </dxg:GridColumn.EditSettings>
                        </dxg:GridColumn>-->

                <!--#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>
