diff options
author | sr55 <[email protected]> | 2011-11-26 22:45:40 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-11-26 22:45:40 +0000 |
commit | 044fa5acfdfba93e70f9ade5586f14aee0958532 (patch) | |
tree | ddec0adcda800735cb8173a9e8515c215e758af1 | |
parent | f540c7762be0e8f42744db080ac41b4425ca4e39 (diff) |
WinGui: (WPF) Further work on setting up the initial UI.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4365 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml | 27 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs | 32 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 130 |
3 files changed, 178 insertions, 11 deletions
diff --git a/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml index 842807931..a8acf0e5d 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml +++ b/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml @@ -3,9 +3,30 @@ 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"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid Background="Beige">
+ mc:Ignorable="d">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+
+ <TextBlock Text="Subtitles" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>
+
+ <Grid Grid.Row="1" Margin="10,5,10,0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+ <Button Content="Add" Grid.Column="0" Width="75" Margin="0,0,10,0" />
+ <Button Content="Remove" Grid.Column="1" Width="75" Margin="0,0,10,0" />
+ <Button Content="Import SRT" Grid.Column="2" Width="75" />
+ </Grid>
+
+ <DataGrid Grid.Row="2" Margin="10" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
+
+ </DataGrid>
</Grid>
</UserControl>
diff --git a/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs index 539ae5793..ddf717a58 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs @@ -1,15 +1,45 @@ -namespace HandBrakeWPF.Views.Controls
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SubtitlesView.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 SubtitlesView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Views.Controls
{
+ using System.ComponentModel;
+ using System.Windows;
using System.Windows.Controls;
+ using HandBrake.ApplicationServices.Model.Encoding;
+
/// <summary>
/// Interaction logic for SubtitlesView.xaml
/// </summary>
public partial class SubtitlesView : UserControl
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SubtitlesView"/> class.
+ /// </summary>
public SubtitlesView()
{
InitializeComponent();
}
+
+ /// <summary>
+ /// The "Query" Dependancy Property
+ /// </summary>
+ public static readonly DependencyProperty QueryProperty = DependencyProperty.Register("SubtitleTracks", typeof(BindingList<SubtitleTrack>), typeof(SubtitlesView), new PropertyMetadata(null));
+
+ /// <summary>
+ /// Gets or sets State.
+ /// </summary>
+ public BindingList<SubtitleTrack> AudioTracks
+ {
+ get { return (BindingList<SubtitleTrack>)this.GetValue(QueryProperty); }
+ set { this.SetValue(QueryProperty, value); }
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 0a545a0c4..d959c18d8 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -13,7 +13,7 @@ <Setter Property="VerticalAlignment" Value="Center" />
</Style>
</Window.Resources>
-
+
<Grid>
<StackPanel Orientation="Vertical" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<!-- Menu and Taskbar-->
@@ -66,7 +66,7 @@ <Label Content="Start" Margin="8,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</Button>
-
+
<Button Name="AddToQueue">
<StackPanel Orientation="Horizontal">
<Image Source="Images/AddToQueue.png" Height="32" Width="32" />
@@ -89,7 +89,7 @@ <Label Content="Preview" Margin="8,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</Button>
- <Button Name="ActivityWindow" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]">
+ <Button Name="ActivityWindow" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]">
<StackPanel Orientation="Horizontal">
<Image Source="Images/ActivityWindow.png" Height="32" Width="32" />
<Label Content="Activity Window" Margin="8,0,0,0" VerticalAlignment="Center" />
@@ -97,10 +97,10 @@ </Button>
</ToolBar>
</StackPanel>
-
+
<!-- Main Body-->
<StackPanel Orientation="Horizontal">
-
+
<!-- Main Controls-->
<StackPanel Orientation="Vertical">
<!-- Source -->
@@ -155,12 +155,128 @@ <Controls:PictureSettingsView x:Name="pictureSettingsView"></Controls:PictureSettingsView>
</TabItem>
<TabItem Header="Video Filters" Name="filtersTab">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+
+ <TextBlock Text="Filters" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>
+
+ <StackPanel Orientation="Vertical" Grid.Row="1" Margin="10,10,0,0">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="100" />
+ <ColumnDefinition Width="130" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <TextBlock Text="Detelecine:" Grid.Row="0" Grid.Column="0" Margin="0,0,0,10" />
+ <ComboBox Width="120" Grid.Row="0" Grid.Column="1" Margin="0,0,0,10"/>
+ <TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10"/>
+
+ <TextBlock Text="Decomb:" Grid.Row="1" Grid.Column="0" Margin="0,0,0,10"/>
+ <ComboBox Width="120" Grid.Row="1" Grid.Column="1" Margin="0,0,0,10"/>
+ <TextBox Width="120" Grid.Row="1" Grid.Column="2" Margin="0,0,0,10"/>
+
+ <TextBlock Text="Deinterlace:" Grid.Row="2" Grid.Column="0" Margin="0,0,0,10"/>
+ <ComboBox Width="120" Grid.Row="2" Grid.Column="1" Margin="0,0,0,10"/>
+ <TextBox Width="120" Grid.Row="2" Grid.Column="2" Margin="0,0,0,10"/>
+
+ <TextBlock Text="Denoise:" Grid.Row="3" Grid.Column="0" Margin="0,0,0,10"/>
+ <ComboBox Width="120" Grid.Row="3" Grid.Column="1" Margin="0,0,0,10"/>
+ <TextBox Width="120" Grid.Row="3" Grid.Column="2" Margin="0,0,0,10"/>
+
+ <TextBlock Text="Deblock:" Grid.Row="4" Grid.Column="0" Margin="0,0,0,10"/>
+ <Slider Width="120" Grid.Row="4" Grid.Column="1" Margin="0,0,0,10"/>
+ <TextBlock Text="Off" Grid.Row="4" Grid.Column="2" Margin="0,0,0,10"/>
+
+ <CheckBox Content="Grayscale" Grid.Row="5" Grid.Column="1" Margin="0,0,0,10"/>
+ </Grid>
+
+ </StackPanel>
+
+ </Grid>
</TabItem>
+
<TabItem Header="Video" Name="videoTab">
+ <Grid Margin="10,5,0,0">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+
+
+ <Grid Grid.Row="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Orientation="Vertical" Grid.Column="0" >
+
+ <TextBlock Text="Video" FontWeight="Bold" Margin="0,0,0,10"/>
+
+ <StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
+ <TextBlock Text="Video Codec:" Width="100" />
+ <ComboBox Width="120"/>
+ </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" />
+ </StackPanel>
+ </StackPanel>
+ </StackPanel>
+
+
+ <StackPanel Orientation="Vertical" Grid.Column="1" >
+ <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" />
+ <TextBlock Text="RF" FontWeight="Bold" />
+ </StackPanel>
+
+ <Slider Width="240" 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" />
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal" Margin="30,0,0,0">
+ <CheckBox Content="2-Pass Encoding" Margin="0,0,10,0" />
+ <CheckBox Content="Turbo first pass" />
+ </StackPanel>
+
+ </StackPanel>
+
+
+ </Grid>
+
+ </Grid>
</TabItem>
<TabItem Header="Audio" Name="audioTab">
<Controls:AudioView></Controls:AudioView>
</TabItem>
+ <TabItem Header="Subtitles" Name="subtitlesTab">
+ <Controls:SubtitlesView></Controls:SubtitlesView>
+ </TabItem>
<TabItem Header="Chapters" Name="chaptersTab">
<Controls:ChaptersView></Controls:ChaptersView>
</TabItem>
@@ -188,8 +304,8 @@ </GroupBox>
</StackPanel>
- </StackPanel>
-
+ </StackPanel>
+
<!-- Status Bar -->
<StatusBar Grid.Row="6" Height="30" Grid.ColumnSpan="2" VerticalAlignment="Bottom">
<Label Content="{Binding Path=ProgramStatusLabel}" FontSize="10" VerticalAlignment="Center" />
|