summaryrefslogtreecommitdiffstats
path: root/win/C#/frmAddPreset.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/frmAddPreset.cs')
-rw-r--r--win/C#/frmAddPreset.cs71
1 files changed, 57 insertions, 14 deletions
diff --git a/win/C#/frmAddPreset.cs b/win/C#/frmAddPreset.cs
index 30537f9e1..a04b07428 100644
--- a/win/C#/frmAddPreset.cs
+++ b/win/C#/frmAddPreset.cs
@@ -1,8 +1,7 @@
/* frmAddPreset.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. */
+ 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
{
@@ -11,26 +10,61 @@ namespace Handbrake
using System.Windows.Forms;
using Presets;
+ /// <summary>
+ /// The Add Preset Window
+ /// </summary>
public partial class frmAddPreset : Form
{
- private readonly frmMain _frmMainWindow;
- private readonly PresetsHandler _presetCode;
- private readonly string _query = string.Empty;
+ /// <summary>
+ /// The Main Window
+ /// </summary>
+ private readonly frmMain mainWindow;
+ /// <summary>
+ /// The Preset Handler
+ /// </summary>
+ private readonly PresetsHandler presetCode;
+
+ /// <summary>
+ /// The CLI Query
+ /// </summary>
+ private readonly string query = string.Empty;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="frmAddPreset"/> class.
+ /// </summary>
+ /// <param name="fmw">
+ /// The fmw.
+ /// </param>
+ /// <param name="queryString">
+ /// The query string.
+ /// </param>
+ /// <param name="presetHandler">
+ /// The preset handler.
+ /// </param>
public frmAddPreset(frmMain fmw, string queryString, PresetsHandler presetHandler)
{
InitializeComponent();
- _frmMainWindow = fmw;
- _presetCode = presetHandler;
- this._query = queryString;
+ mainWindow = fmw;
+ presetCode = presetHandler;
+ this.query = queryString;
}
- private void btn_add_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the Add button event.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void BtnAddClick(object sender, EventArgs e)
{
- if (_presetCode.Add(txt_preset_name.Text.Trim(), _query, check_pictureSettings.Checked))
+ if (presetCode.Add(txt_preset_name.Text.Trim(), query, check_pictureSettings.Checked))
{
TreeNode presetTreeview = new TreeNode(txt_preset_name.Text.Trim()) {ForeColor = Color.Black};
- _frmMainWindow.treeView_presets.Nodes.Add(presetTreeview);
+ mainWindow.treeView_presets.Nodes.Add(presetTreeview);
this.Close();
}
else
@@ -38,7 +72,16 @@ namespace Handbrake
MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
- private void btn_cancel_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the Cancel button event
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void BtnCancelClick(object sender, EventArgs e)
{
this.Close();
}