--- /dev/null
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="OpenOptionsScreen.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
+// A Command to display the options window.\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
+\r
+namespace HandBrakeWPF.Commands\r
+{\r
+ using System;\r
+ using System.Windows.Input;\r
+\r
+ using Caliburn.Micro;\r
+\r
+ using HandBrakeWPF.Model;\r
+ using HandBrakeWPF.ViewModels.Interfaces;\r
+\r
+ /// <summary>\r
+ /// A Command to display the options window.\r
+ /// </summary>\r
+ public class OpenOptionsScreenCommand : ICommand\r
+ {\r
+ /// <summary>\r
+ /// The can execute changed.\r
+ /// </summary>\r
+ public event EventHandler CanExecuteChanged;\r
+\r
+ /// <summary>\r
+ /// The can execute.\r
+ /// </summary>\r
+ /// <param name="parameter">\r
+ /// The parameter.\r
+ /// </param>\r
+ /// <returns>\r
+ /// The <see cref="bool"/>.\r
+ /// </returns>\r
+ public bool CanExecute(object parameter)\r
+ {\r
+ return true;\r
+ }\r
+\r
+ /// <summary>\r
+ /// The execute.\r
+ /// </summary>\r
+ /// <param name="parameter">\r
+ /// The parameter.\r
+ /// </param>\r
+ public void Execute(object parameter)\r
+ {\r
+ var shellViewModel = IoC.Get<IShellViewModel>();\r
+ shellViewModel.DisplayWindow(ShellWindow.OptionsWindow);\r
+\r
+ if (parameter != null && parameter.GetType() == typeof(OptionsTab))\r
+ {\r
+ var optionsViewModel = IoC.Get<IOptionsViewModel>();\r
+ optionsViewModel.GotoTab((OptionsTab)parameter);\r
+ }\r
+ }\r
+ }\r
+}
\ No newline at end of file
using System.Windows;\r
using System.Windows.Data;\r
\r
+ using HandBrakeWPF.Model;\r
+\r
/// <summary>\r
/// The Options Tab Converter. Controls which tab is dispalyed.\r
/// </summary>\r
{\r
if (value != null && parameter != null)\r
{\r
- switch (value.ToString())\r
+ switch ((OptionsTab)value)\r
{\r
- case "General":\r
- if (parameter.ToString() == "General") return Visibility.Visible;\r
+ case OptionsTab.General:\r
+ if ((OptionsTab)parameter == OptionsTab.General) return Visibility.Visible;\r
+ break;\r
+ case OptionsTab.OutputFiles:\r
+ if ((OptionsTab)parameter == OptionsTab.OutputFiles) return Visibility.Visible;\r
break;\r
- case "Output Files":\r
- if (parameter.ToString() == "Output Files") return Visibility.Visible;\r
+ case OptionsTab.AudioAndSubtitles:\r
+ if ((OptionsTab)parameter == OptionsTab.AudioAndSubtitles) return Visibility.Visible;\r
break;\r
- case "Audio and Subtitles":\r
- if (parameter.ToString() == "Audio and Subtitles") return Visibility.Visible;\r
+ case OptionsTab.Advanced:\r
+ if ((OptionsTab)parameter == OptionsTab.Advanced) return Visibility.Visible;\r
break;\r
- case "Advanced":\r
- if (parameter.ToString() == "Advanced") return Visibility.Visible;\r
+ case OptionsTab.Updates:\r
+ if ((OptionsTab)parameter == OptionsTab.Updates) return Visibility.Visible;\r
break;\r
- case "Updates":\r
- if (parameter.ToString() == "Updates") return Visibility.Visible;\r
+ case OptionsTab.About:\r
+ if ((OptionsTab)parameter == OptionsTab.About) return Visibility.Visible;\r
break;\r
}\r
}\r
--- /dev/null
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="OptionsTabNameConverter.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
+// A Converter to get the Display Name of each options tab.\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
+\r
+namespace HandBrakeWPF.Converters.Options\r
+{\r
+ using System;\r
+ using System.Globalization;\r
+ using System.Windows.Data;\r
+\r
+ using HandBrake.ApplicationServices.Utilities;\r
+\r
+ using HandBrakeWPF.Model;\r
+\r
+ /// <summary>\r
+ /// A Converter to get the Display Name of each options tab.\r
+ /// </summary>\r
+ public class OptionsTabNameConverter : IValueConverter\r
+ {\r
+ /// <summary>\r
+ /// The convert.\r
+ /// </summary>\r
+ /// <param name="value">\r
+ /// The value.\r
+ /// </param>\r
+ /// <param name="targetType">\r
+ /// The target type.\r
+ /// </param>\r
+ /// <param name="parameter">\r
+ /// The parameter.\r
+ /// </param>\r
+ /// <param name="culture">\r
+ /// The culture.\r
+ /// </param>\r
+ /// <returns>\r
+ /// The <see cref="object"/>.\r
+ /// </returns>\r
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r
+ {\r
+ return EnumHelper<OptionsTab>.GetDisplay((OptionsTab)value);\r
+ }\r
+\r
+ /// <summary>\r
+ /// The convert back.\r
+ /// </summary>\r
+ /// <param name="value">\r
+ /// The value.\r
+ /// </param>\r
+ /// <param name="targetType">\r
+ /// The target type.\r
+ /// </param>\r
+ /// <param name="parameter">\r
+ /// The parameter.\r
+ /// </param>\r
+ /// <param name="culture">\r
+ /// The culture.\r
+ /// </param>\r
+ /// <returns>\r
+ /// The <see cref="object"/>.\r
+ /// </returns>\r
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r
+ {\r
+ return EnumHelper<OptionsTab>.GetValue(value.ToString());\r
+ }\r
+ }\r
+}
\ No newline at end of file
</Reference>\r
<Reference Include="PresentationFramework" />\r
<Reference Include="System" />\r
+ <Reference Include="System.ComponentModel.DataAnnotations" />\r
<Reference Include="System.Drawing" />\r
<Reference Include="System.Management" />\r
<Reference Include="System.Runtime.Serialization" />\r
<Compile Include="AttachedProperties\MenuItemExtensions.cs" />\r
<Compile Include="Commands\CancelScanCommand.cs" />\r
<Compile Include="Commands\Interfaces\IAdvancedEncoderOptionsCommand.cs" />\r
+ <Compile Include="Commands\OpenOptionsScreenCommand.cs" />\r
<Compile Include="Commands\ProcessShortcutCommand.cs" />\r
<Compile Include="Commands\SourceMenuCommand.cs" />\r
<Compile Include="Commands\AdvancedEncoderOptionsCommand.cs" />\r
<Compile Include="Converters\Audio\AudioQueueDisplayConverter.cs" />\r
<Compile Include="Converters\BooleanToHiddenVisibilityConverter.cs" />\r
<Compile Include="Converters\Options\OptionsTabConverter.cs" />\r
+ <Compile Include="Converters\Options\OptionsTabNameConverter.cs" />\r
<Compile Include="Converters\Subtitles\SubtitlesQueueDisplayConverter.cs" />\r
<Compile Include="Converters\Video\VideoEncoderConverter.cs" />\r
<Compile Include="Helpers\GrayscaleImage.cs" />\r
<Compile Include="Helpers\GrowlCommunicator.cs" />\r
+ <Compile Include="Model\OptionsTab.cs" />\r
<Compile Include="Services\DriveDetectService.cs" />\r
<Compile Include="Services\EncodeServiceWrapper.cs" />\r
<Compile Include="Services\Interfaces\IDriveDetectService.cs" />\r
--- /dev/null
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="OptionsTab.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
+// A enum representing each tab on the options screen.\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
+\r
+namespace HandBrakeWPF.Model\r
+{\r
+ using System.ComponentModel.DataAnnotations;\r
+\r
+ /// <summary>\r
+ /// A enum representing each tab on the options screen.\r
+ /// </summary>\r
+ public enum OptionsTab\r
+ {\r
+ [Display(Name = "General")]\r
+ General = 0,\r
+\r
+ [Display(Name = "Output Files")]\r
+ OutputFiles,\r
+\r
+ [Display(Name = "Audio and Subtitles")]\r
+ AudioAndSubtitles,\r
+\r
+ [Display(Name = "Advanced")]\r
+ Advanced,\r
+\r
+ [Display(Name = "Updates")]\r
+ Updates,\r
+\r
+ [Display(Name = "About HandBrake")]\r
+ About,\r
+ }\r
+}\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Looks up a localized string similar to Copyright (C) 2003-2013 The HandBrake Team\r
+ ///\r
+ ///This program is free software; you can redistribute it and/or\r
+ ///modify it under the terms of the GNU General Public License\r
+ ///as published by the Free Software Foundation; either version 2\r
+ ///of the License, or (at your option) any later version.\r
+ ///\r
+ ///This program is distributed in the hope that it will be useful,\r
+ ///but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ ///MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ ///GNU General Public License f [rest of string was truncated]";.\r
+ /// </summary>\r
+ public static string About_GPL {\r
+ get {\r
+ return ResourceManager.GetString("About_GPL", resourceCulture);\r
+ }\r
+ }\r
+ \r
/// <summary>\r
/// Looks up a localized string similar to You can optionally store a maximum resolution for encodes that use this preset. There are 3 modes:\r
///\r
The above controls are only a subset of useful x264 parameters. \r
This box allows you to add or modify additional or current parameters as desired. </value>\r
</data>\r
+ <data name="About_GPL" xml:space="preserve">\r
+ <value>Copyright (C) 2003-2013 The HandBrake Team\r
+\r
+This program is free software; you can redistribute it and/or\r
+modify it under the terms of the GNU General Public License\r
+as published by the Free Software Foundation; either version 2\r
+of the License, or (at your option) any later version.\r
+\r
+This program is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+GNU General Public License for more details.\r
+\r
+You should have received a copy of the GNU General Public License\r
+along with this program; if not, write to the Free Software\r
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</value>\r
+ </data>\r
</root>
\ No newline at end of file
using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop.Model.Encoding;\r
\r
+ using HandBrakeWPF.Commands;\r
+ using HandBrakeWPF.Model;\r
using HandBrakeWPF.ViewModels.Interfaces;\r
\r
/// <summary>\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Open the options screen to the Audio and Subtitles tab.\r
+ /// </summary>\r
+ public void SetDefaultBehaviour()\r
+ {\r
+ OpenOptionsScreenCommand command = new OpenOptionsScreenCommand();\r
+ command.Execute(OptionsTab.AudioAndSubtitles);\r
+ }\r
+\r
#endregion\r
\r
#region Implemented Interfaces\r
\r
namespace HandBrakeWPF.ViewModels.Interfaces\r
{\r
+ using HandBrakeWPF.Model;\r
+\r
/// <summary>\r
/// The Options Screen View Model Interface\r
/// </summary>\r
public interface IOptionsViewModel\r
{\r
+ /// <summary>\r
+ /// The goto tab.\r
+ /// </summary>\r
+ /// <param name="tab">\r
+ /// The tab.\r
+ /// </param>\r
+ void GotoTab(OptionsTab tab);\r
}\r
}
\ No newline at end of file
/// </summary>\r
public void OpenAboutApplication()\r
{\r
- Window window = Application.Current.Windows.Cast<Window>().FirstOrDefault(x => x.GetType() == typeof(AboutView));\r
-\r
- if (window != null)\r
- {\r
- window.Activate();\r
- }\r
- else\r
- {\r
- this.WindowManager.ShowWindow(IoC.Get<IAboutViewModel>());\r
- }\r
+ OpenOptionsScreenCommand command = new OpenOptionsScreenCommand();\r
+ command.Execute(OptionsTab.About);\r
}\r
\r
/// <summary>\r
/// </summary>\r
public void CheckForUpdates()\r
{\r
- this.ProgramStatusLabel = "Checking for Updates ...";\r
- this.updateService.CheckForUpdates(this.HandleManualUpdateCheckResults);\r
+ OpenOptionsScreenCommand command = new OpenOptionsScreenCommand();\r
+ command.Execute(OptionsTab.Updates);\r
}\r
\r
/// <summary>\r
this.ProgramStatusLabel = "A New Update is Available. Goto Tools Menu > Options to Install";\r
}\r
}\r
-\r
- /// <summary>\r
- /// Handle Update Check Results\r
- /// </summary>\r
- /// <param name="information">\r
- /// The information.\r
- /// </param>\r
- private void HandleManualUpdateCheckResults(UpdateCheckInformation information)\r
- {\r
- if (information.NewVersionAvailable)\r
- {\r
- MessageBox.Show("A New Version is available. Goto Tools Menu > Options to Install or visit http://handbrake.fr for details.", "Update Available", MessageBoxButton.OK, MessageBoxImage.Information);\r
- }\r
- else\r
- {\r
- MessageBox.Show("There is no new updates at this time.", "No Update Available", MessageBoxButton.OK, MessageBoxImage.Information);\r
- }\r
-\r
- this.ProgramStatusLabel = "Ready";\r
- }\r
-\r
#endregion\r
\r
#region Event Handlers\r
/// <summary>\r
/// The options tab that is selected.\r
/// </summary>\r
- private string selectedTab;\r
+ private OptionsTab selectedTab;\r
\r
/// <summary>\r
/// Update Message\r
this.updateService = updateService;\r
this.OnLoad();\r
\r
- this.SelectedTab = "General";\r
+ this.SelectedTab = OptionsTab.General;\r
this.UpdateMessage = "Click 'Check for Updates' to check for new versions";\r
}\r
\r
\r
#region Window Properties\r
\r
- /// <summary>\r
- /// Gets OptionTabs.\r
- /// </summary>\r
- public IEnumerable<string> OptionTabs\r
- {\r
- get\r
- {\r
- return new List<string> { "General", "Output Files", "Audio and Subtitles", "Advanced", "Updates" };\r
- }\r
- }\r
-\r
/// <summary>\r
/// Gets or sets SelectedTab.\r
/// </summary>\r
- public string SelectedTab\r
+ public OptionsTab SelectedTab\r
{\r
get\r
{\r
this.NotifyOfPropertyChange(() => this.SelectedTab);\r
}\r
}\r
+\r
+ /// <summary>\r
+ /// Gets or sets the about view model.\r
+ /// </summary>\r
+ public IAboutViewModel AboutViewModel { get; set; }\r
+\r
#endregion\r
\r
#region Properties\r
}\r
\r
/// <summary>\r
- /// Enable Debugging features in the UI.\r
+ /// Gets or sets a value indicating whether debug features are enabled.\r
/// </summary>\r
public bool EnableDebugFeatures\r
{\r
Process.Start(Path.Combine(Path.GetTempPath(), "handbrake-setup.exe"));\r
Application.Current.Shutdown();\r
}\r
+\r
+ /// <summary>\r
+ /// The goto tab.\r
+ /// </summary>\r
+ /// <param name="tab">\r
+ /// The tab.\r
+ /// </param>\r
+ public void GotoTab(OptionsTab tab)\r
+ {\r
+ this.SelectedTab = tab;\r
+ }\r
}\r
}
\ No newline at end of file
using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.ApplicationServices.Utilities;\r
\r
+ using HandBrakeWPF.Commands;\r
+ using HandBrakeWPF.Model;\r
using HandBrakeWPF.ViewModels.Interfaces;\r
\r
using Ookii.Dialogs.Wpf;\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Open the options screen to the Audio and Subtitles tab.\r
+ /// </summary>\r
+ public void SetDefaultBehaviour()\r
+ {\r
+ OpenOptionsScreenCommand command = new OpenOptionsScreenCommand();\r
+ command.Execute(OptionsTab.AudioAndSubtitles);\r
+ }\r
+\r
#endregion\r
\r
#region Implemented Interfaces\r
-<Window x:Class="HandBrakeWPF.Views.AboutView"\r
+<UserControl x:Class="HandBrakeWPF.Views.AboutView"\r
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
- xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"\r
- Title="{Binding Title}"\r
- Width="600"\r
- Height="320"\r
- ResizeMode="NoResize"\r
- TextOptions.TextFormattingMode="Display"\r
- WindowStartupLocation="CenterScreen">\r
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"\r
+ TextOptions.TextFormattingMode="Display">\r
\r
<Grid>\r
<Grid.RowDefinitions>\r
\r
<Grid Grid.Column="1">\r
<Grid.RowDefinitions>\r
- <RowDefinition Height="Auto" />\r
<RowDefinition Height="Auto" />\r
<RowDefinition Height="Auto" />\r
<RowDefinition Height="*" />\r
<StackPanel Grid.Row="0"\r
Margin="5,10,0,0"\r
Orientation="Horizontal">\r
- <TextBlock Margin="0,0,5,0"\r
- FontSize="14"\r
- FontWeight="Bold"\r
- Text="HandBrake" />\r
- <TextBlock Margin="0,0,0,1"\r
- VerticalAlignment="Bottom"\r
- Text="{Binding Version}" />\r
+ <TextBlock Margin="0,0,5,0" FontSize="12" FontWeight="Bold" Text="HandBrake " />\r
+ <TextBlock Margin="0,0,0,1" FontSize="12" VerticalAlignment="Bottom" Text="{Binding Version}" />\r
</StackPanel>\r
\r
- <TextBlock Grid.Row="1"\r
- Margin="5,0,0,0 "\r
- Text="Copyright 2003-2013 HandBrake Team" />\r
+ <TextBlock Grid.Row="1" Margin="5,10,0,5" Text="License: " />\r
\r
- <TextBlock Grid.Row="2"\r
- Margin="5,10,0,5"\r
- Text="License:" />\r
- <TextBox Grid.Row="3"\r
- Margin="10,0,10,10"\r
- HorizontalAlignment="Stretch"\r
- VerticalAlignment="Stretch"\r
- IsReadOnly="True"\r
- TextWrapping="Wrap"\r
- VerticalScrollBarVisibility="Auto">\r
- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r
- You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
- </TextBox>\r
+ <TextBox Text="{x:Static Properties:Resources.About_GPL}" Grid.Row="2" Margin="10,0,10,10" HorizontalAlignment="Stretch"\r
+ VerticalAlignment="Stretch" IsReadOnly="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" />\r
\r
</Grid>\r
</Grid>\r
\r
- <StackPanel Grid.Row="1"\r
- HorizontalAlignment="Stretch"\r
- Background="LightGray">\r
- <Button Margin="0,5,10,5"\r
- HorizontalAlignment="Right"\r
- VerticalAlignment="Center"\r
- Content="Close"\r
- IsDefault="True"\r
- Micro:Message.Attach="[Event Click] = [Action Close]"\r
- Padding="12,2" />\r
- </StackPanel>\r
</Grid>\r
-</Window>\r
+</UserControl>\r
\r
namespace HandBrakeWPF.Views\r
{\r
- using System.Windows;\r
+ using System.Windows.Controls;\r
\r
/// <summary>\r
/// Interaction logic for AboutView.xaml\r
/// </summary>\r
- public partial class AboutView : Window\r
+ public partial class AboutView : UserControl\r
{\r
/// <summary>\r
/// Initializes a new instance of the <see cref="AboutView"/> class.\r
<MenuItem Header="Add All Remaining Selected Languages" cal:Message.Attach="[Event Click] = [Action AddAllRemainingForSelectedLanguages]" />\r
<Separator />\r
<MenuItem Header="Clear All" cal:Message.Attach="[Event Click] = [Action Clear]" />\r
+ <Separator />\r
+ <MenuItem Header="Configure Default Behaviours" cal:Message.Attach="[Event Click] = [Action SetDefaultBehaviour]" />\r
</ContextMenu>\r
</ListBox.ContextMenu>\r
\r
<ListBox.ItemTemplate>\r
<DataTemplate>\r
-\r
- \r
- \r
- \r
+ \r
<Grid HorizontalAlignment="Stretch">\r
<Grid.RowDefinitions>\r
<RowDefinition Height="Auto" />\r
xmlns:Helpers="clr-namespace:HandBrakeWPF.Helpers"\r
xmlns:Options="clr-namespace:HandBrakeWPF.Converters.Options"\r
xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"\r
- xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" Background="White">\r
+ xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" xmlns:local="clr-namespace:HandBrakeWPF.Model"\r
+ Background="White">\r
\r
<UserControl.Resources>\r
<Style TargetType="Button">\r
</Style>\r
\r
<Options:OptionsTabConverter x:Key="tabConverter" />\r
+ <Options:OptionsTabNameConverter x:Key="tabNameConverter" />\r
+ \r
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />\r
+\r
+ <ObjectDataProvider MethodName="GetValues"\r
+ ObjectType="{x:Type local:OptionsTab}"\r
+ x:Key="OptionTabsList">\r
+ <ObjectDataProvider.MethodParameters>\r
+ <x:Type TypeName="local:OptionsTab" />\r
+ </ObjectDataProvider.MethodParameters>\r
+ </ObjectDataProvider>\r
</UserControl.Resources>\r
\r
<Grid>\r
<RowDefinition Height="Auto" />\r
</Grid.RowDefinitions>\r
\r
-\r
<StackPanel Orientation="Vertical" Grid.Column="0" Margin="10,10,0,0">\r
<Border BorderThickness="0 0 0 1" BorderBrush="LightGray" Margin="0,0,0,10">\r
<TextBlock Text="Preferences" FontSize="16" />\r
</Border>\r
\r
- <ListBox ItemsSource="{Binding OptionTabs}" SelectedItem="{Binding SelectedTab}"\r
+ <ListBox ItemsSource="{Binding Source={StaticResource OptionTabsList}}" SelectedItem="{Binding SelectedTab}"\r
BorderThickness="0" Background="Transparent">\r
+ <ListBox.ItemTemplate>\r
+ <DataTemplate>\r
+ <TextBlock Text="{Binding Converter={StaticResource tabNameConverter}}"/>\r
+ </DataTemplate>\r
+ </ListBox.ItemTemplate>\r
</ListBox>\r
\r
</StackPanel>\r
<StackPanel Orientation="Vertical">\r
\r
<StackPanel Name="General" Orientation="Vertical" Margin="10,10,0,0"\r
- Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter='General'}">\r
+ Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.General}}">\r
\r
<Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
<TextBlock Text="General" FontSize="16" />\r
</StackPanel>\r
\r
<StackPanel Name="Output" Orientation="Vertical" Margin="10,10,0,0"\r
- Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter='Output Files'}">\r
+ Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.OutputFiles}}">\r
\r
<Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
<TextBlock Text="Output Files" FontSize="16" />\r
</StackPanel>\r
\r
<StackPanel Name="Audio" Orientation="Vertical" Margin="10,10,0,0"\r
- Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter='Audio and Subtitles'}">\r
+ Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.AudioAndSubtitles}}">\r
\r
\r
<Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
</StackPanel>\r
\r
<StackPanel Name="Advanced" Orientation="Vertical" Margin="10,10,0,0"\r
- Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter='Advanced'}">\r
+ Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.Advanced}}">\r
\r
<Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
<TextBlock Text="Advanced" FontSize="16" />\r
</StackPanel>\r
\r
<StackPanel Name="Updates" Orientation="Vertical" Margin="10,10,0,0"\r
- Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter='Updates'}">\r
+ Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.Updates}}">\r
\r
\r
<Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
</StackPanel>\r
\r
</StackPanel>\r
+\r
+ <StackPanel Name="About" Orientation="Vertical" Margin="10,10,0,0"\r
+ Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.About}}">\r
+\r
+\r
+ <Border BorderThickness="0 0 0 1" BorderBrush="LightGray">\r
+ <TextBlock Text="About HandBrake" FontSize="16" />\r
+ </Border>\r
+\r
+ <ContentControl x:Name="AboutViewModel" />\r
+\r
+ </StackPanel>\r
</StackPanel>\r
</ScrollViewer>\r
\r
<MenuItem Header="Add All Remaining Selected Languages" cal:Message.Attach="[Event Click] = [Action AddAllRemainingForSelectedLanguages]" /> \r
<Separator />\r
<MenuItem Header="Clear All" cal:Message.Attach="[Event Click] = [Action Clear]" />\r
+ <Separator />\r
+ <MenuItem Header="Configure Default Behaviours" cal:Message.Attach="[Event Click] = [Action SetDefaultBehaviour]" />\r
</ContextMenu>\r
</ListBox.ContextMenu>\r
\r