<Page x:Class="PlayBackDemo.PlayBackByTimePage"
      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:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300"
	Title="PlayBackByTimePage">
    <Page.Resources>
        <Style x:Key="TBStyle" TargetType="TextBlock">
            <Setter Property="TextAlignment" Value="Right"/>
            <Setter Property="Width" Value="100"/>
            <Setter Property="Margin" Value="10,0"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>
        <Style x:Key="CBStyle" TargetType="ComboBox">
            <Setter Property="Width" Value="150"/>
        </Style>
    </Page.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="5*"/>
            <RowDefinition Height="3*"/>
        </Grid.RowDefinitions>
        <GroupBox Header="{StaticResource ID_PLAYBACK}" Grid.Row="0">
            <StackPanel>
                <StackPanel Orientation="Horizontal" Margin="3">
                    <TextBlock Style="{StaticResource ResourceKey=TBStyle}" Text="{StaticResource ID_CHANNEL}">:</TextBlock>
                    <ComboBox x:Name="PB_ChannelComboBox" Style="{StaticResource ResourceKey=CBStyle}" SelectedIndex="0"></ComboBox>
                </StackPanel>
                <!--<StackPanel Orientation="Horizontal" Margin="3" Visibility="Collapsed">
                    <TextBlock Style="{StaticResource ResourceKey=TBStyle}">Mode:</TextBlock>
                    <ComboBox x:Name="PB_ModeComboBox" Style="{StaticResource ResourceKey=CBStyle}" SelectedIndex="0"></ComboBox>
                </StackPanel>-->
                <StackPanel Orientation="Horizontal" Margin="3">
                    <TextBlock Style="{StaticResource ResourceKey=TBStyle}" Text="{StaticResource ID_RECORDTYPE}">:</TextBlock>
                    <ComboBox x:Name="PB_TypeComboBox" Style="{StaticResource ResourceKey=CBStyle}" SelectedIndex="0"></ComboBox>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="3">
                    <TextBlock Style="{StaticResource ResourceKey=TBStyle}" Text="{StaticResource ID_STREAMTYPE}">:</TextBlock>
                    <ComboBox x:Name="PB_StreamComboBox" Style="{StaticResource ResourceKey=CBStyle}" SelectedIndex="0"></ComboBox>
                </StackPanel>
                <!--<Calendar Margin="3" x:Name="PB_Calendar" SelectedDatesChanged="PB_Calendar_SelectedDatesChanged"></Calendar>-->
                <DatePicker Margin="3" x:Name="PB_DatePicker" Width="150"></DatePicker>
                <Button x:Name="PB_Play" Width="80" Margin="3" Content="{StaticResource ID_PLAY}" Click="PB_Play_Click"></Button>
            </StackPanel>
        </GroupBox>
        <GroupBox Header="{StaticResource ID_DOWNLOAD}" Grid.Row="1">
            <StackPanel >
                
                <StackPanel Orientation="Horizontal" Margin="3">
                    <TextBlock Style="{StaticResource ResourceKey=TBStyle}" Text="{StaticResource ID_CHANNEL}">:</TextBlock>
                    <ComboBox x:Name="DL_ChannelComboBox" Style="{StaticResource ResourceKey=CBStyle}" SelectedIndex="0"></ComboBox>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="3">
                    <TextBlock Style="{StaticResource ResourceKey=TBStyle}" Text="{StaticResource ID_STREAMTYPE}">:</TextBlock>
                    <ComboBox x:Name="DL_StreamComboBox" Style="{StaticResource ResourceKey=CBStyle}" SelectedIndex="0"></ComboBox>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="3">
                    <TextBlock Style="{StaticResource ResourceKey=TBStyle}" Text="{StaticResource ID_STARTTIME}">:</TextBlock>
                    <!--<DatePicker Width="150"></DatePicker>-->
                    <WindowsFormsHost>
                        <wf:DateTimePicker x:Name="DL_StartTime" Format="Custom" CustomFormat="yyyy/MM/dd HH:mm:ss" ShowUpDown="True" Width="150"></wf:DateTimePicker>
                    </WindowsFormsHost>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="3">
                    <TextBlock Style="{StaticResource ResourceKey=TBStyle}" Text="{StaticResource ID_ENDTIME}">:</TextBlock>
                    <!--<DatePicker Width="150"></DatePicker>-->
                    <WindowsFormsHost>
                        <wf:DateTimePicker x:Name="DL_EndTime" Format="Custom" CustomFormat="yyyy/MM/dd HH:mm:ss" ShowUpDown="True" Width="150"></wf:DateTimePicker>
                    </WindowsFormsHost>
                </StackPanel>
                <UniformGrid Columns="2" Margin="3">
                    <Button x:Name="DL_Button" Width="80" Margin="3" Click="DL_Button_Click" Content="{StaticResource ID_DOWNLOAD}"></Button>
                    <Button x:Name="DL_Stop" Width="80" Margin="3" Click="DL_Stop_Click" IsEnabled="False" Content="{StaticResource ID_STOP}"></Button>
                </UniformGrid>
                
                <ProgressBar x:Name="DL_ProcessBar" MinHeight="10" Margin="3"></ProgressBar>
            </StackPanel>
        </GroupBox>
    </Grid>
</Page>
