summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-01-08 15:09:40 +0000
committersr55 <[email protected]>2012-01-08 15:09:40 +0000
commit54e6a851ccec4be58087f8d90d4e04fb2623b4b5 (patch)
treef4d603eeb208ab9c5e09b74d81e8a01823da701b /win/CS/HandBrakeWPF/Views
parent4eebc527c8183ec0bbc905da7f648e004f44d9db (diff)
WinGui: (WPF) Further work on hooking up the various tabs on the Main Window.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4404 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r--win/CS/HandBrakeWPF/Views/ChaptersView.xaml4
-rw-r--r--win/CS/HandBrakeWPF/Views/FiltersView.xaml8
-rw-r--r--win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml39
-rw-r--r--win/CS/HandBrakeWPF/Views/VideoView.xaml37
4 files changed, 50 insertions, 38 deletions
diff --git a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml
index 9166dcf80..1c46e57ee 100644
--- a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml
+++ b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml
@@ -33,8 +33,6 @@
<DataGridTextColumn Header="Chapter Name" Width="*" Binding="{Binding ChapterName}" IsReadOnly="False" />
</DataGrid.Columns>
</DataGrid>
-
-
-
+
</Grid>
</UserControl>
diff --git a/win/CS/HandBrakeWPF/Views/FiltersView.xaml b/win/CS/HandBrakeWPF/Views/FiltersView.xaml
index 1460e8f16..53e75a6b0 100644
--- a/win/CS/HandBrakeWPF/Views/FiltersView.xaml
+++ b/win/CS/HandBrakeWPF/Views/FiltersView.xaml
@@ -35,22 +35,22 @@
<TextBlock Text="Detelecine:" Grid.Row="0" Grid.Column="0" Margin="0,0,0,10" />
<ComboBox Width="120" Grid.Row="0" ItemsSource="{Binding DetelecineOptions}" SelectedItem="{Binding SelectedDetelecine}" Grid.Column="1" Margin="0,0,0,10"/>
- <TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10"
+ <TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDetelecine}"
Visibility="{Binding ShowDetelecineCustom, Converter={StaticResource boolToVisConverter}}"/>
<TextBlock Text="Decomb:" Grid.Row="1" Grid.Column="0" Margin="0,0,0,10"/>
<ComboBox Width="120" Grid.Row="1" ItemsSource="{Binding DecombOptions}" SelectedItem="{Binding SelectedDecomb}" Grid.Column="1" Margin="0,0,0,10"/>
- <TextBox Width="120" Grid.Row="1" Grid.Column="2" Margin="0,0,0,10"
+ <TextBox Width="120" Grid.Row="1" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDecomb}"
Visibility="{Binding ShowDecombCustom, Converter={StaticResource boolToVisConverter}}" />
<TextBlock Text="Deinterlace:" Grid.Row="2" Grid.Column="0" Margin="0,0,0,10"/>
<ComboBox Width="120" Grid.Row="2" ItemsSource="{Binding DeInterlaceOptions}" SelectedItem="{Binding SelectedDeInterlace}" Grid.Column="1" Margin="0,0,0,10"/>
- <TextBox Width="120" Grid.Row="2" Grid.Column="2" Margin="0,0,0,10"
+ <TextBox Width="120" Grid.Row="2" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDeinterlace}"
Visibility="{Binding ShowDeinterlaceCustom, Converter={StaticResource boolToVisConverter}}" />
<TextBlock Text="Denoise:" Grid.Row="3" Grid.Column="0" Margin="0,0,0,10"/>
<ComboBox Width="120" Grid.Row="3" ItemsSource="{Binding DenoiseOptions}" SelectedItem="{Binding SelectedDenoise}" Grid.Column="1" Margin="0,0,0,10"/>
- <TextBox Width="120" Grid.Row="3" Grid.Column="2" Margin="0,0,0,10"
+ <TextBox Width="120" Grid.Row="3" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDenoise}"
Visibility="{Binding ShowDenoiseCustom, Converter={StaticResource boolToVisConverter}}" />
<TextBlock Text="Deblock:" Grid.Row="4" Grid.Column="0" Margin="0,0,0,10"/>
diff --git a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml
index 4bc306ddf..5ebe36b33 100644
--- a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml
@@ -1,7 +1,12 @@
<UserControl x:Class="HandBrakeWPF.Views.PictureSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:NumericUpDown="clr-namespace:EagleBoost.Wpf.Presentation.Controls.NumericUpDown;assembly=EagleBoost.Wpf.Presentation">
+ xmlns:NumericUpDown="clr-namespace:EagleBoost.Wpf.Presentation.Controls.NumericUpDown;assembly=EagleBoost.Wpf.Presentation"
+ xmlns:Converters="clr-namespace:HandBrakeWPF.Converters">
+
+ <UserControl.Resources>
+ <Converters:BooleanConverter x:Key="boolConverter" />
+ </UserControl.Resources>
<StackPanel Orientation="Horizontal" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
@@ -12,16 +17,16 @@
<!-- Row 1-->
<StackPanel Orientation="Horizontal" Margin="5,0,5,0">
<Label Content="Source" Grid.Row="0" Grid.Column="0" />
- <Label Content="---" Name="sourceResolution" Grid.Row="0" Grid.Column="1" />
+ <Label Content="{Binding SourceInfo}" Name="sourceResolution" Grid.Row="0" Grid.Column="1" />
</StackPanel>
<!-- Row 2-->
<StackPanel Orientation="Horizontal" Margin="5,0,5,0">
<Label Content="Width:" Grid.Row="1" Grid.Column="0" />
- <NumericUpDown:NumericUpDown Name="width" Minimum="0" Grid.Row="1" Grid.Column="1" Width="45" />
+ <NumericUpDown:NumericUpDown Value="{Binding Width}" Minimum="0" Grid.Row="1" Grid.Column="1" Width="45" />
<Label Content="Height:" Grid.Row="1" Grid.Column="2" />
- <NumericUpDown:NumericUpDown Name="height" Minimum="0" Grid.Row="1" Grid.Column="3" Width="45" />
- <CheckBox Content="Keep Aspect Ratio" VerticalAlignment="Center" Margin="5,0,0,0" />
+ <NumericUpDown:NumericUpDown Value="{Binding Height}" Minimum="0" Grid.Row="1" Grid.Column="3" Width="45" />
+ <CheckBox Content="Keep Aspect Ratio" IsChecked="{Binding MaintainAspectRatio}" VerticalAlignment="Center" Margin="5,0,0,0" />
</StackPanel>
<!-- Row 3-->
@@ -47,20 +52,20 @@
<Label Content="PAR Height:" Grid.Row="4" Grid.Column="0" />
<Label Content="Display Size:" Grid.Row="5" Grid.Column="0" />
- <ComboBox Width="110" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <ComboBox Width="110" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <Label Content="---" Grid.Row="5" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <ComboBox Width="110" Grid.Row="0" ItemsSource="{Binding AnamorphicModes}" SelectedItem="{Binding SelectedAnamorphicMode}" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <ComboBox Width="110" Grid.Row="1" ItemsSource="{Binding ModulusValues}" SelectedItem="{Binding SelectedModulus}" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding DisplayWidth}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding ParWidth}" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding ParHeight}" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <Label Content="{Binding DisplaySize}" Grid.Row="5" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
</Grid>
</StackPanel>
<StackPanel Name="CropPanel" Margin="50,0,0,0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<Label Content="Cropping" FontWeight="Bold" />
- <RadioButton Content="Automatic" Margin="10,0,0,0"/>
- <RadioButton Content="Custom" Margin="10,0,0,0" />
+ <RadioButton Content="Automatic" IsChecked="{Binding IsCustomCrop, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="10,0,0,0"/>
+ <RadioButton Content="Custom" IsChecked="{Binding IsCustomCrop}" Margin="10,0,0,0" />
<Grid Margin="0,10,0,0">
<Grid.RowDefinitions>
@@ -84,10 +89,10 @@
<Label Content="Left" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Center" />
<Label Content="Right" Grid.Row="2" Grid.Column="4" HorizontalAlignment="Center" />
- <NumericUpDown:NumericUpDown Width="45" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Grid.Row="3" Grid.Column="2" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Grid.Row="2" Grid.Column="3" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropTop}" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropBottom}" Grid.Row="3" Grid.Column="2" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropLeft}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" />
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropRight}" Grid.Row="2" Grid.Column="3" HorizontalAlignment="Left" Margin="0,0,0,5" />
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml
index d06255b71..ada69e02e 100644
--- a/win/CS/HandBrakeWPF/Views/VideoView.xaml
+++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml
@@ -2,8 +2,14 @@
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" >
+
+ <UserControl.Resources>
+ <Converters:BooleanConverter x:Key="boolConverter" />
+ <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ </UserControl.Resources>
+
<Grid Margin="10,5,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -23,16 +29,16 @@
<StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
<TextBlock Text="Video Codec:" Width="100" />
- <ComboBox Width="120"/>
+ <ComboBox Width="120" ItemsSource="{Binding VideoEncoders}" SelectedItem="{Binding SelectedVideoEncoder}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Franerate (FPS):" Width="100"/>
<StackPanel Orientation="Vertical">
- <ComboBox Width="120" />
- <RadioButton Content="Constant Framerate" />
- <RadioButton Content="Variable Framerate" />
- <RadioButton Content="Peak Framerate" />
+ <ComboBox Width="120" ItemsSource="{Binding Framerates}" SelectedItem="{Binding SelectedFramerate}" />
+ <RadioButton Content="Constant Framerate" IsChecked="{Binding IsConstantFramerate}" />
+ <RadioButton Content="Variable Framerate" IsChecked="{Binding IsVariableFramerate}" Visibility="{Binding ShowPeakFramerate, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
+ <RadioButton Content="Peak Framerate" IsChecked="{Binding IsPeakFramerate}" Visibility="{Binding ShowPeakFramerate, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
</StackPanel>
</StackPanel>
</StackPanel>
@@ -42,21 +48,24 @@
<TextBlock Text="Quality" FontWeight="Bold" Margin="0,0,0,10"/>
<StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
- <RadioButton Content="Constant Quality:" Margin="0,0,10,0"/>
- <TextBlock Text="0" Width="25" />
+ <RadioButton Content="Constant Quality:" IsChecked="{Binding IsConstantQuantity}" Margin="0,0,10,0"/>
+ <TextBlock Text="{Binding RF}" Width="25" />
<TextBlock Text="RF" FontWeight="Bold" />
</StackPanel>
- <Slider Width="240" Margin="0,0,0,20" />
+ <Slider Width="240" Value="{Binding RF}" Maximum="{Binding QualityMax}" Minimum="{Binding QualityMin}"
+ IsEnabled="{Binding IsConstantQuantity}" Margin="0,0,0,20" />
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
- <RadioButton Content="Avg Bitrate (kbps):" Margin="0,0,10,0"/>
- <TextBox Width="75" />
+ <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}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="30,0,0,0">
- <CheckBox Content="2-Pass Encoding" Margin="0,0,10,0" />
- <CheckBox Content="Turbo first pass" />
+ <CheckBox Content="2-Pass Encoding" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}"
+ IsChecked="{Binding IsTwoPass}" Margin="0,0,10,0" />
+ <CheckBox Content="Turbo first pass" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}"
+ IsChecked="{Binding IsTurboFirstPass}" />
</StackPanel>
</StackPanel>