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.cs29
1 files changed, 10 insertions, 19 deletions
diff --git a/win/C#/frmAddPreset.cs b/win/C#/frmAddPreset.cs
index 8ffd76320..256b9b9fc 100644
--- a/win/C#/frmAddPreset.cs
+++ b/win/C#/frmAddPreset.cs
@@ -12,42 +12,33 @@ namespace Handbrake
{
public partial class frmAddPreset : Form
{
- private readonly frmMain frmMainWindow;
- readonly Presets.PresetsHandler presetCode;
- private readonly string query = "";
+ private readonly frmMain _frmMainWindow;
+ readonly Presets.PresetsHandler _presetCode;
+ private readonly string _query = "";
- public frmAddPreset(frmMain fmw, string query_string, Presets.PresetsHandler presetHandler)
+ public frmAddPreset(frmMain fmw, string queryString, Presets.PresetsHandler presetHandler)
{
InitializeComponent();
- frmMainWindow = fmw;
- presetCode = presetHandler;
- this.query = query_string;
+ _frmMainWindow = fmw;
+ _presetCode = presetHandler;
+ this._query = queryString;
}
private void btn_add_Click(object sender, EventArgs e)
{
- Boolean pictureSettings = false;
- if (check_pictureSettings.Checked)
- pictureSettings = true;
-
- if (presetCode.Add(txt_preset_name.Text.Trim(), query, pictureSettings))
+ if (_presetCode.Add(txt_preset_name.Text.Trim(), _query, check_pictureSettings.Checked))
{
- TreeNode preset_treeview = new TreeNode(txt_preset_name.Text.Trim()) { ForeColor = Color.Black };
- frmMainWindow.treeView_presets.Nodes.Add(preset_treeview);
-
- //frmMainWindow.loadPresetPanel();
+ 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);
- }
}
private void btn_cancel_Click(object sender, EventArgs e)
{
this.Close();
}
-
}
} \ No newline at end of file