summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-03-01 19:01:54 +0000
committersr55 <[email protected]>2012-03-01 19:01:54 +0000
commit2efd8f264113bcd3d8c39a1f408c16cc27100aa7 (patch)
treeaedb1cc0017839a91bdc80c46819332b76a975f9 /win/CS/HandBrakeWPF/Views
parent5bb4078641106578dd0a8e1eab6e1cfbc814067e (diff)
WinGui: (WPF) Further work wiring up the new UI.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4479 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r--win/CS/HandBrakeWPF/Views/AdvancedView.xaml47
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioView.xaml19
-rw-r--r--win/CS/HandBrakeWPF/Views/ChaptersView.xaml3
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml1
-rw-r--r--win/CS/HandBrakeWPF/Views/QueueView.xaml9
-rw-r--r--win/CS/HandBrakeWPF/Views/SubtitlesView.xaml6
-rw-r--r--win/CS/HandBrakeWPF/Views/VideoView.xaml12
7 files changed, 76 insertions, 21 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AdvancedView.xaml b/win/CS/HandBrakeWPF/Views/AdvancedView.xaml
index ce91077ba..3fad3c54b 100644
--- a/win/CS/HandBrakeWPF/Views/AdvancedView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AdvancedView.xaml
@@ -2,10 +2,15 @@
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"
- mc:Ignorable="d"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300"
x:Name="advancedView">
+ <UserControl.Resources>
+ <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ <Converters:EnumComboConverter x:Key="x264DisplayConverter" />
+ </UserControl.Resources>
+
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -15,8 +20,42 @@
<TextBlock Text="Advanced" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>
- <TextBox Grid.Row="2" Margin="10" Text="{Binding Query}"
- VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
+ <Grid Grid.Row="1" Margin="10,10,0,0" Visibility="{Binding DisplayX264Options, Converter={StaticResource boolToVisConverter}}">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+
+ <StackPanel Grid.Row="0" Orientation="Vertical" Margin="0,0,0,10">
+
+ <TextBlock Text="X264 Advanced Options:" Margin="0,0,0,5" FontWeight="Bold" VerticalAlignment="Center" />
+
+ <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,0,10">
+ <TextBlock Text="Preset:" VerticalAlignment="Center" />
+ <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"
+ ItemsSource="{Binding X264Presets, Converter={StaticResource x264DisplayConverter}}"
+ SelectedItem="{Binding X264Preset, Converter={StaticResource x264DisplayConverter}}"/>
+
+ <TextBlock Text="Profile:" VerticalAlignment="Center" />
+ <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"
+ ItemsSource="{Binding X264Profiles, Converter={StaticResource x264DisplayConverter}}"
+ SelectedItem="{Binding X264Profile, Converter={StaticResource x264DisplayConverter}}"/>
+
+
+ <TextBlock Text="Tune:" VerticalAlignment="Center" />
+ <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"
+ ItemsSource="{Binding X264Tunes, Converter={StaticResource x264DisplayConverter}}"
+ SelectedItem="{Binding X264Tune, Converter={StaticResource x264DisplayConverter}}"/>
+ </StackPanel>
+ </StackPanel>
+
+ </Grid>
+
+ <StackPanel Grid.Row="2" Margin="10" Height="100" VerticalAlignment="Top" >
+ <TextBlock Text="Advanced Query" Margin="0,0,0,5" FontWeight="Bold" VerticalAlignment="Center" />
+ <TextBox Text="{Binding Query}"
+ VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="150" TextWrapping="Wrap" />
+ </StackPanel>
</Grid>
</UserControl>
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml
index c14d81b2d..25f6cd0be 100644
--- a/win/CS/HandBrakeWPF/Views/AudioView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml
@@ -6,7 +6,12 @@
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:cal="http://www.caliburnproject.org"
xmlns:NumericUpDown="clr-namespace:EagleBoost.Wpf.Presentation.Controls.NumericUpDown;assembly=EagleBoost.Wpf.Presentation"
- mc:Ignorable="d">
+ xmlns:Conveters="clr-namespace:HandBrakeWPF.Converters"
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop" mc:Ignorable="d">
+
+ <UserControl.Resources>
+ <Conveters:EnumComboConverter x:Key="enumComboConverter" />
+ </UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -25,7 +30,9 @@
</Grid>
<ListBox Grid.Row="2" ItemsSource="{Binding AudioTracks}"
- SelectionMode="Extended" Background="LightGray" Margin="10,10,10,10">
+ SelectionMode="Extended" Background="LightGray" Margin="10,10,10,10"
+ dd:DragDrop.IsDragSource="True" dd:DragDrop.IsDropTarget="True"
+ dd:DragDrop.DropHandler="{Binding}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
@@ -76,8 +83,8 @@
SelectedItem="{Binding ScannedTrack}"/>
<TextBlock Text="Codec" FontWeight="Bold" Grid.Column="2" VerticalAlignment="Center" />
<ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"
- ItemsSource="{Binding DataContext.AudioEncoders, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
- SelectedItem="{Binding Encoder}"/>
+ ItemsSource="{Binding DataContext.AudioEncoders, Converter={StaticResource enumComboConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
+ SelectedItem="{Binding Encoder, Converter={StaticResource enumComboConverter}}"/>
<TextBlock Text="Bitrate" FontWeight="Bold" Grid.Column="4" VerticalAlignment="Center" />
<ComboBox Width="70" Grid.Column="5" Margin="5,0,5,0" Height="22"
ItemsSource="{Binding DataContext.AudioBitrates, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
@@ -90,8 +97,8 @@
<!-- Row 2-->
<TextBlock Text="Mixdown" FontWeight="Bold" Grid.Column="0" Grid.Row="1" VerticalAlignment="Center"/>
<ComboBox Width="100" Grid.Column="1" Margin="5,0,5,0" Grid.Row="1" Height="22"
- ItemsSource="{Binding DataContext.AudioMixdowns, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
- SelectedItem="{Binding MixDown}"/>
+ ItemsSource="{Binding DataContext.AudioMixdowns, Converter={StaticResource enumComboConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
+ SelectedItem="{Binding MixDown, Converter={StaticResource enumComboConverter}}"/>
<TextBlock Text="DRC" FontWeight="Bold" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
<NumericUpDown:NumericUpDown Width="45" Value="{Binding DRC}" Grid.Row="1" Grid.Column="3" HorizontalAlignment="Left" Margin="5,0,5,0" />
<TextBlock Text="Gain" FontWeight="Bold" Grid.Column="4" Grid.Row="1" VerticalAlignment="Center"/>
diff --git a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml
index 1c46e57ee..f3d6d1ed8 100644
--- a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml
+++ b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml
@@ -27,7 +27,8 @@
<DataGrid Grid.Row="2" Margin="10" ItemsSource="{Binding Chapters}"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" AutoGenerateColumns="False"
- CanUserSortColumns="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False">
+ CanUserSortColumns="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False"
+ CanUserAddRows="False" CanUserDeleteRows="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Chapter Number" Width="150" Binding="{Binding ChapterNumber}" IsReadOnly="True" />
<DataGridTextColumn Header="Chapter Name" Width="*" Binding="{Binding ChapterName}" IsReadOnly="False" />
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index 1ec10a830..37a11a016 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -4,6 +4,7 @@
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" Title="{Data:Binding Path=WindowTitle}" Height="655" Width="1015" FontSize="11" Background="#FFF0F0F0"
+ Micro:Message.Attach="[Event Loaded] = [Action Load]"
AllowDrop="True">
<i:Interaction.Triggers>
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml
index 658b3d0c1..982b8f1ec 100644
--- a/win/CS/HandBrakeWPF/Views/QueueView.xaml
+++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml
@@ -4,7 +4,8 @@
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:Converters="clr-namespace:HandBrakeWPF.Converters"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" mc:Ignorable="d" Title="{Binding Title}"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop" mc:Ignorable="d" Title="{Binding Title}"
Width="600" Height="400"
Background="#FFF0F0F0">
@@ -42,7 +43,9 @@
<TextBlock Text="{Binding JobStatus}" />
</StackPanel>
- <ListBox Grid.Row="2" ItemsSource="{Binding QueueJobs}" SelectionMode="Extended" Background="LightGray" Margin="10,0,10,10">
+ <ListBox Grid.Row="2" ItemsSource="{Binding QueueJobs}" SelectionMode="Extended" Background="LightGray" Margin="10,0,10,10"
+ dd:DragDrop.IsDragSource="True" dd:DragDrop.IsDropTarget="True"
+ dd:DragDrop.DropHandler="{Binding}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
@@ -52,7 +55,7 @@
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
- <DataTemplate>
+ <DataTemplate x:Name="QueueItemTemplate">
<Grid HorizontalAlignment="Stretch" >
<Grid.ColumnDefinitions>
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
index 1e49fc3c2..898d5df64 100644
--- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
+++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
@@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cal="http://www.caliburnproject.org"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:NumericUpDown="clr-namespace:EagleBoost.Wpf.Presentation.Controls.NumericUpDown;assembly=EagleBoost.Wpf.Presentation"
- mc:Ignorable="d">
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop" mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -26,7 +26,9 @@
</Grid>
<ListBox Grid.Row="2" ItemsSource="{Binding SubtitleTracks}"
- SelectionMode="Extended" Background="LightGray" Margin="10,10,10,10">
+ SelectionMode="Extended" Background="LightGray" Margin="10,10,10,10"
+ dd:DragDrop.IsDragSource="True" dd:DragDrop.IsDropTarget="True"
+ dd:DragDrop.DropHandler="{Binding}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml
index ada69e02e..ec6163b94 100644
--- a/win/CS/HandBrakeWPF/Views/VideoView.xaml
+++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml
@@ -8,6 +8,7 @@
<UserControl.Resources>
<Converters:BooleanConverter x:Key="boolConverter" />
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ <Converters:EnumComboConverter x:Key="enumComboConverter" />
</UserControl.Resources>
<Grid Margin="10,5,0,0">
@@ -29,7 +30,8 @@
<StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
<TextBlock Text="Video Codec:" Width="100" />
- <ComboBox Width="120" ItemsSource="{Binding VideoEncoders}" SelectedItem="{Binding SelectedVideoEncoder}" />
+ <ComboBox Width="120" ItemsSource="{Binding VideoEncoders, Converter={StaticResource enumComboConverter}, Mode=TwoWay}"
+ SelectedItem="{Binding SelectedVideoEncoder, Converter={StaticResource enumComboConverter}, Mode=TwoWay}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
@@ -49,7 +51,7 @@
<StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
<RadioButton Content="Constant Quality:" IsChecked="{Binding IsConstantQuantity}" Margin="0,0,10,0"/>
- <TextBlock Text="{Binding RF}" Width="25" />
+ <TextBlock Text="{Binding DisplayRF}" Width="25" />
<TextBlock Text="RF" FontWeight="Bold" />
</StackPanel>
@@ -58,14 +60,14 @@
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
<RadioButton Content="Avg Bitrate (kbps):" IsChecked="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,10,0"/>
- <TextBox Width="75" Text="{Binding AverageBitrate}" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}" />
+ <TextBox Width="75" Text="{Binding Task.VideoBitrate}" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="30,0,0,0">
<CheckBox Content="2-Pass Encoding" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}"
- IsChecked="{Binding IsTwoPass}" Margin="0,0,10,0" />
+ IsChecked="{Binding Task.TwoPass}" Margin="0,0,10,0" />
<CheckBox Content="Turbo first pass" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}"
- IsChecked="{Binding IsTurboFirstPass}" />
+ IsChecked="{Binding Task.TurboFirstPass}" />
</StackPanel>
</StackPanel>