diff options
author | sr55 <[email protected]> | 2012-01-22 20:45:08 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-01-22 20:45:08 +0000 |
commit | dab8b3b4cfbe05f84bb89fb76252c68c41d3a06f (patch) | |
tree | 4153040ed252f0f5a13a9a8a50c9fd8c7289f2ac /win/CS/HandBrakeWPF/Views | |
parent | 35018826f82041b6ed7bd6b445f07bd64cb178fd (diff) |
WinGui: (WPF) Further work on the Audio and Subtitle tabs along with the API & Utilities.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4418 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/AudioView.xaml | 27 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/SubtitlesView.xaml | 20 |
2 files changed, 28 insertions, 19 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml index 84616338b..89093d2e2 100644 --- a/win/CS/HandBrakeWPF/Views/AudioView.xaml +++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml @@ -22,7 +22,6 @@ <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button Content="Add Track" cal:Message.Attach="[Event Click] = [Action Add]" Grid.Column="0" Width="75" Margin="0,0,10,0" />
- <Button Content="Remove" cal:Message.Attach="[Event Click] = [Action Remove]" Grid.Column="1" Width="75" />
</Grid>
<ListBox Grid.Row="2" ItemsSource="{Binding AudioTracks}"
@@ -70,21 +69,31 @@ <!-- Row 1-->
<TextBlock Text="Source" FontWeight="Bold" Grid.Column="0" VerticalAlignment="Center" />
- <ComboBox Width="100" Grid.Column="1" Margin="5,0,5,0" Height="22" />
+ <ComboBox Width="100" Grid.Column="1" Margin="5,0,5,0" Height="22"
+ ItemsSource="{Binding DataContext.SourceTracks, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
+ 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" />
+ <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}"/>
<TextBlock Text="Bitrate" FontWeight="Bold" Grid.Column="4" VerticalAlignment="Center" />
- <ComboBox Width="70" Grid.Column="5" Margin="5,0,5,0" Height="22" />
+ <ComboBox Width="70" Grid.Column="5" Margin="5,0,5,0" Height="22"
+ ItemsSource="{Binding DataContext.AudioBitrates, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
+ SelectedItem="{Binding Bitrate}"/>
<TextBlock Text="Samplerate" FontWeight="Bold" Grid.Column="6" VerticalAlignment="Center" />
- <ComboBox Width="70" Grid.Column="7" Margin="5,0,5,0" Height="22" />
+ <ComboBox Width="70" Grid.Column="7" Margin="5,0,5,0" Height="22"
+ ItemsSource="{Binding DataContext.SampleRates, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
+ SelectedItem="{Binding SampleRate}"/>
<!-- 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" />
+ <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}"/>
<TextBlock Text="DRC" FontWeight="Bold" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
- <NumericUpDown:NumericUpDown Width="45" Grid.Row="1" Grid.Column="3" HorizontalAlignment="Left" Margin="5,0,5,0" />
+ <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"/>
- <NumericUpDown:NumericUpDown Width="45" Grid.Row="1" Grid.Column="5" HorizontalAlignment="Left" Margin="5,0,5,0" />
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding Gain}" Grid.Row="1" Grid.Column="5" HorizontalAlignment="Left" Margin="5,0,5,0" />
</Grid>
@@ -92,7 +101,7 @@ <Image Source="Images/delete.png" Width="16" Height="16" Grid.Column="2" Margin="10,0,10,0">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDown">
- <cal:ActionMessage MethodName="RemoveJob">
+ <cal:ActionMessage MethodName="Remove">
<cal:Parameter Value="{Binding}" />
</cal:ActionMessage>
</i:EventTrigger>
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml index 4b2d9b61a..0e302fd4c 100644 --- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml +++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml @@ -22,7 +22,6 @@ <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button Content="Add" Name="AddTrack" Grid.Column="0" Width="75" Margin="0,0,10,0" cal:Message.Attach="[Event Click] = [Action Add]" />
- <Button Content="Remove" Name="RemoveTrack" Grid.Column="1" Width="75" Margin="0,0,10,0" cal:Message.Attach="[Event Click] = [Action Remove]" />
<Button Content="Import SRT" Grid.Column="2" Width="75" cal:Message.Attach="[Event Click] = [Action Import]" />
</Grid>
@@ -71,21 +70,22 @@ <!-- Row 1-->
<TextBlock Text="Source" FontWeight="Bold" Grid.Column="0" VerticalAlignment="Center" />
- <ComboBox Width="100" Grid.Column="1" Margin="5,0,5,0" Height="22" />
+ <ComboBox Width="100" ItemsSource="{Binding DataContext.SourceTracks, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
+ SelectedItem="{Binding SourceTrack}" Grid.Column="1" Margin="5,0,5,0" Height="22" />
<TextBlock Text="Forced Only" FontWeight="Bold" Grid.Column="2" VerticalAlignment="Center" />
- <CheckBox Grid.Column="3" VerticalAlignment="Center" Margin="5,0,5,0"/>
+ <CheckBox Grid.Column="3" IsChecked="{Binding Forced}" VerticalAlignment="Center" Margin="5,0,5,0"/>
<TextBlock Text="Burn In" FontWeight="Bold" Grid.Column="4" VerticalAlignment="Center" />
- <CheckBox Grid.Column="5" VerticalAlignment="Center" Margin="5,0,5,0"/>
+ <CheckBox Grid.Column="5" IsChecked="{Binding Burned}" VerticalAlignment="Center" Margin="5,0,5,0"/>
<TextBlock Text="Default" FontWeight="Bold" Grid.Column="6" VerticalAlignment="Center" />
- <CheckBox Grid.Column="7" VerticalAlignment="Center" Margin="5,0,5,0"/>
+ <CheckBox Grid.Column="7" IsChecked="{Binding Default}" VerticalAlignment="Center" Margin="5,0,5,0"/>
<!-- Row 2-->
<TextBlock Text="Language" 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" />
+ <ComboBox Width="100" Grid.Column="1" ItemsSource="{Binding DataContext.Langauges, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" SelectedItem="{Binding SrtLang}" Margin="5,0,5,0" Grid.Row="1" Height="22" />
<TextBlock Text="Char Code" FontWeight="Bold" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
- <ComboBox Width="100" Grid.Column="3" Grid.Row="1" Margin="5,0,5,0" Height="22" />
- <TextBlock Text="Offset" FontWeight="Bold" Grid.Column="4" Grid.Row="1" VerticalAlignment="Center"/>
- <NumericUpDown:NumericUpDown Width="45" Grid.Row="1" Grid.Column="5" HorizontalAlignment="Left" Margin="5,0,5,0" />
+ <ComboBox Width="100" Grid.Column="3" ItemsSource="{Binding DataContext.CharacterCodes, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" SelectedItem="{Binding SrtCharCode}" Grid.Row="1" Margin="5,0,5,0" Height="22" />
+ <TextBlock Text="Offset (ms)" FontWeight="Bold" Grid.Column="4" Grid.Row="1" VerticalAlignment="Center"/>
+ <NumericUpDown:NumericUpDown Width="45" Value="{Binding SrtOffset}" Grid.Row="1" Grid.Column="5" HorizontalAlignment="Left" Margin="5,0,5,0" />
</Grid>
@@ -93,7 +93,7 @@ <Image Source="Images/delete.png" Width="16" Height="16" Grid.Column="2" Margin="10,0,10,0">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDown">
- <cal:ActionMessage MethodName="RemoveJob">
+ <cal:ActionMessage MethodName="Remove">
<cal:Parameter Value="{Binding}" />
</cal:ActionMessage>
</i:EventTrigger>
|