summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-10-29 20:17:24 +0000
committersr55 <[email protected]>2011-10-29 20:17:24 +0000
commit2f0f372b09897e703a8d01fe9774aa59c936a013 (patch)
tree2dcac02179e264e6f22745e28d1492b84d715d6c /win/CS/HandBrakeWPF/Views
parent00176d7fd3e25fcdb3ce61f313b384d4c2508788 (diff)
WinGui: (WPF) Continued work on the options window. Save Settings, Various functions and place holders for TODO's
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4328 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r--win/CS/HandBrakeWPF/Views/LogView.xaml8
-rw-r--r--win/CS/HandBrakeWPF/Views/LogView.xaml.cs26
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml10
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml131
4 files changed, 109 insertions, 66 deletions
diff --git a/win/CS/HandBrakeWPF/Views/LogView.xaml b/win/CS/HandBrakeWPF/Views/LogView.xaml
new file mode 100644
index 000000000..ee6656788
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/LogView.xaml
@@ -0,0 +1,8 @@
+<Window x:Class="HandBrakeWPF.Views.LogView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Title="LogView" Height="300" Width="300">
+ <Grid>
+
+ </Grid>
+</Window>
diff --git a/win/CS/HandBrakeWPF/Views/LogView.xaml.cs b/win/CS/HandBrakeWPF/Views/LogView.xaml.cs
new file mode 100644
index 000000000..375cbed43
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/LogView.xaml.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace HandBrakeWPF.Views
+{
+ /// <summary>
+ /// Interaction logic for LogView.xaml
+ /// </summary>
+ public partial class LogView : Window
+ {
+ public LogView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index cdb63a7df..6b0e9ca66 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -4,6 +4,16 @@
xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" xmlns:Controls="clr-namespace:HandBrakeWPF.Views.Controls"
Title="{Data:Binding Path=WindowTitle}" Height="655" Width="1015" FontSize="11">
+ <Window.Resources>
+ <Style TargetType="Button">
+ <Setter Property="Foreground" Value="DarkOrange" />
+ <Setter Property="FontWeight" Value="Bold" />
+ <Setter Property="Padding" Value="5,1" />
+ <Setter Property="FontSize" Value="11.5" />
+ <Setter Property="VerticalAlignment" Value="Center" />
+ </Style>
+ </Window.Resources>
+
<Grid>
<StackPanel Orientation="Vertical" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<!-- Menu and Taskbar-->
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
index 1a4c50ef7..8f3d155bd 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
@@ -1,37 +1,30 @@
<Window x:Class="HandBrakeWPF.Views.OptionsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cal="http://www.caliburnproject.org"
- Title="OptionsView" MinWidth="620" MinHeight="540" Width="620" Height="520">
+ Title="OptionsView" MinWidth="620" MinHeight="550" Width="620" Height="550">
<Window.Resources>
<Style TargetType="Button">
<Setter Property="Foreground" Value="DarkOrange" />
<Setter Property="FontWeight" Value="Bold" />
- <Setter Property="Padding" Value="5,1" />
- <Setter Property="FontSize" Value="12" />
- <Setter Property="VerticalAlignment" Value="Center" />
- </Style>
-
- <Style TargetType="ComboBox">
+ <Setter Property="Padding" Value="5,0.5" />
+ <Setter Property="FontSize" Value="11.5" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
- <Style TargetType="CheckBox">
- <Setter Property="Margin" Value="0,0,5,5" />
- </Style>
-
+
+
<Style TargetType="TextBlock">
<Setter Property="Margin" Value="0,0,5,0" />
</Style>
- <Style TargetType="TextBox">
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="Margin" Value="0,0,10,5" />
+ <Style TargetType="CheckBox">
+ <Setter Property="Margin" Value="0,0,0,5" />
</Style>
</Window.Resources>
- <StackPanel Orientation="Vertical" Background="LightGray">
+ <StackPanel Orientation="Vertical" Background="#FFF1F0EF">
<!-- Header -->
<StackPanel Orientation="Horizontal" Background="White" Height="50" >
<Image Source="Images/Preferences.png" Margin="10,0,5,0" Width="32" Height="32" VerticalAlignment="Center" />
@@ -42,7 +35,7 @@
</StackPanel>
<!-- Options Panel-->
- <TabControl Margin="10,10,10,10" Height="400">
+ <TabControl Margin="10,10,10,10" Height="410">
<TabItem Header="General">
<StackPanel Orientation="Vertical">
<Grid Margin="10,10,0,10">
@@ -55,7 +48,7 @@
<StackPanel Orientation="Vertical" Grid.Column="1">
<CheckBox Content="Check for Updates" IsChecked="{Binding CheckForUpdates}" />
- <ComboBox Name="checkForUpdateFrequency" ItemsSource="{Binding CheckForUpdatesFrequencies}" SelectedIndex="{Binding CheckForUpdatesFrequency}" Margin="25,0,0,0" HorizontalAlignment="Left" Width="120"></ComboBox>
+ <ComboBox Name="checkForUpdateFrequency" ItemsSource="{Binding CheckForUpdatesFrequencies}" SelectedIndex="{Binding CheckForUpdatesFrequency}" Margin="25,0,0,5" HorizontalAlignment="Left" Width="120"></ComboBox>
<CheckBox Content="Enable Tooltips" IsChecked="{Binding EnableGuiTooltips}" />
</StackPanel>
@@ -73,18 +66,18 @@
<ComboBox Name="whenDone" ItemsSource="{Binding WhenDoneOptions}" SelectedItem="{Binding WhenDone}" Width="120" HorizontalAlignment="Left"></ComboBox>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
- <CheckBox Content="Growl after Queue Completes" IsChecked="{Binding GrowlAfterEncode}"/>
+ <CheckBox Content="Growl after Queue Completes" IsChecked="{Binding GrowlAfterEncode}" Margin="0,0,5,0"/>
<CheckBox Content="Growl after Encode Completes" IsChecked="{Binding GrowlAfterQueue}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
- <CheckBox Content="Send file to:" IsChecked="{Binding SendFileAfterEncode}" />
- <TextBlock Margin="5,0,0,0" VerticalAlignment="Center" Text="{Binding SendFileTo}" />
- <Button Content="Browse" Width="55"/>
+ <CheckBox Content="Send file to:" VerticalAlignment="Center" IsChecked="{Binding SendFileAfterEncode}" />
+ <TextBlock Margin="5,0,5,5" VerticalAlignment="Center" Text="{Binding SendFileTo}" />
+ <Button Content="Browse" cal:Message.Attach="[Event Click] = [Action BrowseSendFileTo]" Width="55"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
- <TextBlock Margin="25,0,0,0" Text="Arguments:" />
+ <TextBlock VerticalAlignment="Center" Margin="25,0,5,0" Text="Arguments:" />
<TextBox Name="SendToArguments" Text="{Binding Arguments}" Width="180" />
</StackPanel>
@@ -107,25 +100,25 @@
<CheckBox Content="Automatically name output files" IsChecked="{Binding AutomaticallyNameFiles}" />
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
- <TextBlock Text="Arguments: " />
+ <TextBlock VerticalAlignment="Center" Text="Arguments: " />
<TextBox Name="autoNameOutputPath" Text="{Binding AutoNameDefaultPath}" Width="180" />
- <Button Content="Browse" Width="55"/>
+ <Button Content="Browse" Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action BrowseAutoNamePath]" Width="55"/>
</StackPanel>
<TextBlock Text="Available Options: {source_path} or {source_folder_name} (Not Both)" />
- <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
- <TextBlock Text="Format:" />
+ <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
+ <TextBlock VerticalAlignment="Center" Text="Format:" />
<TextBox Name="autoNameFormat" Text="{Binding AutonameFormat}" Width="180" />
</StackPanel>
<TextBlock Text="Available Options: {source} {title} {chapters} {date}" />
- <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
+ <StackPanel Orientation="Horizontal" Margin="0,15,0,0">
<CheckBox Content="Remove underscores from name" IsChecked="{Binding RemoveUnderscores}"/>
<CheckBox Content="Change case to Title Case" IsChecked="{Binding ChangeToTitleCase}" Margin="5,0,0,0" />
</StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
- <TextBlock Text="MP4 File Extension:" />
+ <StackPanel Orientation="Horizontal" Margin="0,15,0,0">
+ <TextBlock VerticalAlignment="Center" Text="MP4 File Extension:" />
<ComboBox Name="mp4FileExtension" Width="120" ItemsSource="{Binding Mp4ExtensionOptions}" SelectedIndex="{Binding SelectedMp4Extension}" HorizontalAlignment="Left"></ComboBox>
</StackPanel>
</StackPanel>
@@ -146,9 +139,9 @@
<StackPanel Orientation="Vertical" Grid.Column="1">
<StackPanel Orientation="Horizontal">
- <TextBlock Text="Path:" />
+ <TextBlock VerticalAlignment="Center" Text="Path:" />
<TextBox Name="vlcPath" Text="{Binding VLCPath}" Width="180" />
- <Button Content="Browse" Width="55"/>
+ <Button Content="Browse" cal:Message.Attach="[Event Click] = [Action BrowseVlcPath]" Margin="5,0,0,0" Width="55"/>
</StackPanel>
<TextBlock Text="This path is used for the view preview feature only." />
@@ -159,8 +152,10 @@
<TabItem Header="Audio and Subtitles">
<StackPanel Orientation="Vertical">
- <TextBlock Text="Automatic Audio and Subtitle Selection" Grid.Column="0" FontWeight="Bold"/>
- <Grid Margin="10,10,0,10">
+
+ <TextBlock Text="Automatic Selection" Grid.Column="0" Margin="10,10,0,0" FontWeight="Bold"/>
+
+ <Grid Margin="10,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="140" />
<ColumnDefinition Width="*" />
@@ -168,12 +163,12 @@
<TextBlock Text="Preferred Language:" Grid.Column="0"/>
<StackPanel Orientation="Horizontal" Grid.Column="1">
- <ComboBox Name="primaryAudioLanguage" ItemsSource="{Binding PreferredLanguages}" SelectedItem="{Binding SelectedPreferredLangauge}" Width="120" />
- <TextBlock Text="Primary Audio Langauge" FontSize="10" />
+ <ComboBox Name="primaryAudioLanguage" VerticalAlignment="Center" ItemsSource="{Binding PreferredLanguages}" SelectedItem="{Binding SelectedPreferredLangauge}" Width="120" />
+ <TextBlock VerticalAlignment="Center" Text="Primary Audio Langauge" FontSize="10" />
</StackPanel>
</Grid>
- <Grid Margin="10,10,0,10">
+ <Grid Margin="10,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
@@ -194,40 +189,44 @@
<ListBox Name="availableLanguages" ItemsSource="{Binding AvailableLanguages}" SelectionMode="Multiple" Height="140"></ListBox>
</StackPanel>
- <StackPanel Orientation="Vertical" Grid.Column="1" Margin="10,0,10,0">
- <Button Content="Move Left" VerticalAlignment="Center" Width="60"></Button>
- <Button Content="Move Right" VerticalAlignment="Center" Width="60"></Button>
- <Button Content="Clear" VerticalAlignment="Center" Width="60"></Button>
- </StackPanel>
+ <DockPanel Grid.Column="1" Margin="10,0,10,0">
+ <StackPanel Orientation="Vertical" VerticalAlignment="Center">
+ <Button Content="Move Left" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveLeft]" Width="60" />
+ <Button Content="Move Right" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveRight]" Width="60" />
+ <Button Content="Clear" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageClearAll]" Width="60" />
+ </StackPanel>
+ </DockPanel>
<StackPanel Orientation="Vertical" Grid.Column="2">
<TextBlock Text="Selected Langauges" Margin="0,0,0,5"/>
<ListBox Name="selectedLangauges" ItemsSource="{Binding SelectedLangauges}" SelectionMode="Multiple" Height="140" />
</StackPanel>
- <StackPanel Orientation="Vertical" Grid.Column="3" Margin="10,0,10,0">
- <Button Content="Move Up" VerticalAlignment="Center" Width="60"></Button>
- <Button Content="Move Down" VerticalAlignment="Center" Width="60"></Button>
- </StackPanel>
+ <DockPanel Grid.Column="3" Margin="10,0,10,0">
+ <StackPanel Orientation="Vertical" VerticalAlignment="Center">
+ <Button Content="Move Up" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveUp]" Width="60" />
+ <Button Content="Move Down" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveDown]" Width="60" />
+ </StackPanel>
+ </DockPanel>
</Grid>
</StackPanel>
</Grid>
- <GroupBox Header="Add Additional Tracks" VerticalAlignment="Top" >
+ <GroupBox Header="Add Additional Tracks" >
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
- <TextBlock Text="Audio:" Margin="0,0,10,0" Width="100" />
+ <TextBlock Text="Audio:" VerticalAlignment="Center" Margin="15,0,5,0" Width="100" />
<ComboBox Name="autoAudioMode" ItemsSource="{Binding AddAudioModeOptions}" SelectedIndex="{Binding SelectedAddAudioMode}" Width="120" Margin="0,0,5,0" />
- <CheckBox Content="Add only one audio track per langauge" IsChecked="{Binding AddOnlyOneAudioTrackPerLanguage}" />
+ <CheckBox Content="Add only one audio track per langauge" VerticalAlignment="Center" IsChecked="{Binding AddOnlyOneAudioTrackPerLanguage}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
- <TextBlock Text="Subtitle:" Margin="0,0,10,0" Width="100" />
+ <TextBlock Text="Subtitle:" VerticalAlignment="Center" Margin="15,0,5,0" Width="100" />
<ComboBox Name="autoSubtitleMode" ItemsSource="{Binding AddSubtitleModeOptions}" SelectedIndex="{Binding SelectedAddSubtitleMode}" Width="120" Margin="0,0,5,0" />
</StackPanel>
- <CheckBox Content="Add Closed Captions when available" IsChecked="{Binding AddClosedCaptions}"/>
+ <CheckBox Content="Add Closed Captions when available" Margin="120,5,0,0" IsChecked="{Binding AddClosedCaptions}"/>
</StackPanel>
</GroupBox>
@@ -245,7 +244,7 @@
<TextBlock Text="CLI:" Grid.Column="0" FontWeight="Bold"/>
<StackPanel Orientation="Horizontal" Grid.Column="1">
- <TextBlock Text="Priority Level:" />
+ <TextBlock Text="Priority Level:" VerticalAlignment="Center" />
<ComboBox Name="processPriorityLevel" ItemsSource="{Binding PriorityLevelOptions}" SelectedItem="{Binding SelectedPriority}" Width="120" />
</StackPanel>
</Grid>
@@ -271,20 +270,20 @@
<StackPanel Orientation="Vertical" Grid.Column="1">
<StackPanel Orientation="Horizontal" Grid.Column="1">
- <TextBlock Text="Log Verbosity Level:" />
+ <TextBlock Text="Log Verbosity Level:" VerticalAlignment="Center" />
<ComboBox Name="logVerbosityLevel" ItemsSource="{Binding LogVerbosityOptions}" SelectedItem="{Binding SelectedVerbosity}" Width="120" />
</StackPanel>
<CheckBox Content="Put a copy of individual encode logs in the same location as the encoded video" IsChecked="{Binding CopyLogToEncodeDirectory}" />
<CheckBox Content="Put a copy of individual encode logs in a specified location: " IsChecked="{Binding CopyLogToSepcficedLocation}" />
- <StackPanel Orientation="Horizontal" Grid.Column="1">
- <TextBlock Text="Log Path:" />
+ <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Column="1">
+ <TextBlock Text="Log Path:" VerticalAlignment="Center" />
<TextBox Width="120" Text="{Binding LogDirectory}" />
- <Button Content="Browse" />
+ <Button Content="Browse" Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action BrowseLogPath]" />
</StackPanel>
- <StackPanel Orientation="Horizontal" Grid.Column="1">
- <Button Content="View Log Directory" Margin="0,0,5,0" />
- <Button Content="Clear Log History" />
+ <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Column="1">
+ <Button Content="View Log Directory" cal:Message.Attach="[Event Click] = [Action ViewLogDirectory]" Margin="0,0,5,0" />
+ <Button Content="Clear Log History" cal:Message.Attach="[Event Click] = [Action ClearLogHistory]" />
</StackPanel>
<CheckBox Content="Clear Log files older than 30 days " Margin="0,5,0,0" IsChecked="{Binding ClearOldOlgs}" />
@@ -310,12 +309,12 @@
<CheckBox Content="Prompt when a manual query does not match GUI settings" Margin="10,0,0,5" IsChecked="{Binding PromptOnDifferentQuery}" />
<CheckBox Content="Disable built-in preset update notification" IsChecked="{Binding DisablePresetUpdateCheckNotification}" />
<CheckBox Content="Show CLI window (Allows you to cleanly exit encode with ctrl-c)" IsChecked="{Binding ShowCliWindow}" />
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Number of picture previews to scan:" Width="210" />
+ <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
+ <TextBlock Text="Number of picture previews to scan:" VerticalAlignment="Center" Width="250" />
<ComboBox Name="numberOfPreviews" ItemsSource="{Binding PreviewPicturesToScan}" SelectedItem="{Binding SelectedPreviewCount}" Width="120" />
</StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Minimum length of title to scan (seconds):" Width="210" />
+ <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
+ <TextBlock Text="Minimum length of title to scan (seconds):" VerticalAlignment="Center" Width="250" />
<TextBox Name="MinTitleLength" Text="{Binding MinLength}" Width="120"/>
<!-- Find a control for this-->
</StackPanel>
@@ -323,19 +322,19 @@
</StackPanel>
</Grid>
- <Grid Margin="10,10,0,10">
+ <Grid Margin="10,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="x264:" Grid.Column="0" FontWeight="Bold"/>
<StackPanel Orientation="Horizontal" Grid.Column="1">
- <TextBlock Text="Constant quality fractional granularity:" Width="210" />
+ <TextBlock Text="Constant quality fractional granularity:" VerticalAlignment="Center" Width="250" />
<ComboBox Name="x264Granularity" ItemsSource="{Binding ConstantQualityGranularity}" SelectedItem="{Binding SelectedGranulairty}" Width="120"/>
</StackPanel>
</Grid>
- <Grid Margin="10,10,0,10">
+ <Grid Margin="10,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
@@ -353,7 +352,7 @@
</TabControl>
<Button Content="Close" IsDefault="True" cal:Message.Attach="[Event Click] = [Action Close]"
- HorizontalAlignment="Right" Padding="10,2" Margin="0,0,10,10" />
+ HorizontalAlignment="Right" Padding="10,2" Margin="0,0,10,0" />
</StackPanel>