summaryrefslogtreecommitdiffstats
path: root/win/C#/Presets
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/Presets')
-rw-r--r--win/C#/Presets/PresetsHandler.cs9
-rw-r--r--win/C#/Presets/preset.cs10
2 files changed, 15 insertions, 4 deletions
diff --git a/win/C#/Presets/PresetsHandler.cs b/win/C#/Presets/PresetsHandler.cs
index 172125a9f..fbd36fbdb 100644
--- a/win/C#/Presets/PresetsHandler.cs
+++ b/win/C#/Presets/PresetsHandler.cs
@@ -20,13 +20,14 @@ namespace Handbrake.Presets
/// </summary>
/// <param name="presetName">String, The name of the new preset</param>
/// <param name="query">String, the CLI query for the new preset</param>
- public Boolean addPreset(string presetName, string query)
+ public Boolean addPreset(string presetName, string query, Boolean pictureSettings)
{
if (checkIfPresetExists(presetName) == false)
{
Preset newPreset = new Preset();
newPreset.Name = presetName;
newPreset.Query = query;
+ newPreset.PictureSettings = pictureSettings;
user_presets.Add(newPreset);
updateUserPresetsFile();
return true;
@@ -107,20 +108,20 @@ namespace Handbrake.Presets
/// </summary>
/// <param name="name">String, The preset's name</param>
/// <returns>String, the CLI query for the given preset name</returns>
- public string getCliForPreset(string name)
+ public Preset getPreset(string name)
{
// Built In Presets
foreach (Preset item in presets)
{
if (item.Name == name)
- return item.Query;
+ return item;
}
// User Presets
foreach (Preset item in user_presets)
{
if (item.Name == name)
- return item.Query;
+ return item;
}
return null;
diff --git a/win/C#/Presets/preset.cs b/win/C#/Presets/preset.cs
index 58d3be966..ee983427a 100644
--- a/win/C#/Presets/preset.cs
+++ b/win/C#/Presets/preset.cs
@@ -15,6 +15,7 @@ namespace Handbrake.Presets
private string category = null;
private string name;
private string query;
+ private Boolean pictureSettings;
/// <summary>
/// Get or Set the preset's level. This indicated if it is a root or child node
@@ -52,5 +53,14 @@ namespace Handbrake.Presets
set { this.query = value; }
}
+ /// <summary>
+ /// Get or set the usage of Picture Settings in presets.
+ /// </summary>
+ public Boolean PictureSettings
+ {
+ get { return pictureSettings; }
+ set { this.pictureSettings = value; }
+ }
+
}
} \ No newline at end of file