diff options
Diffstat (limited to 'win/C#/frmAddPreset.cs')
-rw-r--r-- | win/C#/frmAddPreset.cs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/win/C#/frmAddPreset.cs b/win/C#/frmAddPreset.cs index 256b9b9fc..30537f9e1 100644 --- a/win/C#/frmAddPreset.cs +++ b/win/C#/frmAddPreset.cs @@ -4,19 +4,20 @@ 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;
-
namespace Handbrake
{
+ using System;
+ using System.Drawing;
+ using System.Windows.Forms;
+ using Presets;
+
public partial class frmAddPreset : Form
{
private readonly frmMain _frmMainWindow;
- readonly Presets.PresetsHandler _presetCode;
- private readonly string _query = "";
+ private readonly PresetsHandler _presetCode;
+ private readonly string _query = string.Empty;
- public frmAddPreset(frmMain fmw, string queryString, Presets.PresetsHandler presetHandler)
+ public frmAddPreset(frmMain fmw, string queryString, PresetsHandler presetHandler)
{
InitializeComponent();
_frmMainWindow = fmw;
@@ -28,12 +29,13 @@ namespace Handbrake {
if (_presetCode.Add(txt_preset_name.Text.Trim(), _query, check_pictureSettings.Checked))
{
- TreeNode presetTreeview = new TreeNode(txt_preset_name.Text.Trim()) { ForeColor = Color.Black };
+ TreeNode presetTreeview = new TreeNode(txt_preset_name.Text.Trim()) {ForeColor = Color.Black};
_frmMainWindow.treeView_presets.Nodes.Add(presetTreeview);
this.Close();
- }
+ }
else
- MessageBox.Show("Sorry, that preset name already exists. Please choose another!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show("Sorry, that preset name already exists. Please choose another!", "Warning",
+ MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
private void btn_cancel_Click(object sender, EventArgs e)
|