summaryrefslogtreecommitdiffstats
path: root/win/C#/frmAddPreset.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-12-03 16:49:41 +0000
committersr55 <[email protected]>2009-12-03 16:49:41 +0000
commit7fcdab64f2b7c161b19b8cd0250cfbb799729759 (patch)
treef4ceebb6f00d651102a2843ebc5a2bb0d7868ace /win/C#/frmAddPreset.cs
parentb993d4fee1ecb820739bff92ffc8f4cf00a0b558 (diff)
WinGui:
- Some minor code refactoring git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3000 b64f7644-9d1e-0410-96f1-a4d463321fa5
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