summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-03-17 18:36:35 +0000
committersr55 <[email protected]>2012-03-17 18:36:35 +0000
commit7686ecbf127a41291a7fe76852f93fe7a6f60fb4 (patch)
treeb77205d3464bc0ae3fb374acbe0acedf72916834 /win/CS/HandBrakeWPF
parentf87e4ae9727bbb10040e5dd5cd99a6a7f1f4dd1d (diff)
WinGui: (WPF) Wired up the Add Preset window and setup the build scripts to create Alpha Builds for this project.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4508 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r--win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs14
-rw-r--r--win/CS/HandBrakeWPF/HandBrakeWPF.csproj6
-rw-r--r--win/CS/HandBrakeWPF/Installer/MakeAlpha.nsi.tmpl167
-rw-r--r--win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl60
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs97
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs11
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/Views/AddPresetView.xaml15
8 files changed, 352 insertions, 20 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
index b5ee371b6..d5663f2af 100644
--- a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
@@ -15,6 +15,7 @@ namespace HandBrakeWPF.Converters
using System;
using HandBrake.ApplicationServices.Functions;
+ using HandBrake.ApplicationServices.Model;
using HandBrake.Interop.Model.Encoding;
using HandBrake.Interop.Model.Encoding.x264;
@@ -70,7 +71,10 @@ namespace HandBrakeWPF.Converters
return EnumHelper<AudioEncoder>.GetEnumDisplayValues(typeof(AudioEncoder));
}
-
+ if (value is IEnumerable<PresetPictureSettingsMode>)
+ {
+ return EnumHelper<PresetPictureSettingsMode>.GetEnumDisplayValues(typeof(PresetPictureSettingsMode));
+ }
// Single Items
if (targetType == typeof(x264Preset) || value.GetType() == typeof(x264Preset))
@@ -97,6 +101,10 @@ namespace HandBrakeWPF.Converters
{
return EnumHelper<AudioEncoder>.GetDisplay((AudioEncoder)value);
}
+ if (targetType == typeof(PresetPictureSettingsMode) || value.GetType() == typeof(PresetPictureSettingsMode))
+ {
+ return EnumHelper<PresetPictureSettingsMode>.GetDisplay((PresetPictureSettingsMode)value);
+ }
return null;
}
@@ -148,6 +156,10 @@ namespace HandBrakeWPF.Converters
{
return EnumHelper<AudioEncoder>.GetValue(value.ToString());
}
+ if (targetType == typeof(PresetPictureSettingsMode) || value.GetType() == typeof(PresetPictureSettingsMode))
+ {
+ return EnumHelper<PresetPictureSettingsMode>.GetValue(value.ToString());
+ }
return null;
}
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
index 2b4a5f501..a65f102d8 100644
--- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
+++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
@@ -196,6 +196,8 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="app.config" />
+ <None Include="Installer\MakeAlpha.nsi.tmpl" />
+ <None Include="Properties\AssemblyInfo.cs.tmpl" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -321,6 +323,10 @@
<Project>{F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}</Project>
<Name>HandBrakeInterop</Name>
</ProjectReference>
+ <ProjectReference Include="..\HandBrakeCS.csproj">
+ <Project>{A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}</Project>
+ <Name>HandBrakeCS</Name>
+ </ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
diff --git a/win/CS/HandBrakeWPF/Installer/MakeAlpha.nsi.tmpl b/win/CS/HandBrakeWPF/Installer/MakeAlpha.nsi.tmpl
new file mode 100644
index 000000000..53ac01d52
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Installer/MakeAlpha.nsi.tmpl
@@ -0,0 +1,167 @@
+/* Resources.Designer.cs $
+
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr/>.
+ It may be used under the terms of the GNU General Public License. */
+
+; Script generated by the HM NIS Edit Script Wizard.
+
+; HM NIS Edit Wizard helper defines
+!define PRODUCT_NAME "HandBrake WPF (Pre-Alpha)"
+!define PRODUCT_VERSION "$WCREV$"
+!define PRODUCT_VERSION_NUMBER "svn$WCREV$"
+!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\HandBrakeWPF.exe"
+!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
+!define PRODUCT_UNINST_ROOT_KEY "HKLM"
+
+;Required .NET framework
+!define MIN_FRA_MAJOR "4"
+!define MIN_FRA_MINOR "0"
+!define MIN_FRA_BUILD "*"
+
+SetCompressor lzma
+
+; MUI 1.67 compatible ------
+!include "MUI.nsh"
+
+; MUI Settings
+!define MUI_ABORTWARNING
+!define MUI_ICON "handbrakepineapple.ico"
+!define MUI_UNICON "handbrakepineapple.ico"
+
+; Welcome page
+!insertmacro MUI_PAGE_WELCOME
+; License page
+!insertmacro MUI_PAGE_LICENSE "doc\COPYING"
+; Directory page
+!insertmacro MUI_PAGE_DIRECTORY
+; Instfiles page
+!insertmacro MUI_PAGE_INSTFILES
+; Finish page
+;!define MUI_FINISHPAGE_RUN "$INSTDIR\HandBrakeWPF.exe"
+!insertmacro MUI_PAGE_FINISH
+
+; Uninstaller pages
+!insertmacro MUI_UNPAGE_INSTFILES
+
+; Language files
+!insertmacro MUI_LANGUAGE "English"
+
+; MUI end ------
+
+Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
+OutFile "HandBrake-${PRODUCT_VERSION_NUMBER}-WPF_PRE_ALPHA.exe"
+
+!include WordFunc.nsh
+!insertmacro VersionCompare
+!include LogicLib.nsh
+
+InstallDir "$PROGRAMFILES\HandbrakeWPF"
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
+ShowInstDetails show
+ShowUnInstDetails show
+
+Var InstallDotNET
+
+Function .onInit
+
+ ; Begin Only allow one version
+ System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e'
+ Pop $R0
+
+ StrCmp $R0 0 +3
+ MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." /SD IDOK
+ Abort
+
+ ;Remove previous version
+ ReadRegStr $R0 HKLM \
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}\" \
+ "UninstallString"
+ StrCmp $R0 "" done
+
+ MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
+ "${PRODUCT_NAME} is already installed. $\n$\nClick `OK` to remove the \
+ previous version or `Cancel` to continue." /SD IDOK \
+ IDOK uninst
+ goto done
+
+ ;Run the uninstaller
+ uninst:
+ IfSilent +3
+ Exec $INSTDIR\uninst.exe
+ goto done
+ Exec '"$INSTDIR\uninst.exe" /S'
+ done:
+FunctionEnd
+
+Section "Handbrake" SEC01
+ SetOutPath "$INSTDIR"
+ SetOverwrite ifnewer
+
+ ; Install Files
+ File "*.exe"
+ CreateDirectory "$SMPROGRAMS\HandBrakeWPF"
+ CreateShortCut "$SMPROGRAMS\Handbrake\HandBrakeWPF.lnk" "$INSTDIR\HandBrakeWPF.exe"
+ CreateShortCut "$DESKTOP\HandBrakeWPF.lnk" "$INSTDIR\HandBrakeWPF.exe"
+ File "*.dll"
+ File "*.config"
+ File "*.xml"
+
+ ; Copy the standard doc set into the doc folder
+ SetOutPath "$INSTDIR\doc"
+ SetOverwrite ifnewer
+ File "doc\*.*"
+
+ ; Copy the standard fonts config set into the fonts folder
+ SetOutPath "$INSTDIR\fonts"
+ SetOverwrite ifnewer
+ File /r "fonts\*.*"
+SectionEnd
+
+Section -AdditionalIcons
+ CreateShortCut "$SMPROGRAMS\Handbrake\Uninstall.lnk" "$INSTDIR\uninst.exe"
+SectionEnd
+
+Section -Post
+ WriteUninstaller "$INSTDIR\uninst.exe"
+ WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\HandBrakeWPF.exe"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\HandBrakeWPF.exe"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
+SectionEnd
+
+
+Function un.onUninstSuccess
+ HideWindow
+ MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK
+FunctionEnd
+
+Function un.onInit
+ MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2
+ Abort
+FunctionEnd
+
+Section Uninstall
+ Delete "$INSTDIR\uninst.exe"
+
+ Delete "$INSTDIR\*.*"
+ Delete "$INSTDIR\doc\*.*"
+ Delete "$INSTDIR\fonts\*.*"
+ Delete "$INSTDIR\fonts\conf.d\*.*"
+ Delete "$INSTDIR\fonts\conf.avail\*.*"
+ RMDir "$INSTDIR\doc"
+ RMDIR "$INSTDIR\fonts\conf.d"
+ RMDIR "$INSTDIR\fonts\conf.avail"
+ RMDIR "$INSTDIR\fonts"
+ Delete "$SMPROGRAMS\HandBrakeWPF\Uninstall.lnk"
+ Delete "$DESKTOP\HandBrakeWPF.lnk"
+ Delete "$SMPROGRAMS\HandBrakeWPF\HandBrakeWPF.lnk"
+ RMDir "$SMPROGRAMS\HandBrakeWPF"
+ RMDir "$INSTDIR"
+
+ DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
+ DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
+ SetAutoClose true
+SectionEnd
+
diff --git a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl
new file mode 100644
index 000000000..a55652272
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl
@@ -0,0 +1,60 @@
+/* AssemblyInfo.cs $
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
+
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HandBrake")]
+[assembly: AssemblyDescription("HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HandBrake Team")]
+[assembly: AssemblyProduct("HandBrake")]
+[assembly: AssemblyCopyright("Copyright © HandBrake Team 2011-2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
+//inside a <PropertyGroup>. For example, if you are using US english
+//in your source files, set the <UICulture> to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("0.9.6.$WCREV$")]
+[assembly: NeutralResourcesLanguage("")] \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
index c46792c7c..77210737a 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
@@ -9,12 +9,15 @@
namespace HandBrakeWPF.ViewModels
{
+ using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Windows;
using Caliburn.Micro;
+ using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
+ using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
@@ -38,6 +41,16 @@ namespace HandBrakeWPF.ViewModels
private readonly IErrorService errorService;
/// <summary>
+ /// Backing fields for Selected Picture settings mode.
+ /// </summary>
+ private PresetPictureSettingsMode selectedPictureSettingMode;
+
+ /// <summary>
+ /// Backging field for show custom inputs
+ /// </summary>
+ private bool showCustomInputs;
+
+ /// <summary>
/// Initializes a new instance of the <see cref="AddPresetViewModel"/> class.
/// </summary>
/// <param name="windowManager">
@@ -54,15 +67,83 @@ namespace HandBrakeWPF.ViewModels
this.presetService = presetService;
this.errorService = errorService;
this.Title = "Add Preset";
- this.Preset = new Preset {IsBuildIn = false, IsDefault = false, Category = "User Presets"};
+ this.Preset = new Preset { IsBuildIn = false, IsDefault = false, Category = PresetService.UserPresetCatgoryName };
+ this.PictureSettingsModes = EnumHelper<PresetPictureSettingsMode>.GetEnumList();
}
/// <summary>
- /// Gets or sets the Preset
+ /// Gets the Preset
/// </summary>
public Preset Preset { get; private set; }
/// <summary>
+ /// Gets or sets PictureSettingsModes.
+ /// </summary>
+ public IEnumerable<PresetPictureSettingsMode> PictureSettingsModes { get; set; }
+
+ /// <summary>
+ /// Gets or sets CustomWidth.
+ /// </summary>
+ public int CustomWidth { get; set; }
+
+ /// <summary>
+ /// Gets or sets CustomHeight.
+ /// </summary>
+ public int CustomHeight { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether ShowCustomInputs.
+ /// </summary>
+ public bool ShowCustomInputs
+ {
+ get
+ {
+ return this.showCustomInputs;
+ }
+ set
+ {
+ this.showCustomInputs = value;
+ this.NotifyOfPropertyChange(() => this.ShowCustomInputs);
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets SelectedPictureSettingMode.
+ /// </summary>
+ public PresetPictureSettingsMode SelectedPictureSettingMode
+ {
+ get
+ {
+ return this.selectedPictureSettingMode;
+ }
+ set
+ {
+ this.selectedPictureSettingMode = value;
+ this.ShowCustomInputs = value == PresetPictureSettingsMode.Custom;
+
+ if (SelectedPictureSettingMode == PresetPictureSettingsMode.Custom)
+ {
+ this.Preset.Task.MaxHeight = null;
+ this.Preset.Task.MaxWidth = null;
+ }
+
+ if (SelectedPictureSettingMode == PresetPictureSettingsMode.Custom)
+ {
+ this.Preset.Task.Width = this.CustomWidth;
+ this.Preset.Task.Height = this.CustomHeight;
+ this.Preset.Task.MaxHeight = null;
+ this.Preset.Task.MaxWidth = null;
+ }
+
+ if (SelectedPictureSettingMode == PresetPictureSettingsMode.SourceMaximum)
+ {
+ this.Preset.Task.MaxWidth = this.Preset.Task.Width;
+ this.Preset.Task.MaxHeight = this.Preset.Task.Height;
+ }
+ }
+ }
+
+ /// <summary>
/// Prepare the Preset window to create a Preset Object later.
/// </summary>
/// <param name="task">
@@ -70,11 +151,7 @@ namespace HandBrakeWPF.ViewModels
/// </param>
public void Setup(EncodeTask task)
{
- task.UsesPictureFilters = this.Preset.UsePictureFilters;
- task.UsesMaxPictureSettings = false; // TODO
- task.UsesPictureSettings = false; // TODO
- this.Preset.Task = task;
- this.Preset.Query = QueryGeneratorUtility.GenerateQuery(task);
+ this.Preset.Task = new EncodeTask(task);
}
/// <summary>
@@ -94,6 +171,9 @@ namespace HandBrakeWPF.ViewModels
return;
}
+ this.Preset.UsePictureFilters = this.Preset.UsePictureFilters;
+ this.Preset.PictureSettingsMode = this.SelectedPictureSettingMode;
+
bool added = this.presetService.Add(this.Preset);
if (!added)
{
@@ -106,6 +186,9 @@ namespace HandBrakeWPF.ViewModels
}
}
+ /// <summary>
+ /// Cancel adding a preset
+ /// </summary>
public void Cancel()
{
this.Close();
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 67472bd81..fcaf5aa02 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -937,10 +937,10 @@ namespace HandBrakeWPF.ViewModels
if (!string.IsNullOrEmpty(filename))
{
- EncodeTask parsed = PlistPresetHandler.Import(filename);
- if (this.presetService.CheckIfPresetExists(parsed.PresetName))
+ Preset preset = PlistPresetHandler.Import(filename);
+ if (this.presetService.CheckIfPresetExists(preset.Name))
{
- if (!presetService.CanUpdatePreset(parsed.PresetName))
+ if (!presetService.CanUpdatePreset(preset.Name))
{
MessageBox.Show(
"You can not import a preset with the same name as a built-in preset.",
@@ -958,18 +958,15 @@ namespace HandBrakeWPF.ViewModels
MessageBoxImage.Warning);
if (result == MessageBoxResult.Yes)
{
- Preset preset = new Preset { Name = parsed.PresetName, CropSettings = parsed.UsesPictureSettings, Task = parsed };
-
presetService.Update(preset);
}
}
else
{
- Preset preset = new Preset { Name = parsed.PresetName, Task = parsed, CropSettings = parsed.UsesPictureSettings, };
presetService.Add(preset);
}
- this.NotifyOfPropertyChange("Presets");
+ this.NotifyOfPropertyChange(() => this.Presets);
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
index 444208076..309bc6df3 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
@@ -476,7 +476,7 @@ namespace HandBrakeWPF.ViewModels
{
// TODO: These all need to be handled correctly.
- if (Task.UsesMaxPictureSettings)
+ if (preset.PictureSettingsMode == PresetPictureSettingsMode.SourceMaximum)
{
this.Task.MaxWidth = preset.Task.MaxWidth;
this.Task.MaxHeight = preset.Task.MaxHeight;
diff --git a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml
index 97d3974b7..216ee64e5 100644
--- a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml
@@ -3,10 +3,15 @@
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" xmlns:cal="http://www.caliburnproject.org"
- mc:Ignorable="d"
+ xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" mc:Ignorable="d"
Title="{Binding Title}"
Width="350" Height="310">
+ <Window.Resources>
+ <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ <Converters:EnumComboConverter x:Key="enumComboConverter" />
+ </Window.Resources>
+
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="#FFF1F0EF">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -48,9 +53,11 @@
<TextBlock Text="Picture Settings:" FontWeight="Bold" Grid.Row="1" Grid.Column="0" Margin="0,20,0,0" />
<TextBlock Text="Use Picture Size:" Grid.Row="2" Grid.Column="0" />
- <ComboBox Width="100" ItemsSource="{Binding PictureSettingModes}" SelectedItem="{Binding SelectedPictureMode}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" />
-
- <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Row="3" Grid.Column="1">
+ <ComboBox Width="125" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left"
+ ItemsSource="{Binding PictureSettingsModes, Converter={StaticResource enumComboConverter}}"
+ SelectedItem="{Binding SelectedPictureSettingMode, Converter={StaticResource enumComboConverter}}"/>
+
+ <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Visibility="{Binding ShowCustomInputs, Converter={StaticResource boolToVisConverter}}" Grid.Row="3" Grid.Column="1">
<TextBox Width="50" Text="{Binding CustomWidth}" />
<TextBlock Text="X" FontWeight="Bold" Margin="10,0,10,0" />
<TextBox Width="50" Text="{Binding CustomHeight}" />