diff options
author | sr55 <[email protected]> | 2010-02-20 18:08:41 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-02-20 18:08:41 +0000 |
commit | b9d00019295781bed79eca280bac798b7bb7c64f (patch) | |
tree | 341aac9ec87d84d71be18a42afe0ee52ef497d3f /win/C#/Functions/PresetLoader.cs | |
parent | e5d5bc94b2217a9eb65857d83d31138d126947e4 (diff) |
WinGui:
- Tied Microsoft StyleCop into the build process.
- Included a settings file for StyleCop so anyone who picks up the project can use the global project settings.
- Started Clearing up Warnings generated by stylecop.
- Also included Resharper 5 config files that users can use.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3129 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/PresetLoader.cs')
-rw-r--r-- | win/C#/Functions/PresetLoader.cs | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs index a6614b99c..a550bfa1d 100644 --- a/win/C#/Functions/PresetLoader.cs +++ b/win/C#/Functions/PresetLoader.cs @@ -1,27 +1,36 @@ /* PresetLoader.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;
-using System.Drawing;
-using System.Windows.Forms;
-using Handbrake.Model;
+ 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. */
namespace Handbrake.Functions
{
- class PresetLoader
+ using System;
+ using System.Drawing;
+ using System.Windows.Forms;
+
+ /// <summary>
+ /// Load a preset into the main Window
+ /// </summary>
+ public class PresetLoader
{
/// <summary>
/// This function takes in a Query which has been parsed by QueryParser and
/// set's all the GUI widgets correctly.
/// </summary>
- /// <param name="mainWindow"></param>
- /// <param name="presetQuery">The Parsed CLI Query</param>
- /// <param name="name">Name of the preset</param>
- /// <param name="pictureSettings">Save picture settings in the preset</param>
- public static void LoadPreset(frmMain mainWindow, QueryParser presetQuery, string name, Boolean pictureSettings)
+ /// <param name="mainWindow">
+ /// FrmMain window
+ /// </param>
+ /// <param name="presetQuery">
+ /// The Parsed CLI Query
+ /// </param>
+ /// <param name="name">
+ /// Name of the preset
+ /// </param>
+ /// <param name="pictureSettings">
+ /// Save picture settings in the preset
+ /// </param>
+ public static void LoadPreset(frmMain mainWindow, QueryParser presetQuery, string name, bool pictureSettings)
{
#region Source
// Reset some vaules to stock first to prevent errors.
@@ -163,12 +172,12 @@ namespace Handbrake.Functions {
double cqStep = Properties.Settings.Default.x264cqstep;
int value;
- double x264step = cqStep;
+ double x264Step = cqStep;
double presetValue = presetQuery.VideoQuality;
- double x = 51 / x264step;
+ double x = 51 / x264Step;
- double calculated = presetValue / x264step;
+ double calculated = presetValue / x264Step;
calculated = x - calculated;
int.TryParse(calculated.ToString(), out value);
|