diff options
author | sr55 <[email protected]> | 2008-12-30 22:47:48 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-12-30 22:47:48 +0000 |
commit | 382ca3aad89ad78b1c074ee0c272939dd80dc888 (patch) | |
tree | 6706fde00864b7f61b166b9700f7df4b11911a77 /win/C#/frmMain | |
parent | eef37cf07dc0a9c28b938688469ca0bbdbe35720 (diff) |
WinGui:
- Set Default now set's the currently selected preset to default, not the current settings.
- Add Preset can now optionally add a flag to allow saving of picture size information (just like the macgui)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2052 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain')
-rw-r--r-- | win/C#/frmMain/PresetLoader.cs | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/win/C#/frmMain/PresetLoader.cs b/win/C#/frmMain/PresetLoader.cs index f634909b3..b21b3556a 100644 --- a/win/C#/frmMain/PresetLoader.cs +++ b/win/C#/frmMain/PresetLoader.cs @@ -15,7 +15,7 @@ namespace Handbrake /// <param name="mainWindow"></param>
/// <param name="presetQuery">The Parsed CLI Query</param>
/// <param name="name">Name of the preset</param>
- public void presetLoader(frmMain mainWindow, Functions.QueryParser presetQuery, string name)
+ public void presetLoader(frmMain mainWindow, Functions.QueryParser presetQuery, string name, Boolean pictureSettings)
{
// ---------------------------
// Setup the GUI
@@ -80,7 +80,35 @@ namespace Handbrake if (presetQuery.CropBottom == "0" && presetQuery.CropTop == "0")
if (presetQuery.CropLeft == "0" && presetQuery.CropRight == "0")
mainWindow.check_customCrop.Checked = true;
-
+
+ mainWindow.text_width.Text = "";
+ mainWindow.text_height.Text = "";
+
+ if (pictureSettings == true)
+ {
+ if (presetQuery.CropTop != null)
+ {
+ int top, bottom, left, right;
+ int.TryParse(presetQuery.CropTop, out top);
+ int.TryParse(presetQuery.CropBottom, out bottom);
+ int.TryParse(presetQuery.CropLeft, out left);
+ int.TryParse(presetQuery.CropRight, out right);
+
+ mainWindow.check_customCrop.Checked = true;
+ mainWindow.text_top.Value = top;
+ mainWindow.text_bottom.Value = bottom;
+ mainWindow.text_left.Value = left;
+ mainWindow.text_right.Value = right;
+
+ }
+
+ if (presetQuery.Width != 0)
+ mainWindow.text_width.Text = presetQuery.Width.ToString();
+
+ if (presetQuery.Height != 0)
+ mainWindow.text_height.Text = presetQuery.Height.ToString();
+ }
+
mainWindow.drp_deInterlace_option.Text = presetQuery.DeInterlace;
mainWindow.drp_deNoise.Text = presetQuery.DeNoise;
@@ -118,20 +146,6 @@ namespace Handbrake mainWindow.drp_anamorphic.SelectedIndex = 0;
}
- if (presetQuery.Width != 0)
- mainWindow.text_width.Text = presetQuery.Width.ToString();
- else
- {
- mainWindow.text_width.Text = "";
- }
-
- if (presetQuery.Height != 0)
- mainWindow.text_height.Text = presetQuery.Height.ToString();
- else
- {
- mainWindow.text_height.Text = "";
- }
-
// Set the public max width and max height varibles in frmMain
// These are used by the query generator to determine if it should use -X or -w / -Y or -h
if (presetQuery.MaxWidth != 0)
@@ -145,7 +159,7 @@ namespace Handbrake mainWindow.text_height.Text = presetQuery.MaxHeight.ToString();
mainWindow.maxHeight = presetQuery.MaxHeight;
}
-
+
#endregion
|