summaryrefslogtreecommitdiffstats
path: root/win/C#/frmAddPreset.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-02-18 21:56:19 +0000
committersr55 <[email protected]>2011-02-18 21:56:19 +0000
commitda4025b6af1d0f5550159b87bf6a14c025752107 (patch)
treefd8ccfe1d0cab83b70f39afcc4e85b8c3de185fb /win/C#/frmAddPreset.cs
parent1955a68ebccad7cd78534f6140550456b3e22756 (diff)
WinGui
- Wire in the new preset service. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3799 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmAddPreset.cs')
-rw-r--r--win/C#/frmAddPreset.cs20
1 files changed, 15 insertions, 5 deletions
diff --git a/win/C#/frmAddPreset.cs b/win/C#/frmAddPreset.cs
index 208dd1cc3..bfc804cd5 100644
--- a/win/C#/frmAddPreset.cs
+++ b/win/C#/frmAddPreset.cs
@@ -8,11 +8,12 @@ namespace Handbrake
using System;
using System.Windows.Forms;
+ using HandBrake.ApplicationServices.Model;
+ using HandBrake.ApplicationServices.Services;
+
using Handbrake.Functions;
using Handbrake.Model;
- using Presets;
-
/// <summary>
/// The Add Preset Window
/// </summary>
@@ -23,7 +24,7 @@ namespace Handbrake
/// <summary>
/// The Preset Handler
/// </summary>
- private readonly PresetsHandler presetCode;
+ private readonly PresetService presetCode;
/// <summary>
/// Initializes a new instance of the <see cref="frmAddPreset"/> class.
@@ -34,7 +35,7 @@ namespace Handbrake
/// <param name="presetHandler">
/// The preset handler.
/// </param>
- public frmAddPreset(frmMain mainWindow, PresetsHandler presetHandler)
+ public frmAddPreset(frmMain mainWindow, PresetService presetHandler)
{
InitializeComponent();
this.mainWindow = mainWindow;
@@ -78,7 +79,16 @@ namespace Handbrake
string query = QueryGenerator.GenerateQueryForPreset(mainWindow, pictureSettingsMode, check_useFilters.Checked, 0, 0);
- if (presetCode.Add(txt_preset_name.Text.Trim(), query, pictureSettingsMode != QueryPictureSettingsMode.None, string.Empty))
+
+ Preset preset = new Preset
+ {
+ Name = this.txt_preset_name.Text,
+ Query = query,
+ CropSettings = pictureSettingsMode != QueryPictureSettingsMode.None,
+ Description = string.Empty
+ };
+
+ if (presetCode.Add(preset))
{
this.DialogResult = DialogResult.OK;
this.Close();