]> granicus.if.org Git - handbrake/commitdiff
WinGui: (WPF) Further work on setting up the initial UI.
authorsr55 <sr55.hb@outlook.com>
Sat, 26 Nov 2011 22:45:40 +0000 (22:45 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 26 Nov 2011 22:45:40 +0000 (22:45 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4365 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml
win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs
win/CS/HandBrakeWPF/Views/MainView.xaml

index 842807931815fc19b3173bbd8fdc58b877487c94..a8acf0e5d5a02e039e5390f9beb9798bcf7cdf81 100644 (file)
@@ -3,9 +3,30 @@
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" \r
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" \r
-             mc:Ignorable="d" \r
-             d:DesignHeight="300" d:DesignWidth="300">\r
-    <Grid Background="Beige">\r
+             mc:Ignorable="d">\r
+    <Grid>\r
+        <Grid.RowDefinitions>\r
+            <RowDefinition Height="Auto" />\r
+            <RowDefinition Height="Auto" />\r
+            <RowDefinition Height="*" />\r
+        </Grid.RowDefinitions>\r
+\r
+        <TextBlock Text="Subtitles" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>\r
+\r
+        <Grid Grid.Row="1" Margin="10,5,10,0">\r
+            <Grid.ColumnDefinitions>\r
+                <ColumnDefinition Width="Auto" />\r
+                <ColumnDefinition Width="Auto" />\r
+                <ColumnDefinition Width="Auto" />\r
+            </Grid.ColumnDefinitions>\r
+            <Button Content="Add" Grid.Column="0" Width="75" Margin="0,0,10,0" />\r
+            <Button Content="Remove" Grid.Column="1" Width="75" Margin="0,0,10,0" />\r
+            <Button Content="Import SRT" Grid.Column="2" Width="75" />\r
+        </Grid>\r
+\r
+        <DataGrid Grid.Row="2" Margin="10" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">\r
+\r
+        </DataGrid>\r
 \r
     </Grid>\r
 </UserControl>\r
index 539ae57931786e1445074a06347f07462b6fbfc5..ddf717a585d71b9da9f22f96632fa28b9534cd25 100644 (file)
@@ -1,15 +1,45 @@
-namespace HandBrakeWPF.Views.Controls\r
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="SubtitlesView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">\r
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
+// </copyright>\r
+// <summary>\r
+//   Interaction logic for SubtitlesView.xaml\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
+\r
+namespace HandBrakeWPF.Views.Controls\r
 {\r
+    using System.ComponentModel;\r
+    using System.Windows;\r
     using System.Windows.Controls;\r
 \r
+    using HandBrake.ApplicationServices.Model.Encoding;\r
+\r
     /// <summary>\r
     /// Interaction logic for SubtitlesView.xaml\r
     /// </summary>\r
     public partial class SubtitlesView : UserControl\r
     {\r
+        /// <summary>\r
+        /// Initializes a new instance of the <see cref="SubtitlesView"/> class.\r
+        /// </summary>\r
         public SubtitlesView()\r
         {\r
             InitializeComponent();\r
         }\r
+\r
+        /// <summary>\r
+        /// The "Query" Dependancy Property\r
+        /// </summary>\r
+        public static readonly DependencyProperty QueryProperty = DependencyProperty.Register("SubtitleTracks", typeof(BindingList<SubtitleTrack>), typeof(SubtitlesView), new PropertyMetadata(null));\r
+\r
+        /// <summary>\r
+        /// Gets or sets State.\r
+        /// </summary>\r
+        public BindingList<SubtitleTrack> AudioTracks\r
+        {\r
+            get { return (BindingList<SubtitleTrack>)this.GetValue(QueryProperty); }\r
+            set { this.SetValue(QueryProperty, value); }\r
+        }\r
     }\r
 }\r
index 0a545a0c4599a7715b4d57ccf27a9857c6fa195e..d959c18d8c909aef65648309ed8cff95c10e6d8d 100644 (file)
@@ -13,7 +13,7 @@
             <Setter Property="VerticalAlignment" Value="Center" />\r
         </Style>\r
     </Window.Resources>\r
-    \r
+\r
     <Grid>\r
         <StackPanel Orientation="Vertical" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">\r
             <!-- Menu and Taskbar-->\r
@@ -66,7 +66,7 @@
                             <Label Content="Start"  Margin="8,0,0,0" VerticalAlignment="Center" />\r
                         </StackPanel>\r
                     </Button>\r
-                    \r
+\r
                     <Button Name="AddToQueue">\r
                         <StackPanel Orientation="Horizontal">\r
                             <Image Source="Images/AddToQueue.png" Height="32" Width="32" />\r
@@ -89,7 +89,7 @@
                             <Label Content="Preview"  Margin="8,0,0,0" VerticalAlignment="Center" />\r
                         </StackPanel>\r
                     </Button>\r
-                    <Button Name="ActivityWindow" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]"> \r
+                    <Button Name="ActivityWindow" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]">\r
                         <StackPanel Orientation="Horizontal">\r
                             <Image Source="Images/ActivityWindow.png" Height="32" Width="32" />\r
                             <Label Content="Activity Window"  Margin="8,0,0,0" VerticalAlignment="Center" />\r
                     </Button>\r
                 </ToolBar>\r
             </StackPanel>\r
-            \r
+\r
             <!-- Main Body-->\r
             <StackPanel Orientation="Horizontal">\r
-                \r
+\r
                 <!-- Main Controls-->\r
                 <StackPanel Orientation="Vertical">\r
                     <!-- Source -->\r
                             <Controls:PictureSettingsView x:Name="pictureSettingsView"></Controls:PictureSettingsView>\r
                         </TabItem>\r
                         <TabItem Header="Video Filters" Name="filtersTab">\r
+                            <Grid>\r
+                                <Grid.RowDefinitions>\r
+                                    <RowDefinition Height="Auto" />\r
+                                    <RowDefinition Height="*" />\r
+                                </Grid.RowDefinitions>\r
+\r
+                                <TextBlock Text="Filters" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>\r
+\r
+                                <StackPanel Orientation="Vertical" Grid.Row="1" Margin="10,10,0,0">\r
+                                    <Grid>\r
+                                        <Grid.RowDefinitions>\r
+                                            <RowDefinition Height="Auto" />\r
+                                            <RowDefinition Height="Auto" />\r
+                                            <RowDefinition Height="Auto" />\r
+                                            <RowDefinition Height="Auto" />\r
+                                            <RowDefinition Height="Auto" />\r
+                                            <RowDefinition Height="Auto" />\r
+                                        </Grid.RowDefinitions>\r
+\r
+                                        <Grid.ColumnDefinitions>\r
+                                            <ColumnDefinition Width="100" />\r
+                                            <ColumnDefinition Width="130" />\r
+                                            <ColumnDefinition Width="Auto" />\r
+                                        </Grid.ColumnDefinitions>\r
+\r
+                                        <TextBlock Text="Detelecine:" Grid.Row="0" Grid.Column="0" Margin="0,0,0,10" />\r
+                                        <ComboBox Width="120" Grid.Row="0" Grid.Column="1" Margin="0,0,0,10"/>\r
+                                        <TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10"/>\r
+\r
+                                        <TextBlock Text="Decomb:" Grid.Row="1" Grid.Column="0" Margin="0,0,0,10"/>\r
+                                        <ComboBox Width="120" Grid.Row="1" Grid.Column="1" Margin="0,0,0,10"/>\r
+                                        <TextBox Width="120" Grid.Row="1" Grid.Column="2" Margin="0,0,0,10"/>\r
+\r
+                                        <TextBlock Text="Deinterlace:" Grid.Row="2" Grid.Column="0" Margin="0,0,0,10"/>\r
+                                        <ComboBox Width="120" Grid.Row="2" Grid.Column="1" Margin="0,0,0,10"/>\r
+                                        <TextBox Width="120" Grid.Row="2" Grid.Column="2" Margin="0,0,0,10"/>\r
+\r
+                                        <TextBlock Text="Denoise:" Grid.Row="3" Grid.Column="0" Margin="0,0,0,10"/>\r
+                                        <ComboBox Width="120" Grid.Row="3" Grid.Column="1" Margin="0,0,0,10"/>\r
+                                        <TextBox Width="120" Grid.Row="3" Grid.Column="2" Margin="0,0,0,10"/>\r
+\r
+                                        <TextBlock Text="Deblock:" Grid.Row="4" Grid.Column="0" Margin="0,0,0,10"/>\r
+                                        <Slider Width="120" Grid.Row="4" Grid.Column="1" Margin="0,0,0,10"/>\r
+                                        <TextBlock Text="Off" Grid.Row="4" Grid.Column="2" Margin="0,0,0,10"/>\r
+\r
+                                        <CheckBox Content="Grayscale" Grid.Row="5" Grid.Column="1" Margin="0,0,0,10"/>\r
+                                    </Grid>\r
+\r
+                                </StackPanel>\r
+\r
+                            </Grid>\r
                         </TabItem>\r
+                        \r
                         <TabItem Header="Video" Name="videoTab">\r
+                            <Grid Margin="10,5,0,0">\r
+                                <Grid.RowDefinitions>\r
+                                    <RowDefinition Height="Auto" />\r
+                                    <RowDefinition Height="*" />\r
+                                </Grid.RowDefinitions>\r
+\r
+\r
+                                <Grid Grid.Row="1">\r
+                                    <Grid.ColumnDefinitions>\r
+                                        <ColumnDefinition Width="*" />\r
+                                        <ColumnDefinition Width="*" />\r
+                                    </Grid.ColumnDefinitions>\r
+\r
+                                    <StackPanel Orientation="Vertical" Grid.Column="0" >\r
+\r
+                                        <TextBlock Text="Video" FontWeight="Bold" Margin="0,0,0,10"/>\r
+                                        \r
+                                        <StackPanel Orientation="Horizontal" Margin="0,0,0,10" >\r
+                                            <TextBlock Text="Video Codec:" Width="100" />\r
+                                            <ComboBox Width="120"/>\r
+                                        </StackPanel>\r
+                                        \r
+                                        <StackPanel Orientation="Horizontal">\r
+                                            <TextBlock Text="Franerate (FPS):" Width="100"/>\r
+                                            <StackPanel Orientation="Vertical">\r
+                                                <ComboBox Width="120" />\r
+                                                <RadioButton Content="Constant Framerate" />\r
+                                                <RadioButton Content="Variable Framerate" />\r
+                                                <RadioButton Content="Peak Framerate" />\r
+                                            </StackPanel>\r
+                                        </StackPanel>\r
+                                    </StackPanel>\r
+\r
+\r
+                                    <StackPanel Orientation="Vertical" Grid.Column="1" >\r
+                                        <TextBlock Text="Quality" FontWeight="Bold" Margin="0,0,0,10"/>\r
+                                                              \r
+                                        <StackPanel Orientation="Horizontal" Margin="0,0,0,10" >\r
+                                            <RadioButton Content="Constant Quality:" Margin="0,0,10,0"/>\r
+                                            <TextBlock Text="0" Width="25" />\r
+                                            <TextBlock Text="RF" FontWeight="Bold" />\r
+                                        </StackPanel>\r
+                                        \r
+                                        <Slider Width="240" Margin="0,0,0,20" />\r
+                                                        \r
+                                        <StackPanel Orientation="Horizontal" Margin="0,0,0,10">\r
+                                            <RadioButton Content="Avg Bitrate (kbps):" Margin="0,0,10,0"/>\r
+                                            <TextBox Width="75" />\r
+                                        </StackPanel>\r
+\r
+                                        <StackPanel Orientation="Horizontal" Margin="30,0,0,0">\r
+                                            <CheckBox Content="2-Pass Encoding" Margin="0,0,10,0" />\r
+                                            <CheckBox Content="Turbo first pass" />\r
+                                        </StackPanel>\r
+\r
+                                    </StackPanel>\r
+\r
+\r
+                                </Grid>\r
+\r
+                            </Grid>\r
                         </TabItem>\r
                         <TabItem Header="Audio" Name="audioTab">\r
                             <Controls:AudioView></Controls:AudioView>\r
                         </TabItem>\r
+                        <TabItem Header="Subtitles" Name="subtitlesTab">\r
+                            <Controls:SubtitlesView></Controls:SubtitlesView>\r
+                        </TabItem>\r
                         <TabItem Header="Chapters" Name="chaptersTab">\r
                             <Controls:ChaptersView></Controls:ChaptersView>\r
                         </TabItem>\r
                     </GroupBox>\r
                 </StackPanel>\r
 \r
-            </StackPanel>      \r
-  \r
+            </StackPanel>\r
+\r
             <!-- Status Bar -->\r
             <StatusBar Grid.Row="6" Height="30" Grid.ColumnSpan="2" VerticalAlignment="Bottom">\r
                 <Label Content="{Binding Path=ProgramStatusLabel}" FontSize="10" VerticalAlignment="Center" />\r