You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
downkyi/DownKyi/Views/Dialogs/ViewDownloadSetter.xaml

322 lines
14 KiB

<UserControl
x:Class="DownKyi.Views.Dialogs.ViewDownloadSetter"
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">
<prism:Dialog.WindowStyle>
<Style TargetType="Window">
<Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterOwner" />
<Setter Property="ResizeMode" Value="NoResize" />
<Setter Property="ShowInTaskbar" Value="False" />
<Setter Property="SizeToContent" Value="WidthAndHeight" />
<Setter Property="WindowStyle" Value="None" />
</Style>
</prism:Dialog.WindowStyle>
<Border BorderBrush="{DynamicResource BrushWindowBorder}" BorderThickness="1,1,1,0.6">
<Grid Background="{DynamicResource BrushBackground}">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid
Grid.Row="0"
Background="{DynamicResource BrushCaptionBackground}"
KeyboardNavigation.TabNavigation="None">
<!--<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<i:InvokeCommandAction Command="{Binding DragMoveCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>-->
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="50" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="50" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Column="0"
Margin="10,0"
VerticalAlignment="Center"
FontSize="12"
Foreground="{DynamicResource BrushCaptionForeground}"
Text="{Binding Title}" />
<Button
Grid.Column="4"
Command="{Binding CloseCommand}"
Style="{StaticResource CloseBtnStyle}"
ToolTip="{DynamicResource Close}">
<Path
Width="{Binding CloseIcon.Width}"
Height="{Binding CloseIcon.Height}"
Data="{Binding CloseIcon.Data}"
Fill="{Binding CloseIcon.Fill}"
Stretch="UniformToFill" />
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseEnter">
<i:InvokeCommandAction Command="{Binding CloseEnterCommand}" />
</i:EventTrigger>
<i:EventTrigger EventName="MouseLeave">
<i:InvokeCommandAction Command="{Binding CloseLeaveCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</Grid>
<Grid
Grid.Row="1"
MinWidth="600"
Margin="15,10">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Margin="0,30,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ContentControl
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<Path
Width="{Binding CloudDownloadIcon.Width}"
Height="{Binding CloudDownloadIcon.Height}"
Data="{Binding CloudDownloadIcon.Data}"
Fill="{Binding CloudDownloadIcon.Fill}"
Stretch="UniformToFill" />
</ContentControl>
<TextBlock
Grid.Column="2"
VerticalAlignment="Center"
FontSize="18"
Foreground="{DynamicResource BrushPrimary}"
Text="&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;" />
<ContentControl
Grid.Column="3"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<Path
Width="{Binding FolderIcon.Width}"
Height="{Binding FolderIcon.Height}"
Data="{Binding FolderIcon.Data}"
Fill="{Binding FolderIcon.Fill}"
Stretch="UniformToFill" />
</ContentControl>
</Grid>
<Grid Grid.Row="1" Margin="0,30,0,0">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Row="0"
Grid.Column="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
Text="{DynamicResource Location}" />
<ComboBox
Grid.Row="0"
Grid.Column="1"
Height="25"
Margin="10,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
ItemsSource="{Binding DirectoryList, Mode=TwoWay}"
SelectedValue="{Binding Directory, Mode=TwoWay}" />
<Button
Grid.Row="0"
Grid.Column="2"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding BrowseCommand}"
Content="{DynamicResource Browse}"
FontSize="12"
Foreground="{DynamicResource BrushText}"
Style="{StaticResource BtnStyle}" />
<StackPanel
Grid.Row="1"
Grid.Column="1"
Margin="10,10,10,0"
Orientation="Horizontal">
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Style.Triggers>
<DataTrigger Binding="{Binding Directory}" Value="">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
<DataTrigger Binding="{Binding Directory}" Value="{x:Null}">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<TextBlock
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
Text="{Binding DriveName}" />
<TextBlock
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
Text="{DynamicResource HardDiskFreeSpace}" />
<TextBlock
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
Text="{Binding DriveNameFreeSpace}" />
</StackPanel>
</Grid>
<Grid Grid.Row="2" Margin="0,30,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="75" />
<ColumnDefinition Width="75" />
<ColumnDefinition Width="75" />
<ColumnDefinition Width="75" />
<ColumnDefinition Width="75" />
<ColumnDefinition Width="75" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Column="0"
VerticalAlignment="Center"
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
Text="{DynamicResource DownloadContent}" />
<CheckBox
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding DownloadAllCommand}"
Content="{DynamicResource DownloadAll}"
Foreground="{DynamicResource BrushTextDark}"
IsChecked="{Binding DownloadAll, Mode=TwoWay}"
Style="{StaticResource CheckBoxStyle}" />
<CheckBox
Grid.Column="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding DownloadAudioCommand}"
Content="{DynamicResource DownloadAudio}"
Foreground="{DynamicResource BrushTextDark}"
IsChecked="{Binding DownloadAudio, Mode=TwoWay}"
Style="{StaticResource CheckBoxStyle}" />
<CheckBox
Grid.Column="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding DownloadVideoCommand}"
Content="{DynamicResource DownloadVideo}"
Foreground="{DynamicResource BrushTextDark}"
IsChecked="{Binding DownloadVideo, Mode=TwoWay}"
Style="{StaticResource CheckBoxStyle}" />
<CheckBox
Grid.Column="4"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding DownloadDanmakuCommand}"
Content="{DynamicResource DownloadDanmaku}"
Foreground="{DynamicResource BrushTextDark}"
IsChecked="{Binding DownloadDanmaku, Mode=TwoWay}"
Style="{StaticResource CheckBoxStyle}" />
<CheckBox
Grid.Column="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding DownloadSubtitleCommand}"
Content="{DynamicResource DownloadSubtitle}"
Foreground="{DynamicResource BrushTextDark}"
IsChecked="{Binding DownloadSubtitle, Mode=TwoWay}"
Style="{StaticResource CheckBoxStyle}" />
<CheckBox
Grid.Column="6"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding DownloadCoverCommand}"
Content="{DynamicResource DownloadCover}"
Foreground="{DynamicResource BrushTextDark}"
IsChecked="{Binding DownloadCover, Mode=TwoWay}"
Style="{StaticResource CheckBoxStyle}" />
</Grid>
<Grid Grid.Row="3" Margin="0,30,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="100" />
<ColumnDefinition Width="100" />
</Grid.ColumnDefinitions>
<CheckBox
Grid.Column="0"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Content="{DynamicResource IsDefaultDownloadDirectory}"
Foreground="{DynamicResource BrushTextDark}"
IsChecked="{Binding IsDefaultDownloadDirectory, Mode=TwoWay}"
Style="{StaticResource CheckBoxStyle}"
ToolTip="{DynamicResource IsDefaultDownloadDirectoryTip}" />
<Button
Grid.Column="2"
Width="75"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Command="{Binding DownloadCommand}"
Content="{DynamicResource Download}"
FontSize="12"
Foreground="{DynamicResource BrushText}"
Style="{StaticResource BtnStyle}" />
<Button
Grid.Column="3"
Width="75"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Command="{Binding CloseCommand}"
Content="{DynamicResource Cancel}"
FontSize="12"
Foreground="{DynamicResource BrushText}"
Style="{StaticResource BtnStyle}" />
</Grid>
</Grid>
</Grid>
</Border>
</UserControl>