|
|
|
|
<UserControl
|
|
|
|
|
x:Class="DownKyi.Views.ViewVideoDetail"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
|
|
|
prism:ViewModelLocator.AutoWireViewModel="True">
|
|
|
|
|
<UserControl.Resources>
|
|
|
|
|
|
|
|
|
|
<!-- 菜单 -->
|
|
|
|
|
<ContextMenu x:Key="VideoContextMenu" DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
|
|
|
|
|
<MenuItem
|
|
|
|
|
Command="{Binding DataContext.ParseCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListView}}"
|
|
|
|
|
CommandParameter="{Binding}"
|
|
|
|
|
Header="{DynamicResource Parse}" />
|
|
|
|
|
</ContextMenu>
|
|
|
|
|
|
|
|
|
|
<!-- ListView每个item的样式 -->
|
|
|
|
|
<Style x:Key="ListViewItemStyle" TargetType="{x:Type ListViewItem}">
|
|
|
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
|
|
|
|
<Setter Property="ContextMenu" Value="{StaticResource VideoContextMenu}" />
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource BrushTextDark}" />
|
|
|
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
|
|
|
<Setter Property="Padding" Value="0" />
|
|
|
|
|
<Setter Property="Margin" Value="0" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ListViewItem}">
|
|
|
|
|
<Border
|
|
|
|
|
x:Name="Bd"
|
|
|
|
|
Height="50"
|
|
|
|
|
Padding="{TemplateBinding Padding}"
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
|
SnapsToDevicePixels="True">
|
|
|
|
|
<GridViewRowPresenter
|
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Content="{TemplateBinding Content}"
|
|
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource BrushPrimaryTranslucent3}" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource BrushTextDark}" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsSelected" Value="True">
|
|
|
|
|
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource BrushPrimaryTranslucent2}" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource BrushText}" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
<!-- 右键菜单相关 -->
|
|
|
|
|
<EventSetter Event="PreviewMouseRightButtonDown" Handler="OnListViewItemPreviewMouseRightButtonDown" />
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<!-- ListView的样式 -->
|
|
|
|
|
<Style x:Key="ListViewStyle" TargetType="{x:Type ListView}">
|
|
|
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="False" />
|
|
|
|
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemStyle}" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ListView}">
|
|
|
|
|
<Border BorderBrush="{DynamicResource BrushBorder}" BorderThickness="1">
|
|
|
|
|
<ScrollViewer Padding="{TemplateBinding Padding}" Style="{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}">
|
|
|
|
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
</Border>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<!-- ListView的header的样式 -->
|
|
|
|
|
<Style x:Key="GridViewColumnHeaderStyle" TargetType="{x:Type GridViewColumnHeader}">
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource BrushHeaderGrey}" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
|
|
|
|
|
<Grid SnapsToDevicePixels="True">
|
|
|
|
|
<Border
|
|
|
|
|
x:Name="HeaderBorder"
|
|
|
|
|
Height="30"
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition MaxHeight="10" />
|
|
|
|
|
<RowDefinition />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Border Grid.RowSpan="2" Padding="{TemplateBinding Padding}">
|
|
|
|
|
<ContentPresenter
|
|
|
|
|
x:Name="HeaderContent"
|
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
|
|
Content="{TemplateBinding Content}"
|
|
|
|
|
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
|
|
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
|
|
|
RecognizesAccessKey="True"
|
|
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
<Canvas>
|
|
|
|
|
<Thumb x:Name="PART_HeaderGripper">
|
|
|
|
|
<Thumb.Style>
|
|
|
|
|
<Style TargetType="{x:Type Thumb}">
|
|
|
|
|
<Setter Property="Canvas.Right" Value="-9" />
|
|
|
|
|
<Setter Property="Width" Value="18" />
|
|
|
|
|
<Setter Property="Height" Value="{Binding ActualHeight, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
|
|
|
<Setter Property="Padding" Value="0" />
|
|
|
|
|
<Setter Property="Background" Value="White" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
|
|
|
<Border Padding="{TemplateBinding Padding}" Background="Transparent">
|
|
|
|
|
<Rectangle
|
|
|
|
|
Width="1"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
Fill="{TemplateBinding Background}" />
|
|
|
|
|
</Border>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
</Thumb.Style>
|
|
|
|
|
</Thumb>
|
|
|
|
|
</Canvas>
|
|
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter TargetName="HeaderBorder" Property="Background" Value="{DynamicResource BrushPrimaryTranslucent3}" />
|
|
|
|
|
<Setter TargetName="PART_HeaderGripper" Property="Background" Value="Transparent" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource BrushTextDark}" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsPressed" Value="True">
|
|
|
|
|
<Setter TargetName="HeaderBorder" Property="Background" Value="{DynamicResource BrushPrimaryTranslucent2}" />
|
|
|
|
|
<Setter TargetName="PART_HeaderGripper" Property="Visibility" Value="Hidden" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource BrushText}" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="50" />
|
|
|
|
|
<RowDefinition Height="10" />
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="0">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="40" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="50" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Width="24"
|
|
|
|
|
Height="24"
|
|
|
|
|
Margin="10,5"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Command="{Binding BackSpaceCommand}"
|
|
|
|
|
Style="{StaticResource ImageBtnStyle}">
|
|
|
|
|
<ContentControl>
|
|
|
|
|
<Path
|
|
|
|
|
Width="{Binding ArrowBack.Width}"
|
|
|
|
|
Height="{Binding ArrowBack.Height}"
|
|
|
|
|
Data="{Binding ArrowBack.Data}"
|
|
|
|
|
Fill="{Binding ArrowBack.Fill}"
|
|
|
|
|
Stretch="None" />
|
|
|
|
|
</ContentControl>
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
|
|
<Border
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Height="32"
|
|
|
|
|
Margin="0,5,0,5"
|
|
|
|
|
BorderBrush="{DynamicResource BrushPrimary}"
|
|
|
|
|
BorderThickness="1"
|
|
|
|
|
CornerRadius="16">
|
|
|
|
|
<TextBox
|
|
|
|
|
Margin="16,0,30,0"
|
|
|
|
|
VerticalContentAlignment="Center"
|
|
|
|
|
BorderThickness="0"
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Text="{Binding Path=InputText, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
|
|
|
|
|
<TextBox.InputBindings>
|
|
|
|
|
<KeyBinding Key="Enter" Command="{Binding InputCommand}" />
|
|
|
|
|
</TextBox.InputBindings>
|
|
|
|
|
<TextBox.Resources>
|
|
|
|
|
<VisualBrush
|
|
|
|
|
x:Key="HintText"
|
|
|
|
|
AlignmentX="Left"
|
|
|
|
|
Opacity="0.5"
|
|
|
|
|
Stretch="None"
|
|
|
|
|
TileMode="None">
|
|
|
|
|
<VisualBrush.Visual>
|
|
|
|
|
<TextBlock Text="{DynamicResource IndexHintTextSimple}" />
|
|
|
|
|
</VisualBrush.Visual>
|
|
|
|
|
</VisualBrush>
|
|
|
|
|
</TextBox.Resources>
|
|
|
|
|
<TextBox.Style>
|
|
|
|
|
<Style TargetType="TextBox">
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<Trigger Property="Text" Value="{x:Null}">
|
|
|
|
|
<Setter Property="Background" Value="{StaticResource HintText}" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="Text" Value="">
|
|
|
|
|
<Setter Property="Background" Value="{StaticResource HintText}" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</TextBox.Style>
|
|
|
|
|
</TextBox>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<ContentControl
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Width="24"
|
|
|
|
|
Height="24"
|
|
|
|
|
Margin="5"
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Content="{Binding Loading}"
|
|
|
|
|
Visibility="{Binding LoadingVisibility}" />
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
Grid.Column="2"
|
|
|
|
|
Width="24"
|
|
|
|
|
Height="24"
|
|
|
|
|
Margin="10,5"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Command="{Binding DownloadManagerCommand}"
|
|
|
|
|
Style="{StaticResource ImageBtnStyle}"
|
|
|
|
|
ToolTip="{DynamicResource DownloadManager}">
|
|
|
|
|
<ContentControl>
|
|
|
|
|
<Path
|
|
|
|
|
Width="{Binding DownloadManage.Width}"
|
|
|
|
|
Height="{Binding DownloadManage.Height}"
|
|
|
|
|
Data="{Binding DownloadManage.Data}"
|
|
|
|
|
Fill="{Binding DownloadManage.Fill}"
|
|
|
|
|
Stretch="Uniform" />
|
|
|
|
|
</ContentControl>
|
|
|
|
|
</Button>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" Opacity="0.3">
|
|
|
|
|
<TextBlock.Background>
|
|
|
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="0,0.5">
|
|
|
|
|
<GradientStop Offset="0" Color="#FF000000" />
|
|
|
|
|
<GradientStop Offset="1" />
|
|
|
|
|
</LinearGradientBrush>
|
|
|
|
|
</TextBlock.Background>
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="2" Visibility="{Binding ContentVisibility}">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="100*" MaxHeight="180" />
|
|
|
|
|
<RowDefinition Height="200*" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<DockPanel Grid.Row="0" Margin="10,0">
|
|
|
|
|
<Image
|
|
|
|
|
MinWidth="150"
|
|
|
|
|
MaxWidth="300"
|
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
|
DockPanel.Dock="Left"
|
|
|
|
|
Source="{Binding VideoInfoView.Cover}">
|
|
|
|
|
<Image.ContextMenu>
|
|
|
|
|
<ContextMenu>
|
|
|
|
|
<MenuItem Command="{Binding CopyCoverCommand}" Header="{DynamicResource CopyCover}" />
|
|
|
|
|
<MenuItem Command="{Binding CopyCoverUrlCommand}" Header="{DynamicResource CopyCoverUrl}" />
|
|
|
|
|
<!-- TODO 复制封面到文件 -->
|
|
|
|
|
</ContextMenu>
|
|
|
|
|
</Image.ContextMenu>
|
|
|
|
|
</Image>
|
|
|
|
|
|
|
|
|
|
<Grid
|
|
|
|
|
Margin="10,0,0,0"
|
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
|
DockPanel.Dock="Left">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="70" />
|
|
|
|
|
<RowDefinition />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="0">
|
|
|
|
|
<!-- 标题、分区、发布时间(番剧不显示)、播放量、弹幕数量、up主 -->
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition />
|
|
|
|
|
<ColumnDefinition Width="120" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Column="0">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="3*" />
|
|
|
|
|
<RowDefinition Height="2*" />
|
|
|
|
|
<RowDefinition Height="2*" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
FontWeight="Bold"
|
|
|
|
|
Foreground="{DynamicResource BrushTextDark}"
|
|
|
|
|
Text="{Binding VideoInfoView.Title}"
|
|
|
|
|
TextTrimming="CharacterEllipsis"
|
|
|
|
|
ToolTip="{Binding VideoInfoView.Title}" />
|
|
|
|
|
|
|
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<TextBlock
|
|
|
|
|
Margin="0,0,10,0"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{Binding VideoInfoView.VideoZone}" />
|
|
|
|
|
<TextBlock Foreground="{DynamicResource BrushTextGrey}" Text="{Binding VideoInfoView.CreateTime}" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="2"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<StackPanel Margin="0,0,10,0" Orientation="Horizontal">
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{Binding VideoInfoView.PlayNumber}" />
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{DynamicResource Play}" />
|
|
|
|
|
<StackPanel.Style>
|
|
|
|
|
<Style TargetType="{x:Type StackPanel}">
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.PlayNumber}" Value="0">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.PlayNumber}" Value="{x:Null}">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</StackPanel.Style>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<StackPanel Margin="0,0,10,0" Orientation="Horizontal">
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{Binding VideoInfoView.DanmakuNumber}" />
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{DynamicResource Danmaku}" />
|
|
|
|
|
<StackPanel.Style>
|
|
|
|
|
<Style TargetType="{x:Type StackPanel}">
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.DanmakuNumber}" Value="0">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.DanmakuNumber}" Value="{x:Null}">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</StackPanel.Style>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<StackPanel Margin="0,0,10,0" Orientation="Horizontal">
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{Binding VideoInfoView.LikeNumber}" />
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{DynamicResource Like}" />
|
|
|
|
|
<StackPanel.Style>
|
|
|
|
|
<Style TargetType="{x:Type StackPanel}">
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.LikeNumber}" Value="0">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.LikeNumber}" Value="{x:Null}">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</StackPanel.Style>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<StackPanel Margin="0,0,10,0" Orientation="Horizontal">
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{Binding VideoInfoView.CoinNumber}" />
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{DynamicResource Coin}" />
|
|
|
|
|
<StackPanel.Style>
|
|
|
|
|
<Style TargetType="{x:Type StackPanel}">
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.CoinNumber}" Value="0">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.CoinNumber}" Value="{x:Null}">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</StackPanel.Style>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<StackPanel Margin="0,0,10,0" Orientation="Horizontal">
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{Binding VideoInfoView.FavoriteNumber}" />
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{DynamicResource Favorite}" />
|
|
|
|
|
<StackPanel.Style>
|
|
|
|
|
<Style TargetType="{x:Type StackPanel}">
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.FavoriteNumber}" Value="0">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.FavoriteNumber}" Value="{x:Null}">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</StackPanel.Style>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<StackPanel Margin="0,0,10,0" Orientation="Horizontal">
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{Binding VideoInfoView.ShareNumber}" />
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{DynamicResource Share}" />
|
|
|
|
|
<StackPanel.Style>
|
|
|
|
|
<Style TargetType="{x:Type StackPanel}">
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.ShareNumber}" Value="0">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.ShareNumber}" Value="{x:Null}">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</StackPanel.Style>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<StackPanel Margin="0,0,10,0" Orientation="Horizontal">
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{Binding VideoInfoView.ReplyNumber}" />
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextGrey}"
|
|
|
|
|
Text="{DynamicResource Reply}" />
|
|
|
|
|
<StackPanel.Style>
|
|
|
|
|
<Style TargetType="{x:Type StackPanel}">
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.ReplyNumber}" Value="0">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoInfoView.ReplyNumber}" Value="{x:Null}">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</StackPanel.Style>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<StackPanel
|
|
|
|
|
Name="nameUp"
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Cursor="Hand"
|
|
|
|
|
ToolTip="{Binding VideoInfoView.UpName}">
|
|
|
|
|
<i:Interaction.Triggers>
|
|
|
|
|
<i:EventTrigger EventName="MouseLeftButtonUp">
|
|
|
|
|
<i:InvokeCommandAction Command="{Binding UpperCommand}" />
|
|
|
|
|
</i:EventTrigger>
|
|
|
|
|
</i:Interaction.Triggers>
|
|
|
|
|
|
|
|
|
|
<Image
|
|
|
|
|
Width="48"
|
|
|
|
|
Height="48"
|
|
|
|
|
Source="{Binding VideoInfoView.UpHeader}">
|
|
|
|
|
<Image.Clip>
|
|
|
|
|
<EllipseGeometry
|
|
|
|
|
Center="24,24"
|
|
|
|
|
RadiusX="24"
|
|
|
|
|
RadiusY="24" />
|
|
|
|
|
</Image.Clip>
|
|
|
|
|
</Image>
|
|
|
|
|
<TextBlock
|
|
|
|
|
Margin="0,2,0,0"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextDark}"
|
|
|
|
|
Text="{Binding VideoInfoView.UpName}"
|
|
|
|
|
TextTrimming="CharacterEllipsis" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<ScrollViewer
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Margin="0,5,0,0"
|
|
|
|
|
VerticalScrollBarVisibility="Auto">
|
|
|
|
|
<TextBox
|
|
|
|
|
Background="{x:Null}"
|
|
|
|
|
BorderBrush="{x:Null}"
|
|
|
|
|
BorderThickness="0"
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushTextDark}"
|
|
|
|
|
IsReadOnly="True"
|
|
|
|
|
Text="{Binding VideoInfoView.Description}"
|
|
|
|
|
TextWrapping="WrapWithOverflow" />
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
</Grid>
|
|
|
|
|
</DockPanel>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="1" Margin="10,10,10,10">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="auto" />
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
<RowDefinition Height="40" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<!-- 视频的section -->
|
|
|
|
|
<ListBox
|
|
|
|
|
x:Name="nameVideoSections"
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
ItemContainerStyle="{StaticResource TagItemStyle}"
|
|
|
|
|
ItemsSource="{Binding VideoSections, Mode=TwoWay}"
|
|
|
|
|
SelectionMode="Single">
|
|
|
|
|
<i:Interaction.Triggers>
|
|
|
|
|
<i:EventTrigger EventName="SelectionChanged">
|
|
|
|
|
<i:InvokeCommandAction Command="{Binding VideoSectionsCommand}" CommandParameter="{Binding ElementName=nameVideoSections, Path=SelectedItem}" />
|
|
|
|
|
</i:EventTrigger>
|
|
|
|
|
</i:Interaction.Triggers>
|
|
|
|
|
<ListBox.Style>
|
|
|
|
|
<Style BasedOn="{StaticResource TagStyle}" TargetType="{x:Type ListBox}">
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoSections.Count}" Value="0">
|
|
|
|
|
<Setter Property="Height" Value="0" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
<DataTrigger Binding="{Binding VideoSections.Count}" Value="1">
|
|
|
|
|
<Setter Property="Height" Value="0" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</ListBox.Style>
|
|
|
|
|
</ListBox>
|
|
|
|
|
|
|
|
|
|
<!-- 视频分P -->
|
|
|
|
|
<!--
|
|
|
|
|
数据虚拟化
|
|
|
|
|
VirtualizingPanel.IsVirtualizing="True"
|
|
|
|
|
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
|
|
|
|
|
VirtualizingPanel.VirtualizationMode="Recycling"
|
|
|
|
|
ScrollViewer.IsDeferredScrollingEnabled="True"
|
|
|
|
|
-->
|
|
|
|
|
<ListView
|
|
|
|
|
Name="nameVideoPages"
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
ItemsSource="{Binding ElementName=nameVideoSections, Path=SelectedItem.VideoPages}"
|
|
|
|
|
SelectionMode="Extended"
|
|
|
|
|
Style="{StaticResource ListViewStyle}"
|
|
|
|
|
VirtualizingPanel.IsVirtualizing="True"
|
|
|
|
|
VirtualizingPanel.IsVirtualizingWhenGrouping="True">
|
|
|
|
|
<i:Interaction.Triggers>
|
|
|
|
|
<i:EventTrigger EventName="SelectionChanged">
|
|
|
|
|
<i:InvokeCommandAction Command="{Binding VideoPagesCommand}" CommandParameter="{Binding ElementName=nameVideoPages, Path=SelectedItems}" />
|
|
|
|
|
</i:EventTrigger>
|
|
|
|
|
</i:Interaction.Triggers>
|
|
|
|
|
<ListView.InputBindings>
|
|
|
|
|
<KeyBinding
|
|
|
|
|
Command="{Binding KeySelectAllCommand}"
|
|
|
|
|
CommandParameter="{Binding ElementName=nameVideoSections, Path=SelectedItem}"
|
|
|
|
|
Gesture="Ctrl+A" />
|
|
|
|
|
</ListView.InputBindings>
|
|
|
|
|
<ListView.ItemsPanel>
|
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
|
<VirtualizingStackPanel />
|
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
|
</ListView.ItemsPanel>
|
|
|
|
|
<ListView.View>
|
|
|
|
|
<GridView ColumnHeaderContainerStyle="{StaticResource GridViewColumnHeaderStyle}">
|
|
|
|
|
<GridViewColumn
|
|
|
|
|
Width="50"
|
|
|
|
|
DisplayMemberBinding="{Binding Order}"
|
|
|
|
|
Header="{DynamicResource Order}" />
|
|
|
|
|
<GridViewColumn
|
|
|
|
|
Width="550"
|
|
|
|
|
DisplayMemberBinding="{Binding Name}"
|
|
|
|
|
Header="{DynamicResource Name}" />
|
|
|
|
|
<GridViewColumn
|
|
|
|
|
Width="100"
|
|
|
|
|
DisplayMemberBinding="{Binding Duration}"
|
|
|
|
|
Header="{DynamicResource Duration}" />
|
|
|
|
|
<GridViewColumn Width="100" Header="{DynamicResource AudioQuality}">
|
|
|
|
|
<GridViewColumn.CellTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<Grid>
|
|
|
|
|
<ComboBox ItemsSource="{Binding AudioQualityFormatList}" SelectedValue="{Binding AudioQualityFormat}" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</GridViewColumn.CellTemplate>
|
|
|
|
|
</GridViewColumn>
|
|
|
|
|
<GridViewColumn Width="120" Header="{DynamicResource VideoQuality}">
|
|
|
|
|
<GridViewColumn.CellTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<Grid>
|
|
|
|
|
<ComboBox
|
|
|
|
|
DisplayMemberPath="QualityFormat"
|
|
|
|
|
IsSynchronizedWithCurrentItem="True"
|
|
|
|
|
ItemsSource="{Binding VideoQualityList, Mode=TwoWay, IsAsync=True}"
|
|
|
|
|
SelectedItem="{Binding VideoQuality, Mode=TwoWay}"
|
|
|
|
|
SelectedValuePath="Quality" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</GridViewColumn.CellTemplate>
|
|
|
|
|
</GridViewColumn>
|
|
|
|
|
<GridViewColumn Width="120" Header="{DynamicResource VideoCodec}">
|
|
|
|
|
<GridViewColumn.CellTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<Grid>
|
|
|
|
|
<ComboBox
|
|
|
|
|
IsSynchronizedWithCurrentItem="True"
|
|
|
|
|
ItemsSource="{Binding VideoQuality.VideoCodecList, Mode=TwoWay}"
|
|
|
|
|
SelectedValue="{Binding VideoQuality.SelectedVideoCodec, Mode=TwoWay}" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</GridViewColumn.CellTemplate>
|
|
|
|
|
</GridViewColumn>
|
|
|
|
|
</GridView>
|
|
|
|
|
</ListView.View>
|
|
|
|
|
</ListView>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="2" Margin="0,10,0,0">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="60" />
|
|
|
|
|
<ColumnDefinition Width="80" />
|
|
|
|
|
<ColumnDefinition Width="140" />
|
|
|
|
|
<ColumnDefinition />
|
|
|
|
|
<ColumnDefinition Width="100" />
|
|
|
|
|
<ColumnDefinition Width="100" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
<CheckBox
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
|
Command="{Binding SelectAllCommand}"
|
|
|
|
|
CommandParameter="{Binding ElementName=nameVideoSections, Path=SelectedItem}"
|
|
|
|
|
Content="{DynamicResource SelectAll}"
|
|
|
|
|
Foreground="{DynamicResource BrushTextDark}"
|
|
|
|
|
IsChecked="{Binding IsSelectAll, Mode=TwoWay}"
|
|
|
|
|
Style="{StaticResource CheckBoxStyle}" />
|
|
|
|
|
<!-- 考虑将下列两个选项移入设置页面 -->
|
|
|
|
|
<!--<CheckBox Grid.Column="1" Content="自动解析" IsChecked="False" Foreground="{DynamicResource BrushTextDark}" Style="{StaticResource CheckBoxStyle}" Margin="0 10 0 0" VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
|
|
|
|
<CheckBox Grid.Column="2" Content="解析后自动下载所有" IsChecked="False" Foreground="{DynamicResource BrushTextDark}" Style="{StaticResource CheckBoxStyle}" Margin="0 10 0 0" VerticalAlignment="Top" HorizontalAlignment="Left"/>-->
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
Grid.Column="4"
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
|
Command="{Binding ParseAllVideoCommand}"
|
|
|
|
|
Content="{DynamicResource ParseVideo}"
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushText}"
|
|
|
|
|
Style="{StaticResource BtnStyle}" />
|
|
|
|
|
<Button
|
|
|
|
|
Grid.Column="5"
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
|
Command="{Binding AddToDownloadCommand}"
|
|
|
|
|
Content="{DynamicResource DownloadSelected}"
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Foreground="{DynamicResource BrushText}"
|
|
|
|
|
Style="{StaticResource BtnStyle}" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<!-- 没有数据提示 -->
|
|
|
|
|
<Image
|
|
|
|
|
Grid.Row="2"
|
|
|
|
|
Width="256"
|
|
|
|
|
Height="256"
|
|
|
|
|
Source="/DownKyi;component/Resources/no-data.png"
|
|
|
|
|
Visibility="{Binding NoDataVisibility}" />
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</UserControl>
|