summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r--win/CS/HandBrakeWPF/Views/AddPresetView.xaml10
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml163
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml.cs27
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioView.xaml139
-rw-r--r--win/CS/HandBrakeWPF/Views/PopupWindowView.xaml60
-rw-r--r--win/CS/HandBrakeWPF/Views/PopupWindowView.xaml.cs27
-rw-r--r--win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml126
-rw-r--r--win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml.cs27
-rw-r--r--win/CS/HandBrakeWPF/Views/SubtitlesView.xaml89
9 files changed, 447 insertions, 221 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml
index 5287da6d2..4431ab9ca 100644
--- a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml
@@ -49,8 +49,8 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
<RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Name -->
@@ -104,6 +104,14 @@
<controls:NumberBox Width="60" Number="{Binding CustomHeight, Mode=TwoWay}" HorizontalAlignment="Left" Margin="0,0,0,5"
AllowEmpty="True" />
</StackPanel>
+
+ <TextBlock Text="Audio:" Grid.Row="5" />
+ <Button Content="Edit Defaults..." Grid.Row="5" Grid.Column="1" HorizontalAlignment="Left" Margin="0,5,0,0" Padding="8,2"
+ cal:Message.Attach="[Event Click] = [Action EditAudioDefaults]" />
+
+ <TextBlock Text="Subtitles:" Grid.Row="6" />
+ <Button Content="Edit Defaults..." Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left" Margin="0,5,0,0" Padding="8,2"
+ cal:Message.Attach="[Event Click] = [Action EditSubtitleDefaults]" />
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml
new file mode 100644
index 000000000..835ca65a9
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml
@@ -0,0 +1,163 @@
+<UserControl x:Class="HandBrakeWPF.Views.AudioDefaultsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:Audio="clr-namespace:HandBrakeWPF.Converters.Audio"
+ xmlns:cal="http://www.caliburnproject.org"
+ xmlns:Conveters="clr-namespace:HandBrakeWPF.Converters"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"
+ xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
+ d:DesignHeight="360"
+ d:DesignWidth="770"
+ mc:Ignorable="d"
+ x:Name="audioDefaultsTab">
+
+ <UserControl.Resources>
+ <Conveters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ <Audio:AudioEncoderConverter x:Key="audioEncoderConverter" />
+ <Audio:AudioBehaviourConverter x:Key="audioBehaviourConverter" />
+ <Audio:AudioTrackDefaultBehaviourConverter x:Key="audioTrackDefaultBehaviourConverter" />
+ </UserControl.Resources>
+
+ <Grid VerticalAlignment="Top">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <!-- Row 2 -->
+ <StackPanel Grid.Row="0" Grid.Column="0" Margin="10,0,0,0"
+ Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=false, FallbackValue=Visible}">
+
+ <Grid Margin="0,0,0,0" >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <!-- Audio -->
+ <TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_TrackSelectionBehaviour}" Grid.Column="0" Grid.Row="0" Margin="0,0,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
+ <ComboBox Name="autoAudioMode" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left"
+ ItemsSource="{Binding AudioBehaviourModeList, Converter={StaticResource audioBehaviourConverter}}"
+ SelectedItem="{Binding AudioBehaviours.SelectedBehaviour, Converter={StaticResource audioBehaviourConverter}}" Width="210" Margin="0,0,5,0" />
+
+
+ <TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_TrackSettingDefaultBehaviour}" Grid.Column="0" Grid.Row="1" Margin="0,5,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
+ <ComboBox Name="audioTrackBeahaviorMode" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left"
+ ItemsSource="{Binding AudioTrackDefaultBehaviourModeList, Converter={StaticResource audioTrackDefaultBehaviourConverter}}"
+ SelectedItem="{Binding AudioBehaviours.SelectedTrackDefaultBehaviour, Converter={StaticResource audioTrackDefaultBehaviourConverter}}" Width="210" Margin="0,5,5,0" />
+ </Grid>
+
+ <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_ChooseLanguages}" Margin="5,10,0,0" />
+
+ <Grid Margin="20,5,0,0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Orientation="Horizontal">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Orientation="Vertical" Grid.Column="0">
+ <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_AvailableLanguages}" Margin="0,0,0,5"/>
+ <ListBox Name="availableLanguages" ItemsSource="{Binding AvailableLanguages}"
+ helpers:ListBoxHelper.SelectedItems="{Binding SelectedAvailableToMove}"
+ SelectionMode="Extended" Width="140" Height="120" />
+ </StackPanel>
+
+ <DockPanel Grid.Column="1" Margin="10,0,10,0">
+ <StackPanel Orientation="Vertical" VerticalAlignment="Center">
+ <Button Content="{x:Static Properties:ResourcesUI.Generic_MoveRight}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveRight]" MaxWidth="90" />
+ <Button Content="{x:Static Properties:ResourcesUI.Generic_MoveLeft}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveLeft]" MaxWidth="90" />
+ <Button Content="{x:Static Properties:ResourcesUI.Generic_Clear}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageClearAll]" Width="80"/>
+ </StackPanel>
+ </DockPanel>
+
+ <StackPanel Orientation="Vertical" Grid.Column="2">
+ <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_ChosenLangages}" Margin="0,0,0,5"/>
+ <ListBox Name="selectedLangauges" ItemsSource="{Binding AudioBehaviours.SelectedLangauges}"
+ helpers:ListBoxHelper.SelectedItems="{Binding SelectedLangaugesToMove}"
+ SelectionMode="Extended" Width="140" Height="120"
+ dd:DragDrop.DropHandler="{Binding}"
+ dd:DragDrop.IsDragSource="True"
+ dd:DragDrop.IsDropTarget="True"/>
+ </StackPanel>
+ </Grid>
+ </StackPanel>
+ </Grid>
+
+ <TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_AutoPassthruBehaviour}" FontWeight="Bold" Margin="0,10,0,5" />
+ <StackPanel Margin="10,5,0,0"
+ Orientation="Vertical">
+ <TextBlock Margin="5,0,5,0" Text="{x:Static Properties:ResourcesUI.AudioView_WhenAutoPassthru}" VerticalAlignment="Center" />
+ <TextBlock Margin="5,0,5,0" Text="{x:Static Properties:ResourcesUI.AudioView_AllowPassThruOf}" VerticalAlignment="Center" />
+ </StackPanel>
+ <StackPanel Margin="15,5,0,0"
+ Orientation="Horizontal">
+ <CheckBox Margin="0,0,5,0"
+ Content="MP3" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowMP3Pass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="AAC" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowAACPass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="AC3" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowAC3Pass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="E-AC3" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowEAC3Pass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="DTS" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowDTSPass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="DTSHD" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowDTSHDPass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="TrueHD" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowTrueHDPass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="FLAC" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowFlacPass}" />
+
+ <TextBlock Margin="15,0,5,0" Text="{x:Static Properties:ResourcesUI.AudioView_OtherwiseFallbackEncoder}" />
+
+ <ComboBox VerticalAlignment="Center" Width="105" Height="22" Margin="5,0,5,0">
+ <ComboBox.SelectedItem>
+ <MultiBinding Converter="{StaticResource audioEncoderConverter}">
+ <Binding Path="Task.AllowedPassthruOptions.AudioEncoderFallback" />
+ </MultiBinding>
+ </ComboBox.SelectedItem>
+ <ComboBox.ItemsSource>
+ <MultiBinding Converter="{StaticResource audioEncoderConverter}" ConverterParameter="True">
+ <Binding Path="DataContext.AudioEncoders" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
+ <Binding Path="DataContext.Task" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
+ </MultiBinding>
+ </ComboBox.ItemsSource>
+ </ComboBox>
+
+ </StackPanel>
+
+ </StackPanel>
+
+
+ </Grid>
+</UserControl>
diff --git a/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml.cs b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml.cs
new file mode 100644
index 000000000..7734f706c
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml.cs
@@ -0,0 +1,27 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AudioDefaultsView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for AudioDefaultsView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Views
+{
+ using System.Windows.Controls;
+
+ /// <summary>
+ /// Interaction logic for AudioDefaultsView.xaml
+ /// </summary>
+ public partial class AudioDefaultsView : UserControl
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AudioDefaultsView"/> class.
+ /// </summary>
+ public AudioDefaultsView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml
index a0fa960f5..ada1069ac 100644
--- a/win/CS/HandBrakeWPF/Views/AudioView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml
@@ -10,10 +10,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:splitButton="clr-namespace:HandBrakeWPF.Controls.SplitButton"
xmlns:controls="clr-namespace:HandBrakeWPF.Controls"
- xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
- d:DesignHeight="800"
- d:DesignWidth="750"
+ d:DesignHeight="500"
+ d:DesignWidth="770"
mc:Ignorable="d"
x:Name="audioTab">
@@ -22,8 +21,6 @@
<Conveters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
<Conveters:BooleanToHiddenVisibilityConverter x:Key="boolToHiddenVisConverter" />
<Audio:AudioEncoderConverter x:Key="audioEncoderConverter" />
- <Audio:AudioBehaviourConverter x:Key="audioBehaviourConverter" />
- <Audio:AudioTrackDefaultBehaviourConverter x:Key="audioTrackDefaultBehaviourConverter" />
<Audio:AudioRateTypeConverter x:Key="audioRateTypeConverter" />
</UserControl.Resources>
@@ -56,7 +53,6 @@
/>
<!-- Row 1 -->
-
<Grid Grid.Row="1" Margin="10,5,10,0" Grid.Column="0"
Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}">
<Grid.ColumnDefinitions>
@@ -99,7 +95,6 @@
</Grid>
<!-- Row 2 -->
-
<ListBox Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch"
Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}"
Margin="10,10,10,10"
@@ -280,133 +275,9 @@
</ListBox.ItemTemplate>
</ListBox>
- <StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="10,0,10,0"
- Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=false, FallbackValue=Visible}">
-
- <Grid Margin="5,0,0,0" >
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
-
- <!-- Audio -->
- <TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_TrackSelectionBehaviour}" Grid.Column="0" Grid.Row="0" Margin="0,0,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
- <ComboBox Name="autoAudioMode" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left"
- ItemsSource="{Binding AudioBehaviourModeList, Converter={StaticResource audioBehaviourConverter}}"
- SelectedItem="{Binding AudioBehaviours.SelectedBehaviour, Converter={StaticResource audioBehaviourConverter}}" Width="210" Margin="0,0,5,0" />
-
-
- <TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_TrackSettingDefaultBehaviour}" Grid.Column="0" Grid.Row="1" Margin="0,5,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
- <ComboBox Name="audioTrackBeahaviorMode" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left"
- ItemsSource="{Binding AudioTrackDefaultBehaviourModeList, Converter={StaticResource audioTrackDefaultBehaviourConverter}}"
- SelectedItem="{Binding AudioBehaviours.SelectedTrackDefaultBehaviour, Converter={StaticResource audioTrackDefaultBehaviourConverter}}" Width="210" Margin="0,5,5,0" />
- </Grid>
-
- <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_ChooseLanguages}" Margin="5,10,0,0" />
-
- <Grid Margin="20,5,0,0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
-
- <StackPanel Orientation="Horizontal">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
-
- <StackPanel Orientation="Vertical" Grid.Column="0">
- <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_AvailableLanguages}" Margin="0,0,0,5"/>
- <ListBox Name="availableLanguages" ItemsSource="{Binding AvailableLanguages}"
- helpers:ListBoxHelper.SelectedItems="{Binding SelectedAvailableToMove}"
- SelectionMode="Extended" Width="140" Height="120" />
- </StackPanel>
-
- <DockPanel Grid.Column="1" Margin="10,0,10,0">
- <StackPanel Orientation="Vertical" VerticalAlignment="Center">
- <Button Content="{x:Static Properties:ResourcesUI.Generic_MoveRight}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveRight]" MaxWidth="90" />
- <Button Content="{x:Static Properties:ResourcesUI.Generic_MoveLeft}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveLeft]" MaxWidth="90" />
- <Button Content="{x:Static Properties:ResourcesUI.Generic_Clear}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageClearAll]" Width="80"/>
- </StackPanel>
- </DockPanel>
-
- <StackPanel Orientation="Vertical" Grid.Column="2">
- <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_ChosenLangages}" Margin="0,0,0,5"/>
- <ListBox Name="selectedLangauges" ItemsSource="{Binding AudioBehaviours.SelectedLangauges}"
- helpers:ListBoxHelper.SelectedItems="{Binding SelectedLangaugesToMove}"
- SelectionMode="Extended" Width="140" Height="120"
- dd:DragDrop.DropHandler="{Binding}"
- dd:DragDrop.IsDragSource="True"
- dd:DragDrop.IsDropTarget="True"/>
- </StackPanel>
- </Grid>
- </StackPanel>
- </Grid>
-
- <TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_AutoPassthruBehaviour}" FontWeight="Bold" Margin="0,10,0,5" />
- <StackPanel Margin="10,5,0,0"
- Orientation="Vertical">
- <TextBlock Margin="5,0,5,0" Text="{x:Static Properties:ResourcesUI.AudioView_WhenAutoPassthru}" VerticalAlignment="Center" />
- <TextBlock Margin="5,0,5,0" Text="{x:Static Properties:ResourcesUI.AudioView_AllowPassThruOf}" VerticalAlignment="Center" />
- </StackPanel>
- <StackPanel Margin="15,5,0,0"
- Orientation="Horizontal">
- <CheckBox Margin="0,0,5,0"
- Content="MP3" VerticalAlignment="Center"
- IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowMP3Pass}" />
- <CheckBox Margin="0,0,5,0"
- Content="AAC" VerticalAlignment="Center"
- IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowAACPass}" />
- <CheckBox Margin="0,0,5,0"
- Content="AC3" VerticalAlignment="Center"
- IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowAC3Pass}" />
- <CheckBox Margin="0,0,5,0"
- Content="E-AC3" VerticalAlignment="Center"
- IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowEAC3Pass}" />
- <CheckBox Margin="0,0,5,0"
- Content="DTS" VerticalAlignment="Center"
- IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowDTSPass}" />
- <CheckBox Margin="0,0,5,0"
- Content="DTSHD" VerticalAlignment="Center"
- IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowDTSHDPass}" />
- <CheckBox Margin="0,0,5,0"
- Content="TrueHD" VerticalAlignment="Center"
- IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowTrueHDPass}" />
- <CheckBox Margin="0,0,5,0"
- Content="FLAC" VerticalAlignment="Center"
- IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowFlacPass}" />
-
- <TextBlock Margin="15,0,5,0" Text="{x:Static Properties:ResourcesUI.AudioView_OtherwiseFallbackEncoder}" />
-
- <ComboBox VerticalAlignment="Center" Width="105" Height="22" Margin="5,0,5,0">
- <ComboBox.SelectedItem>
- <MultiBinding Converter="{StaticResource audioEncoderConverter}">
- <Binding Path="Task.AllowedPassthruOptions.AudioEncoderFallback" />
- </MultiBinding>
- </ComboBox.SelectedItem>
- <ComboBox.ItemsSource>
- <MultiBinding Converter="{StaticResource audioEncoderConverter}" ConverterParameter="True">
- <Binding Path="DataContext.AudioEncoders" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
- <Binding Path="DataContext.Task" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
- </MultiBinding>
- </ComboBox.ItemsSource>
- </ComboBox>
-
- </StackPanel>
-
- </StackPanel>
-
+ <!-- Audio Defaults -->
+ <ContentControl x:Name="AudioDefaultsViewModel" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,0,0"
+ Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=false, FallbackValue=Visible}" />
</Grid>
</UserControl>
diff --git a/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml b/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml
new file mode 100644
index 000000000..2efe3fcd7
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml
@@ -0,0 +1,60 @@
+<Window x:Class="HandBrakeWPF.Views.PopupWindowView"
+ 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:cal="http://www.caliburnproject.org"
+ xmlns:properties="clr-namespace:HandBrakeWPF.Properties"
+ xmlns:converters="clr-namespace:HandBrakeWPF.Converters"
+ d:DesignHeight="250"
+ d:DesignWidth="600"
+ Title="{Binding Title}"
+ ResizeMode="NoResize"
+ SizeToContent="WidthAndHeight"
+ WindowStartupLocation="CenterScreen"
+ TextOptions.TextFormattingMode="Display"
+ mc:Ignorable="d">
+
+ <Window.Resources>
+ <converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ </Window.Resources>
+
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <TextBlock Text="{Binding WindowTitle}" FontSize="26" FontFamily="Segoe UI Light" Margin="10,10,10,5" Grid.Row="0" />
+ <TextBlock Text="{Binding SubText}" Margin="10,0,0,15" Grid.Row="1" Visibility="{Binding SubTextVisible, Converter={StaticResource boolToVisConverter}}" />
+
+ <ContentControl x:Name="ContentViewModel" VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Row="2" Margin="0,0,10,10" />
+
+ <Grid Grid.Row="3"
+ Margin="0,20,0,0">
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <Button Grid.Column="1"
+ Margin="0,5,10,10"
+ cal:Message.Attach="[Event Click] = [Action Cancel]"
+ Content="{x:Static properties:ResourcesUI.Generic_Cancel}"
+ IsCancel="True"
+ Padding="8,2" />
+ <Button Grid.Column="2"
+ Margin="0,5,10,10"
+ cal:Message.Attach="[Event Click] = [Action Save]"
+ Content="{x:Static properties:ResourcesUI.Generic_Save}"
+ IsDefault="True"
+ Padding="8,2" />
+ </Grid>
+
+ </Grid>
+
+</Window>
diff --git a/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml.cs b/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml.cs
new file mode 100644
index 000000000..6b806e36c
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml.cs
@@ -0,0 +1,27 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PopupWindowView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for PopupWindowView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Views
+{
+ using System.Windows;
+
+ /// <summary>
+ /// Interaction logic for PopupWindowView.xaml
+ /// </summary>
+ public partial class PopupWindowView : Window
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PopupWindowView"/> class.
+ /// </summary>
+ public PopupWindowView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml
new file mode 100644
index 000000000..d15c02813
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml
@@ -0,0 +1,126 @@
+<UserControl x:Class="HandBrakeWPF.Views.SubtitlesDefaultsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:cal="http://www.caliburnproject.org"
+ xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"
+ xmlns:subtitles="clr-namespace:HandBrakeWPF.Converters.Subtitles"
+ xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
+ d:DesignHeight="350"
+ d:DesignWidth="500"
+ mc:Ignorable="d"
+ x:Name="subTab">
+ <UserControl.Resources>
+ <Converters:BooleanToVisibilityConverter x:Key="booleanToVisConverter" />
+ <subtitles:SubtitleBehaviourConverter x:Key="subtitleBehaviourConverter" />
+ <subtitles:SubtitleBurnInBehaviourConverter x:Key="subtitleBurnInBehaviourConverter" />
+
+ <Style x:Key="LongToolTip" TargetType="TextBlock">
+ <Setter Property="Width" Value="400" />
+ <Setter Property="TextWrapping" Value="Wrap" />
+ <Setter Property="ToolTipService.ShowDuration" Value="20000" />
+ <Setter Property="Margin" Value="0,2,0,2" />
+ </Style>
+
+ </UserControl.Resources>
+
+ <Grid VerticalAlignment="Top">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+
+ <!-- Row 0 -->
+ <StackPanel Grid.Row="0" Grid.Column="0" Margin="10,0,0,0"
+ Visibility="{Binding ShowDefaultsPanel, Converter={StaticResource booleanToVisConverter}, ConverterParameter=false}">
+
+ <Grid Margin="5,0,0,0" >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <!-- Subtitles -->
+ <TextBlock Text="{x:Static Properties:ResourcesUI.SubtitlesView_TrackSelectionBehaviour}" Grid.Column="2" Grid.Row="0" Margin="0,0,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
+ <ComboBox Name="autoSubtitleMode" Grid.Column="3" Grid.Row="0" HorizontalAlignment="Left"
+ ItemsSource="{Binding SubtitleBehaviourModeList, Converter={StaticResource subtitleBehaviourConverter}}"
+ SelectedItem="{Binding SubtitleBehaviours.SelectedBehaviour, Converter={StaticResource subtitleBehaviourConverter}}" Width="210" Margin="0,0,5,0" />
+ <TextBlock Text="{x:Static Properties:ResourcesUI.SubtitlesView_BurnInBehaviour}" Grid.Column="2" Grid.Row="1" Margin="0,5,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
+ <ComboBox Name="burninBehaviour" Grid.Column="3" Grid.Row="1" HorizontalAlignment="Left"
+ ItemsSource="{Binding SubtitleBurnInBehaviourModeList, Converter={StaticResource subtitleBurnInBehaviourConverter}}"
+ SelectedItem="{Binding SubtitleBehaviours.SelectedBurnInBehaviour, Converter={StaticResource subtitleBurnInBehaviourConverter}}" Width="210" Margin="0,5,5,0">
+ <ComboBox.ToolTip>
+ <TextBlock Style="{StaticResource LongToolTip}" Text="{x:Static Properties:Resources.Subtitles_BurnInBehaviourModes}" />
+ </ComboBox.ToolTip>
+ </ComboBox>
+ <CheckBox Content="{x:Static Properties:ResourcesUI.SubtitlesView_AddCC}" Grid.Column="3" Grid.Row="2" Margin="0,5,0,0"
+ HorizontalAlignment="Left" IsChecked="{Binding SubtitleBehaviours.AddClosedCaptions}"/>
+ <CheckBox Content="{x:Static Properties:ResourcesUI.SubtitlesView_AddForeignAudioSearch}" Grid.Column="3" Grid.Row="3" Margin="0,5,0,0"
+ HorizontalAlignment="Left" IsChecked="{Binding SubtitleBehaviours.AddForeignAudioScanTrack}"/>
+ </Grid>
+
+ <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_ChooseLanguages}" Margin="5,15,0,0"/>
+
+ <Grid Margin="20,5,0,0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Orientation="Horizontal">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Orientation="Vertical" Grid.Column="0">
+ <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_AvailableLanguages}" Margin="0,0,0,5"/>
+ <ListBox Name="availableLanguages" ItemsSource="{Binding AvailableLanguages}"
+ helpers:ListBoxHelper.SelectedItems="{Binding SelectedAvailableToMove}"
+ SelectionMode="Extended" Width="140" Height="120" />
+ </StackPanel>
+
+ <DockPanel Grid.Column="1" Margin="10,0,10,0">
+ <StackPanel Orientation="Vertical" VerticalAlignment="Center">
+ <Button Content="{x:Static Properties:ResourcesUI.Generic_MoveRight}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveRight]" MaxWidth="90" />
+ <Button Content="{x:Static Properties:ResourcesUI.Generic_MoveLeft}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveLeft]" MaxWidth="90" />
+ <Button Content="{x:Static Properties:ResourcesUI.Generic_Clear}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageClearAll]" Width="80"/>
+ </StackPanel>
+ </DockPanel>
+
+ <StackPanel Orientation="Vertical" Grid.Column="2">
+ <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_ChosenLangages}" Margin="0,0,0,5"/>
+ <ListBox Name="selectedLangauges" ItemsSource="{Binding SubtitleBehaviours.SelectedLangauges}"
+ helpers:ListBoxHelper.SelectedItems="{Binding SelectedLangaugesToMove}"
+ SelectionMode="Extended" Width="140" Height="120"
+ dd:DragDrop.DropHandler="{Binding}"
+ dd:DragDrop.IsDragSource="True"
+ dd:DragDrop.IsDropTarget="True"/>
+ </StackPanel>
+ </Grid>
+ </StackPanel>
+ </Grid>
+
+ </StackPanel>
+
+
+ </Grid>
+</UserControl>
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml.cs b/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml.cs
new file mode 100644
index 000000000..adb6a3ef4
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml.cs
@@ -0,0 +1,27 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SubtitlesDefaultsView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for SubtitlesDefaultsView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Views
+{
+ using System.Windows.Controls;
+
+ /// <summary>
+ /// Interaction logic for SubtitlesDefaultsView.xaml
+ /// </summary>
+ public partial class SubtitlesDefaultsView : UserControl
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SubtitlesDefaultsView"/> class.
+ /// </summary>
+ public SubtitlesDefaultsView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
index cc574227b..099e21271 100644
--- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
+++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
@@ -9,8 +9,6 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:HandBrakeWPF.Controls"
xmlns:splitButton="clr-namespace:HandBrakeWPF.Controls.SplitButton"
- xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"
- xmlns:subtitles="clr-namespace:HandBrakeWPF.Converters.Subtitles"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
d:DesignHeight="350"
d:DesignWidth="500"
@@ -18,8 +16,6 @@
x:Name="subTab">
<UserControl.Resources>
<Converters:BooleanToVisibilityConverter x:Key="booleanToVisConverter" />
- <subtitles:SubtitleBehaviourConverter x:Key="subtitleBehaviourConverter" />
- <subtitles:SubtitleBurnInBehaviourConverter x:Key="subtitleBurnInBehaviourConverter" />
<Style x:Key="LongToolTip" TargetType="TextBlock">
<Setter Property="Width" Value="400" />
@@ -284,88 +280,9 @@
</ListBox.ItemTemplate>
</ListBox>
- <StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="10,10,10,10"
- Visibility="{Binding ShowDefaultsPanel, Converter={StaticResource booleanToVisConverter}, ConverterParameter=false}">
-
- <Grid Margin="5,0,0,0" >
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
-
- <!-- Subtitles -->
- <TextBlock Text="{x:Static Properties:ResourcesUI.SubtitlesView_TrackSelectionBehaviour}" Grid.Column="2" Grid.Row="0" Margin="0,0,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
- <ComboBox Name="autoSubtitleMode" Grid.Column="3" Grid.Row="0" HorizontalAlignment="Left"
- ItemsSource="{Binding SubtitleBehaviourModeList, Converter={StaticResource subtitleBehaviourConverter}}"
- SelectedItem="{Binding SubtitleBehaviours.SelectedBehaviour, Converter={StaticResource subtitleBehaviourConverter}}" Width="210" Margin="0,0,5,0" />
- <TextBlock Text="{x:Static Properties:ResourcesUI.SubtitlesView_BurnInBehaviour}" Grid.Column="2" Grid.Row="1" Margin="0,5,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
- <ComboBox Name="burninBehaviour" Grid.Column="3" Grid.Row="1" HorizontalAlignment="Left"
- ItemsSource="{Binding SubtitleBurnInBehaviourModeList, Converter={StaticResource subtitleBurnInBehaviourConverter}}"
- SelectedItem="{Binding SubtitleBehaviours.SelectedBurnInBehaviour, Converter={StaticResource subtitleBurnInBehaviourConverter}}" Width="210" Margin="0,5,5,0">
- <ComboBox.ToolTip>
- <TextBlock Style="{StaticResource LongToolTip}" Text="{x:Static Properties:Resources.Subtitles_BurnInBehaviourModes}" />
- </ComboBox.ToolTip>
- </ComboBox>
- <CheckBox Content="{x:Static Properties:ResourcesUI.SubtitlesView_AddCC}" Grid.Column="3" Grid.Row="2" Margin="0,5,0,0"
- HorizontalAlignment="Left" IsChecked="{Binding SubtitleBehaviours.AddClosedCaptions}"/>
- <CheckBox Content="{x:Static Properties:ResourcesUI.SubtitlesView_AddForeignAudioSearch}" Grid.Column="3" Grid.Row="3" Margin="0,5,0,0"
- HorizontalAlignment="Left" IsChecked="{Binding SubtitleBehaviours.AddForeignAudioScanTrack}"/>
- </Grid>
-
- <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_ChooseLanguages}" Margin="5,15,0,0"/>
-
- <Grid Margin="20,5,0,0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
-
- <StackPanel Orientation="Horizontal">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
-
- <StackPanel Orientation="Vertical" Grid.Column="0">
- <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_AvailableLanguages}" Margin="0,0,0,5"/>
- <ListBox Name="availableLanguages" ItemsSource="{Binding AvailableLanguages}"
- helpers:ListBoxHelper.SelectedItems="{Binding SelectedAvailableToMove}"
- SelectionMode="Extended" Width="140" Height="120" />
- </StackPanel>
-
- <DockPanel Grid.Column="1" Margin="10,0,10,0">
- <StackPanel Orientation="Vertical" VerticalAlignment="Center">
- <Button Content="{x:Static Properties:ResourcesUI.Generic_MoveRight}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveRight]" MaxWidth="90" />
- <Button Content="{x:Static Properties:ResourcesUI.Generic_MoveLeft}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveLeft]" MaxWidth="90" />
- <Button Content="{x:Static Properties:ResourcesUI.Generic_Clear}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageClearAll]" Width="80"/>
- </StackPanel>
- </DockPanel>
-
- <StackPanel Orientation="Vertical" Grid.Column="2">
- <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_ChosenLangages}" Margin="0,0,0,5"/>
- <ListBox Name="selectedLangauges" ItemsSource="{Binding SubtitleBehaviours.SelectedLangauges}"
- helpers:ListBoxHelper.SelectedItems="{Binding SelectedLangaugesToMove}"
- SelectionMode="Extended" Width="140" Height="120"
- dd:DragDrop.DropHandler="{Binding}"
- dd:DragDrop.IsDragSource="True"
- dd:DragDrop.IsDropTarget="True"/>
- </StackPanel>
- </Grid>
- </StackPanel>
- </Grid>
-
- </StackPanel>
+ <!-- Audio Defaults -->
+ <ContentControl x:Name="SubtitleDefaultsViewModel" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,0,0"
+ Visibility="{Binding ShowDefaultsPanel, Converter={StaticResource booleanToVisConverter}, ConverterParameter=false, FallbackValue=Visible}" />
</Grid>