Match forcedSubtitles = Regex.Match(input, @"-F");\r
\r
//H264 Tab\r
- Match x264 = Regex.Match(input, @"-x ([,a-zA-Z0-9=:-]*)");\r
+ Match x264 = Regex.Match(input, @"-x ([.,/a-zA-Z0-9=:-]*)");\r
\r
//Program Options\r
Match verbose = Regex.Match(input, @"-v");\r
thisQuery.q_denoise = "None";\r
if (denoise.Success != false)\r
{\r
- switch (denoise.ToString().Replace("--denoise=", ""))\r
+ switch (denoise.ToString().Replace("--denoise=", "").Replace("\"", ""))\r
{\r
case "weak":\r
thisQuery.q_denoise = "Weak";\r
<DependentUpon>frmUpdater.cs</DependentUpon>\r
</Compile>\r
<Compile Include="Functions\Common.cs" />\r
+ <Compile Include="Functions\Presets.cs" />\r
<Compile Include="Functions\RssReader.cs" />\r
<Compile Include="Functions\CLI.cs" />\r
<Compile Include="Functions\QueryParser.cs" />\r
// Build Number\r
// Revision\r
//\r
-[assembly: AssemblyVersion("0.9.2.0")]\r
-[assembly: AssemblyFileVersion("0.9.2.0")]\r
+[assembly: AssemblyVersion("0.9.3.0")]\r
+[assembly: AssemblyFileVersion("0.9.3.0")]\r
[assembly: NeutralResourcesLanguageAttribute("")]\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("0.9.3")]\r
+ [global::System.Configuration.DefaultSettingValueAttribute("SVN1477")]\r
public string hb_version {\r
get {\r
return ((string)(this["hb_version"]));\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("2008043001")]\r
+ [global::System.Configuration.DefaultSettingValueAttribute("2008053100")]\r
public int hb_build {\r
get {\r
return ((int)(this["hb_build"]));\r
<Value Profile="(Default)">Checked</Value>\r
</Setting>\r
<Setting Name="hb_version" Type="System.String" Scope="User">\r
- <Value Profile="(Default)">0.9.3</Value>\r
+ <Value Profile="(Default)">SVN1477</Value>\r
</Setting>\r
<Setting Name="tooltipEnable" Type="System.String" Scope="User">\r
<Value Profile="(Default)">Checked</Value>\r
<Value Profile="(Default)">Checked</Value>\r
</Setting>\r
<Setting Name="hb_build" Type="System.Int32" Scope="User">\r
- <Value Profile="(Default)">2008043001</Value>\r
+ <Value Profile="(Default)">2008053100</Value>\r
</Setting>\r
<Setting Name="skipversion" Type="System.Int32" Scope="User">\r
<Value Profile="(Default)">0</Value>\r
<value>Checked</value>\r
</setting>\r
<setting name="hb_version" serializeAs="String">\r
- <value>SVN1457</value>\r
+ <value>SVN1477</value>\r
</setting>\r
<setting name="tooltipEnable" serializeAs="String">\r
<value>Checked</value>\r
<value>Checked</value>\r
</setting>\r
<setting name="hb_build" serializeAs="String">\r
- <value>2008051201</value>\r
+ <value>2008053100</value>\r
</setting>\r
<setting name="skipversion" serializeAs="String">\r
<value>0</value>\r
using System.Text;\r
using System.Windows.Forms;\r
using System.IO;\r
+using System.Windows.Forms;\r
\r
namespace Handbrake\r
{\r
{\r
Functions.Common hb_common_func = new Functions.Common();\r
\r
- string userPresets = Application.StartupPath.ToString() + "\\user_presets.dat";\r
- try\r
+ Boolean already_exists = false;\r
+ foreach (TreeNode treenode in frmMainWindow.treeView_presets.Nodes)\r
{\r
- // Create a StreamWriter and open the file\r
- StreamWriter line = File.AppendText(userPresets);\r
-\r
- // Generate and write the preset string to the file\r
- String query = hb_common_func.GenerateTheQuery(frmMainWindow);\r
- String preset = "+ " + txt_preset_name.Text + ": " + query;\r
- line.WriteLine(preset);\r
-\r
- // close the stream\r
- line.Close();\r
- line.Dispose();\r
- MessageBox.Show("Your profile has been sucessfully added.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);\r
+ if (treenode.ToString().Equals("TreeNode: --" + txt_preset_name.Text))\r
+ already_exists = true; \r
}\r
- catch (Exception exc)\r
+\r
+ if (already_exists == true)\r
+ MessageBox.Show("Sorry, a preset with this name already exists", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+ else\r
{\r
- MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
+ string userPresets = Application.StartupPath.ToString() + "\\user_presets.dat";\r
+ try\r
+ {\r
+ // Create a StreamWriter and open the file\r
+ StreamWriter line = File.AppendText(userPresets);\r
+\r
+ // Generate and write the preset string to the file\r
+ String query = hb_common_func.GenerateTheQuery(frmMainWindow);\r
+ String preset = "+ " + txt_preset_name.Text + ": " + query;\r
+ line.WriteLine(preset);\r
+\r
+ // close the stream\r
+ line.Close();\r
+ line.Dispose();\r
+ MessageBox.Show("Your profile has been sucessfully added.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);\r
+ }\r
+ catch (Exception exc)\r
+ {\r
+ MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
+ }\r
+ frmMainWindow.loadPresetPanel();\r
+ this.Close();\r
}\r
- frmMainWindow.loadPresetPanel();\r
- this.Close();\r
}\r
}\r
}\r
// ISO_Open\r
// \r
this.ISO_Open.DefaultExt = "ISO";\r
- this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.vob;*.ts;*.mpeg;*.mpeg;*.avi;*.mp4;*.mkv;";\r
+ this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.vob;*.ts;*.mpeg;*.mpeg;*.avi;*.mp4;*.mkv;" +\r
+ "";\r
this.ISO_Open.RestoreDirectory = true;\r
this.ISO_Open.SupportMultiDottedExtensions = true;\r
- \r
// \r
// FileToolStripMenuItem\r
// \r
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;\r
private System.Windows.Forms.ToolStripMenuItem mnu_open;\r
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;\r
- private System.Windows.Forms.TreeView treeView_presets;\r
internal System.Windows.Forms.CheckBox check_vfr;\r
internal System.Windows.Forms.CheckBox check_iPodAtom;\r
internal System.Windows.Forms.Label lbl_vfr;\r
internal System.Windows.Forms.TrackBar trackBar2;\r
internal System.Windows.Forms.Label label16;\r
internal System.Windows.Forms.Label lbl_drc1;\r
+ internal System.Windows.Forms.TreeView treeView_presets;\r
\r
}\r
}
\ No newline at end of file
else\r
presetInput.ReadLine();\r
}\r
-\r
presetInput.Close();\r
}\r
\r