diff options
author | sr55 <[email protected]> | 2007-12-20 18:17:42 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2007-12-20 18:17:42 +0000 |
commit | 497e1b008f2ad22b2a67405e53edd047167a398a (patch) | |
tree | 26f7303012ba259faec831894ee28c0f67d0ae32 /win/C# | |
parent | 2f4b0dffd1b896bd7186e8be3d03cc56ae28e051 (diff) |
WinGui:
- Some more code code cleanup done. Nothing major.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1141 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#')
-rw-r--r-- | win/C#/Functions/Common.cs | 2 | ||||
-rw-r--r-- | win/C#/Parsing/AudioTrack.cs | 6 | ||||
-rw-r--r-- | win/C#/Parsing/Chapter.cs | 6 | ||||
-rw-r--r-- | win/C#/Parsing/DVD.cs | 4 | ||||
-rw-r--r-- | win/C#/Parsing/Parser.cs | 9 | ||||
-rw-r--r-- | win/C#/Parsing/Subtitle.cs | 6 | ||||
-rw-r--r-- | win/C#/Parsing/Title.cs | 65 | ||||
-rw-r--r-- | win/C#/Program.cs | 14 | ||||
-rw-r--r-- | win/C#/Properties/AssemblyInfo.cs | 4 | ||||
-rw-r--r-- | win/C#/Properties/Settings.Designer.cs | 43 | ||||
-rw-r--r-- | win/C#/Properties/Settings.settings | 16 | ||||
-rw-r--r-- | win/C#/app.config | 16 | ||||
-rw-r--r-- | win/C#/frmAbout.cs | 4 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 16 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 2 | ||||
-rw-r--r-- | win/C#/frmOptions.Designer.cs | 151 | ||||
-rw-r--r-- | win/C#/frmOptions.cs | 12 | ||||
-rw-r--r-- | win/C#/frmReadDVD.cs | 39 | ||||
-rw-r--r-- | win/C#/frmUpdater.cs | 2 |
19 files changed, 133 insertions, 284 deletions
diff --git a/win/C#/Functions/Common.cs b/win/C#/Functions/Common.cs index e298beac2..839044140 100644 --- a/win/C#/Functions/Common.cs +++ b/win/C#/Functions/Common.cs @@ -21,7 +21,7 @@ namespace Handbrake.Functions string build = rssRead.build();
int latest = int.Parse(build);
- int current = Properties.Settings.Default.build;
+ int current = Properties.Settings.Default.hb_build;
int skip = Properties.Settings.Default.skipversion;
if (latest == skip)
diff --git a/win/C#/Parsing/AudioTrack.cs b/win/C#/Parsing/AudioTrack.cs index 95d9f307e..2977a995c 100644 --- a/win/C#/Parsing/AudioTrack.cs +++ b/win/C#/Parsing/AudioTrack.cs @@ -106,9 +106,7 @@ namespace Handbrake.Parsing return thisTrack;
}
else
- {
return null;
- }
}
public static AudioTrack[] ParseList(StringReader output)
@@ -118,13 +116,9 @@ namespace Handbrake.Parsing {
AudioTrack thisTrack = AudioTrack.Parse(output);
if (thisTrack != null)
- {
tracks.Add(thisTrack);
- }
else
- {
break;
- }
}
return tracks.ToArray();
}
diff --git a/win/C#/Parsing/Chapter.cs b/win/C#/Parsing/Chapter.cs index caea54bb5..f2d10f51e 100644 --- a/win/C#/Parsing/Chapter.cs +++ b/win/C#/Parsing/Chapter.cs @@ -54,9 +54,7 @@ namespace Handbrake.Parsing return thisChapter;
}
else
- {
return null;
- }
}
public static Chapter[] ParseList(StringReader output)
@@ -73,13 +71,9 @@ namespace Handbrake.Parsing Chapter thisChapter = Chapter.Parse(output);
if (thisChapter != null)
- {
chapters.Add(thisChapter);
- }
else
- {
break;
- }
}
return chapters.ToArray();
}
diff --git a/win/C#/Parsing/DVD.cs b/win/C#/Parsing/DVD.cs index f0982a47c..c06244ab3 100644 --- a/win/C#/Parsing/DVD.cs +++ b/win/C#/Parsing/DVD.cs @@ -40,13 +40,9 @@ namespace Handbrake.Parsing while (!output.EndOfStream)
{
if ((char)output.Peek() == '+')
- {
thisDVD.m_titles.AddRange(Title.ParseList(output.ReadToEnd()));
- }
else
- {
output.ReadLine();
- }
}
}
catch (Exception exc)
diff --git a/win/C#/Parsing/Parser.cs b/win/C#/Parsing/Parser.cs index 799e8a303..7e00ddc2b 100644 --- a/win/C#/Parsing/Parser.cs +++ b/win/C#/Parsing/Parser.cs @@ -72,13 +72,10 @@ namespace Handbrake.Parsing this.m_buffer += tmp;
Match m = Regex.Match(tmp, "^Scanning title ([0-9]*) of ([0-9]*)");
if (OnReadLine != null)
- {
OnReadLine(this, tmp);
- }
+
if (m.Success && OnScanProgress != null)
- {
OnScanProgress(this, int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));
- }
}
catch (Exception exc)
{
@@ -92,12 +89,10 @@ namespace Handbrake.Parsing string tmp = base.ReadToEnd();
try
{
-
this.m_buffer += tmp;
if (OnReadToEnd != null)
- {
OnReadToEnd(this, tmp);
- }
+
}
catch (Exception exc)
{
diff --git a/win/C#/Parsing/Subtitle.cs b/win/C#/Parsing/Subtitle.cs index 6d83d2613..defcb5b0e 100644 --- a/win/C#/Parsing/Subtitle.cs +++ b/win/C#/Parsing/Subtitle.cs @@ -55,9 +55,7 @@ namespace Handbrake.Parsing return thisSubtitle;
}
else
- {
return null;
- }
}
public static Subtitle[] ParseList(StringReader output)
@@ -68,13 +66,9 @@ namespace Handbrake.Parsing Subtitle thisSubtitle = Subtitle.Parse(output);
if (thisSubtitle != null)
- {
subtitles.Add(thisSubtitle);
- }
else
- {
break;
- }
}
return subtitles.ToArray();
}
diff --git a/win/C#/Parsing/Title.cs b/win/C#/Parsing/Title.cs index b1f02d9c6..8f5d0c05a 100644 --- a/win/C#/Parsing/Title.cs +++ b/win/C#/Parsing/Title.cs @@ -129,8 +129,8 @@ namespace Handbrake.Parsing /// <returns>A string representing this track in the format: {title #} (00:00:00)</returns>
public override string ToString()
{
- return string.Format("{0} ({1:00}:{2:00}:{3:00})", this.m_titleNumber, this.m_duration.Hours,
- this.m_duration.Minutes, this.m_duration.Seconds);
+ return string.Format("{0} ({1:00}:{2:00}:{3:00})", this.m_titleNumber, this.m_duration.Hours,
+ this.m_duration.Minutes, this.m_duration.Seconds);
}
@@ -151,18 +151,11 @@ namespace Handbrake.Parsing {
// Match track number for this title
if (m.Success)
- {
- //MessageBox.Show(m.Groups[1].Value);
- thisTitle.m_titleNumber = int.Parse(m.Groups[1].Value.Trim().ToString());
- //.Trim().ToString() Not sure why this is needed but some systems seem to get a rogue
- }
- }
+ thisTitle.m_titleNumber = int.Parse(m.Groups[1].Value.Trim().ToString());
+ }
catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("Title.cs - Track Number " + exc.ToString());
- }
+ MessageBox.Show("Title.cs - Track Number " + exc.ToString());
}
output.ReadLine();
@@ -172,16 +165,11 @@ namespace Handbrake.Parsing {
m = Regex.Match(output.ReadLine(), @"^ \+ duration: ([0-9]{2}:[0-9]{2}:[0-9]{2})");
if (m.Success)
- {
thisTitle.m_duration = TimeSpan.Parse(m.Groups[1].Value);
- }
}
catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("Title.cs - Duration " + exc.ToString());
- }
+ MessageBox.Show("Title.cs - Duration " + exc.ToString());
}
try
@@ -196,10 +184,7 @@ namespace Handbrake.Parsing }
catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("Title.cs - Resolution and Aspect " + exc.ToString());
- }
+ MessageBox.Show("Title.cs - Resolution and Aspect " + exc.ToString());
}
try
@@ -207,16 +192,11 @@ namespace Handbrake.Parsing // Get autocrop region for this title
m = Regex.Match(output.ReadLine(), @"^ \+ autocrop: ([0-9]*)/([0-9]*)/([0-9]*)/([0-9]*)");
if (m.Success)
- {
thisTitle.m_autoCrop = new int[4] { int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value), int.Parse(m.Groups[3].Value), int.Parse(m.Groups[4].Value) };
- }
}
catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("Title.cs - Auto Crop " + exc.ToString());
- }
+ MessageBox.Show("Title.cs - Auto Crop " + exc.ToString());
}
@@ -226,10 +206,7 @@ namespace Handbrake.Parsing }
catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("Title.cs - Chapters EXC " + exc.ToString());
- }
+ MessageBox.Show("Title.cs - Chapters EXC " + exc.ToString());
}
try
@@ -238,10 +215,7 @@ namespace Handbrake.Parsing }
catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("Title.cs - Audio EXC " + exc.ToString());
- }
+ MessageBox.Show("Title.cs - Audio EXC " + exc.ToString());
}
try
@@ -250,21 +224,15 @@ namespace Handbrake.Parsing }
catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("Title.cs - Subtitles EXC " + exc.ToString());
- }
+ MessageBox.Show("Title.cs - Subtitles EXC " + exc.ToString());
}
}
catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("Title.cs - Parse " + exc.ToString());
- }
+ MessageBox.Show("Title.cs - Parse " + exc.ToString());
}
-
-
+
+
return thisTitle;
}
@@ -281,10 +249,7 @@ namespace Handbrake.Parsing }
catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("Title.cs - ParseList " + exc.ToString());
- }
+ MessageBox.Show("Title.cs - ParseList " + exc.ToString());
}
return titles.ToArray();
}
diff --git a/win/C#/Program.cs b/win/C#/Program.cs index b5af0d74c..e764a1c29 100644 --- a/win/C#/Program.cs +++ b/win/C#/Program.cs @@ -23,9 +23,6 @@ namespace Handbrake [STAThread]
static void Main()
{
- // 633265950858281250 = 16:52 28-Sep-07 //864000000000 nanoseconds per day
- //long start = DateTime.Now.Ticks;
- //if (start > 633274593039531250) {MessageBox.Show("Sorry, This development build of Handbrake has expired."); return; } // Will Expire Oct 8th
// Check the system meets the system requirements.
Boolean launch = true;
@@ -42,19 +39,16 @@ namespace Handbrake // Make sure the system has enough RAM. 384MB or greater
uint memory = MemoryCheck.CheckMemeory();
memory = memory / 1024 / 1024;
-
- if (memory < 320)
+
+ if (memory < 256)
{
- MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n Insufficient RAM. 512MB or greater required. You have: " + memory.ToString() + "MB", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n Insufficient RAM. 384MB or greater required. You have: " + memory.ToString() + "MB", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
launch = false;
}
}
catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("frmMain.cs - systemCheck() " + exc.ToString());
- }
+ MessageBox.Show("frmMain.cs - systemCheck() " + exc.ToString());
}
diff --git a/win/C#/Properties/AssemblyInfo.cs b/win/C#/Properties/AssemblyInfo.cs index 505af031d..47a916ce7 100644 --- a/win/C#/Properties/AssemblyInfo.cs +++ b/win/C#/Properties/AssemblyInfo.cs @@ -30,6 +30,6 @@ using System.Resources; // Build Number
// Revision
//
-[assembly: AssemblyVersion("2.4.0.1")]
-[assembly: AssemblyFileVersion("2.4.0.1")]
+[assembly: AssemblyVersion("0.9.2.0")]
+[assembly: AssemblyFileVersion("0.9.2.0")]
[assembly: NeutralResourcesLanguageAttribute("")]
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index 7c112d8a6..8eb65e28c 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -86,37 +86,12 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0.9.2")]
- public string CliVersion {
+ public string hb_version {
get {
- return ((string)(this["CliVersion"]));
+ return ((string)(this["hb_version"]));
}
set {
- this["CliVersion"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("Checked")]
- public string GuiDebug {
- get {
- return ((string)(this["GuiDebug"]));
- }
- set {
- this["GuiDebug"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("Program Error. Please enable debug more in: Tools > Options. If the error re-occu" +
- "rs, please report it on the forums.")]
- public string defaultError {
- get {
- return ((string)(this["defaultError"]));
- }
- set {
- this["defaultError"] = value;
+ this["hb_version"] = value;
}
}
@@ -146,7 +121,7 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
+ [global::System.Configuration.DefaultSettingValueAttribute("Checked")]
public string defaultUserSettings {
get {
return ((string)(this["defaultUserSettings"]));
@@ -159,12 +134,12 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1000")]
- public int build {
+ public int hb_build {
get {
- return ((int)(this["build"]));
+ return ((int)(this["hb_build"]));
}
set {
- this["build"] = value;
+ this["hb_build"] = value;
}
}
@@ -182,7 +157,7 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
+ [global::System.Configuration.DefaultSettingValueAttribute("Checked")]
public string updatePresets {
get {
return ((string)(this["updatePresets"]));
@@ -194,7 +169,7 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
+ [global::System.Configuration.DefaultSettingValueAttribute("Checked")]
public string autoNaming {
get {
return ((string)(this["autoNaming"]));
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index 2479d16ab..9b60aea65 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -17,15 +17,9 @@ <Setting Name="verbose" Type="System.String" Scope="User">
<Value Profile="(Default)">Checked</Value>
</Setting>
- <Setting Name="CliVersion" Type="System.String" Scope="User">
+ <Setting Name="hb_version" Type="System.String" Scope="User">
<Value Profile="(Default)">0.9.2</Value>
</Setting>
- <Setting Name="GuiDebug" Type="System.String" Scope="User">
- <Value Profile="(Default)">Checked</Value>
- </Setting>
- <Setting Name="defaultError" Type="System.String" Scope="User">
- <Value Profile="(Default)">Program Error. Please enable debug more in: Tools > Options. If the error re-occurs, please report it on the forums.</Value>
- </Setting>
<Setting Name="tooltipEnable" Type="System.String" Scope="User">
<Value Profile="(Default)">Checked</Value>
</Setting>
@@ -33,19 +27,19 @@ <Value Profile="(Default)">Do Nothing</Value>
</Setting>
<Setting Name="defaultUserSettings" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
+ <Value Profile="(Default)">Checked</Value>
</Setting>
- <Setting Name="build" Type="System.Int32" Scope="User">
+ <Setting Name="hb_build" Type="System.Int32" Scope="User">
<Value Profile="(Default)">1000</Value>
</Setting>
<Setting Name="skipversion" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="updatePresets" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
+ <Value Profile="(Default)">Checked</Value>
</Setting>
<Setting Name="autoNaming" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
+ <Value Profile="(Default)">Checked</Value>
</Setting>
<Setting Name="autoNamePath" Type="System.String" Scope="User">
<Value Profile="(Default)" />
diff --git a/win/C#/app.config b/win/C#/app.config index e019fd4a1..a35ba754c 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -22,15 +22,9 @@ <setting name="verbose" serializeAs="String">
<value>Checked</value>
</setting>
- <setting name="CliVersion" serializeAs="String">
+ <setting name="hb_version" serializeAs="String">
<value>0.9.2</value>
</setting>
- <setting name="GuiDebug" serializeAs="String">
- <value>Checked</value>
- </setting>
- <setting name="defaultError" serializeAs="String">
- <value>Program Error. Please enable debug more in: Tools > Options. If the error re-occurs, please report it on the forums.</value>
- </setting>
<setting name="tooltipEnable" serializeAs="String">
<value>Checked</value>
</setting>
@@ -38,19 +32,19 @@ <value>Do Nothing</value>
</setting>
<setting name="defaultUserSettings" serializeAs="String">
- <value />
+ <value>Checked</value>
</setting>
- <setting name="build" serializeAs="String">
+ <setting name="hb_build" serializeAs="String">
<value>1000</value>
</setting>
<setting name="skipversion" serializeAs="String">
<value>0</value>
</setting>
<setting name="updatePresets" serializeAs="String">
- <value />
+ <value>Checked</value>
</setting>
<setting name="autoNaming" serializeAs="String">
- <value />
+ <value>Checked</value>
</setting>
<setting name="autoNamePath" serializeAs="String">
<value />
diff --git a/win/C#/frmAbout.cs b/win/C#/frmAbout.cs index fabcea6e5..ab1ed2656 100644 --- a/win/C#/frmAbout.cs +++ b/win/C#/frmAbout.cs @@ -14,8 +14,8 @@ namespace Handbrake public frmAbout()
{
InitializeComponent();
- Version.Text = Properties.Settings.Default.CliVersion;
- lbl_build.Text = Properties.Settings.Default.build.ToString();
+ Version.Text = Properties.Settings.Default.hb_version;
+ lbl_build.Text = Properties.Settings.Default.hb_build.ToString();
}
private void btn_close_Click(object sender, EventArgs e)
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index cdfe818e6..8f7486c9a 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -31,7 +31,7 @@ namespace Handbrake this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label Label38;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();
this.File_Save = new System.Windows.Forms.SaveFileDialog();
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
@@ -315,7 +315,7 @@ namespace Handbrake this.btn_Browse.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_Browse.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_Browse.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_Browse.Location = new System.Drawing.Point(549, 20);
+ this.btn_Browse.Location = new System.Drawing.Point(540, 19);
this.btn_Browse.Name = "btn_Browse";
this.btn_Browse.Size = new System.Drawing.Size(78, 22);
this.btn_Browse.TabIndex = 5;
@@ -330,7 +330,7 @@ namespace Handbrake this.btn_destBrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_destBrowse.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_destBrowse.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_destBrowse.Location = new System.Drawing.Point(549, 19);
+ this.btn_destBrowse.Location = new System.Drawing.Point(540, 18);
this.btn_destBrowse.Name = "btn_destBrowse";
this.btn_destBrowse.Size = new System.Drawing.Size(83, 22);
this.btn_destBrowse.TabIndex = 2;
@@ -522,7 +522,7 @@ namespace Handbrake this.btn_setDefault.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_setDefault.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_setDefault.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_setDefault.Location = new System.Drawing.Point(113, 482);
+ this.btn_setDefault.Location = new System.Drawing.Point(115, 486);
this.btn_setDefault.Name = "btn_setDefault";
this.btn_setDefault.Size = new System.Drawing.Size(72, 22);
this.btn_setDefault.TabIndex = 1;
@@ -1915,9 +1915,9 @@ namespace Handbrake //
// number
//
- dataGridViewCellStyle4.Format = "N0";
- dataGridViewCellStyle4.NullValue = null;
- this.number.DefaultCellStyle = dataGridViewCellStyle4;
+ dataGridViewCellStyle1.Format = "N0";
+ dataGridViewCellStyle1.NullValue = null;
+ this.number.DefaultCellStyle = dataGridViewCellStyle1;
this.number.HeaderText = "Chapter Number";
this.number.MaxInputLength = 3;
this.number.Name = "number";
@@ -2049,7 +2049,7 @@ namespace Handbrake this.treeView_presets.FullRowSelect = true;
this.treeView_presets.HideSelection = false;
this.treeView_presets.ItemHeight = 17;
- this.treeView_presets.Location = new System.Drawing.Point(8, 22);
+ this.treeView_presets.Location = new System.Drawing.Point(10, 23);
this.treeView_presets.Name = "treeView_presets";
this.treeView_presets.ShowLines = false;
this.treeView_presets.Size = new System.Drawing.Size(177, 457);
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 03e48ef21..7a9a97d5d 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -58,7 +58,7 @@ namespace Handbrake Application.DoEvents();
// Set the Version number lable to the corect version.
- Version.Text = "Version " + Properties.Settings.Default.CliVersion;
+ Version.Text = "Version " + Properties.Settings.Default.hb_version;
// update the status
if (Properties.Settings.Default.updateStatus == "Checked")
diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs index a3fb17a91..39bc81a96 100644 --- a/win/C#/frmOptions.Designer.cs +++ b/win/C#/frmOptions.Designer.cs @@ -30,7 +30,6 @@ namespace Handbrake {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmOptions));
this.check_verbose = new System.Windows.Forms.CheckBox();
- this.check_guiDebug = new System.Windows.Forms.CheckBox();
this.btn_close = new System.Windows.Forms.Button();
this.drp_completeOption = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
@@ -49,16 +48,16 @@ namespace Handbrake this.label9 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.tab_debug = new System.Windows.Forms.TabPage();
+ this.label3 = new System.Windows.Forms.Label();
+ this.drp_Priority = new System.Windows.Forms.ComboBox();
+ this.Label11 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
+ this.drp_processors = new System.Windows.Forms.ComboBox();
+ this.Label4 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.label7 = new System.Windows.Forms.Label();
this.pathFinder = new System.Windows.Forms.FolderBrowserDialog();
- this.drp_processors = new System.Windows.Forms.ComboBox();
- this.Label4 = new System.Windows.Forms.Label();
- this.Label11 = new System.Windows.Forms.Label();
- this.drp_Priority = new System.Windows.Forms.ComboBox();
- this.label3 = new System.Windows.Forms.Label();
this.tab_options.SuspendLayout();
this.tab_general.SuspendLayout();
this.tabPage1.SuspendLayout();
@@ -70,26 +69,14 @@ namespace Handbrake //
this.check_verbose.AutoSize = true;
this.check_verbose.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_verbose.Location = new System.Drawing.Point(16, 152);
+ this.check_verbose.Location = new System.Drawing.Point(16, 127);
this.check_verbose.Name = "check_verbose";
- this.check_verbose.Size = new System.Drawing.Size(139, 17);
+ this.check_verbose.Size = new System.Drawing.Size(32, 17);
this.check_verbose.TabIndex = 51;
- this.check_verbose.Text = "Enable Verbose CLI";
+ this.check_verbose.Text = "s";
this.check_verbose.UseVisualStyleBackColor = true;
this.check_verbose.CheckedChanged += new System.EventHandler(this.check_verbose_CheckedChanged);
//
- // check_guiDebug
- //
- this.check_guiDebug.AutoSize = true;
- this.check_guiDebug.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_guiDebug.Location = new System.Drawing.Point(16, 129);
- this.check_guiDebug.Name = "check_guiDebug";
- this.check_guiDebug.Size = new System.Drawing.Size(131, 17);
- this.check_guiDebug.TabIndex = 52;
- this.check_guiDebug.Text = "Enable GUI Debug";
- this.check_guiDebug.UseVisualStyleBackColor = true;
- this.check_guiDebug.CheckedChanged += new System.EventHandler(this.check_guiDebug_CheckedChanged);
- //
// btn_close
//
this.btn_close.BackColor = System.Drawing.SystemColors.ControlLight;
@@ -308,7 +295,6 @@ namespace Handbrake this.tab_debug.Controls.Add(this.label3);
this.tab_debug.Controls.Add(this.drp_Priority);
this.tab_debug.Controls.Add(this.check_verbose);
- this.tab_debug.Controls.Add(this.check_guiDebug);
this.tab_debug.Controls.Add(this.Label11);
this.tab_debug.Controls.Add(this.label6);
this.tab_debug.Controls.Add(this.drp_processors);
@@ -320,6 +306,44 @@ namespace Handbrake this.tab_debug.Text = "Debug && Process";
this.tab_debug.UseVisualStyleBackColor = true;
//
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label3.Location = new System.Drawing.Point(13, 13);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(176, 13);
+ this.label3.TabIndex = 44;
+ this.label3.Text = "Process(or) Configuration";
+ //
+ // drp_Priority
+ //
+ this.drp_Priority.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.drp_Priority.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.drp_Priority.FormattingEnabled = true;
+ this.drp_Priority.Items.AddRange(new object[] {
+ "Realtime",
+ "High",
+ "Above Normal",
+ "Normal",
+ "Below Normal",
+ "Low"});
+ this.drp_Priority.Location = new System.Drawing.Point(163, 68);
+ this.drp_Priority.Name = "drp_Priority";
+ this.drp_Priority.Size = new System.Drawing.Size(111, 21);
+ this.drp_Priority.TabIndex = 43;
+ this.drp_Priority.SelectedIndexChanged += new System.EventHandler(this.drp_Priority_SelectedIndexChanged);
+ //
+ // Label11
+ //
+ this.Label11.AutoSize = true;
+ this.Label11.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Label11.Location = new System.Drawing.Point(15, 44);
+ this.Label11.Name = "Label11";
+ this.Label11.Size = new System.Drawing.Size(142, 13);
+ this.Label11.TabIndex = 40;
+ this.Label11.Text = "Number of processors: ";
+ //
// label6
//
this.label6.AutoSize = true;
@@ -330,34 +354,6 @@ namespace Handbrake this.label6.TabIndex = 1;
this.label6.Text = "Verbose and Debug mode";
//
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label8.Location = new System.Drawing.Point(50, 24);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(131, 13);
- this.label8.TabIndex = 61;
- this.label8.Text = "Handbrake Options";
- //
- // pictureBox2
- //
- this.pictureBox2.Image = global::Handbrake.Properties.Resources.General_Preferences;
- this.pictureBox2.Location = new System.Drawing.Point(12, 12);
- this.pictureBox2.Name = "pictureBox2";
- this.pictureBox2.Size = new System.Drawing.Size(32, 32);
- this.pictureBox2.TabIndex = 60;
- this.pictureBox2.TabStop = false;
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(50, 39);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(146, 13);
- this.label7.TabIndex = 59;
- this.label7.Text = "Modify program options.";
- //
// drp_processors
//
this.drp_processors.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@@ -389,43 +385,33 @@ namespace Handbrake this.Label4.TabIndex = 42;
this.Label4.Text = "Default Priority Level:";
//
- // Label11
+ // label8
//
- this.Label11.AutoSize = true;
- this.Label11.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Label11.Location = new System.Drawing.Point(15, 44);
- this.Label11.Name = "Label11";
- this.Label11.Size = new System.Drawing.Size(142, 13);
- this.Label11.TabIndex = 40;
- this.Label11.Text = "Number of processors: ";
+ this.label8.AutoSize = true;
+ this.label8.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label8.Location = new System.Drawing.Point(50, 24);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(131, 13);
+ this.label8.TabIndex = 61;
+ this.label8.Text = "Handbrake Options";
//
- // drp_Priority
+ // pictureBox2
//
- this.drp_Priority.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.drp_Priority.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.drp_Priority.FormattingEnabled = true;
- this.drp_Priority.Items.AddRange(new object[] {
- "Realtime",
- "High",
- "Above Normal",
- "Normal",
- "Below Normal",
- "Low"});
- this.drp_Priority.Location = new System.Drawing.Point(163, 68);
- this.drp_Priority.Name = "drp_Priority";
- this.drp_Priority.Size = new System.Drawing.Size(111, 21);
- this.drp_Priority.TabIndex = 43;
- this.drp_Priority.SelectedIndexChanged += new System.EventHandler(this.drp_Priority_SelectedIndexChanged);
+ this.pictureBox2.Image = global::Handbrake.Properties.Resources.General_Preferences;
+ this.pictureBox2.Location = new System.Drawing.Point(12, 12);
+ this.pictureBox2.Name = "pictureBox2";
+ this.pictureBox2.Size = new System.Drawing.Size(32, 32);
+ this.pictureBox2.TabIndex = 60;
+ this.pictureBox2.TabStop = false;
//
- // label3
+ // label7
//
- this.label3.AutoSize = true;
- this.label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label3.Location = new System.Drawing.Point(13, 13);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(176, 13);
- this.label3.TabIndex = 44;
- this.label3.Text = "Process(or) Configuration";
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(50, 39);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(146, 13);
+ this.label7.TabIndex = 59;
+ this.label7.Text = "Modify program options.";
//
// frmOptions
//
@@ -461,7 +447,6 @@ namespace Handbrake internal System.Windows.Forms.CheckBox check_verbose;
internal System.Windows.Forms.Button btn_close;
- internal System.Windows.Forms.CheckBox check_guiDebug;
internal System.Windows.Forms.ComboBox drp_completeOption;
internal System.Windows.Forms.Label label5;
private System.Windows.Forms.TabControl tab_options;
diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs index 7d12e1d97..42e5b045e 100644 --- a/win/C#/frmOptions.cs +++ b/win/C#/frmOptions.cs @@ -34,11 +34,6 @@ namespace Handbrake check_verbose.CheckState = CheckState.Checked;
}
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- check_guiDebug.CheckState = CheckState.Checked;
- }
-
if (Properties.Settings.Default.tooltipEnable == "Checked")
{
check_tooltip.CheckState = CheckState.Checked;
@@ -92,11 +87,6 @@ namespace Handbrake this.Close();
}
- private void check_guiDebug_CheckedChanged(object sender, EventArgs e)
- {
- Properties.Settings.Default.GuiDebug = check_guiDebug.CheckState.ToString();
- }
-
private void check_tooltip_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.tooltipEnable = check_tooltip.CheckState.ToString();
@@ -136,7 +126,7 @@ namespace Handbrake -
+
}
}
\ No newline at end of file diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs index 49197eaea..6ab820507 100644 --- a/win/C#/frmReadDVD.cs +++ b/win/C#/frmReadDVD.cs @@ -27,7 +27,7 @@ namespace Handbrake this.mainWindow = parent;
this.dvdInfo = dvdInfoWindow;
startScan();
-
+
}
private void startScan()
@@ -39,17 +39,10 @@ namespace Handbrake }
catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("frmReadDVD.cs - startScan " + exc.ToString());
- }
- else
- {
- MessageBox.Show(Properties.Settings.Default.defaultError.ToString());
- }
+ MessageBox.Show("frmReadDVD.cs - startScan " + exc.ToString());
}
}
-
+
private void updateUIElements()
{
try
@@ -67,19 +60,12 @@ namespace Handbrake mainWindow.drp_dvdtitle.Text = "Automatic";
mainWindow.drop_chapterFinish.Text = "Auto";
mainWindow.drop_chapterStart.Text = "Auto";
-
+
this.Close();
}
- catch(Exception exc)
+ catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("frmReadDVD.cs - updateUIElements " + exc.ToString());
- }
- else
- {
- MessageBox.Show(Properties.Settings.Default.defaultError.ToString());
- }
+ MessageBox.Show("frmReadDVD.cs - updateUIElements " + exc.ToString());
}
}
@@ -89,14 +75,14 @@ namespace Handbrake {
try
{
- string appPath = Application.StartupPath.ToString()+ "\\";
+ string appPath = Application.StartupPath.ToString() + "\\";
string strCmdLine = "cmd /c " + '"' + '"' + appPath + "HandBrakeCLI.exe" + '"' + " -i " + '"' + inputFile + '"' + " -t0 -v >" + '"' + appPath + "dvdinfo.dat" + '"' + " 2>&1" + '"';
Process hbproc = Process.Start("CMD.exe", strCmdLine);
hbproc.WaitForExit();
hbproc.Dispose();
hbproc.Close();
-
+
StreamReader sr = new StreamReader(appPath + "dvdinfo.dat");
thisDvd = Parsing.DVD.Parse(sr);
sr.Close();
@@ -105,14 +91,7 @@ namespace Handbrake }
catch (Exception exc)
{
- if (Properties.Settings.Default.GuiDebug == "Checked")
- {
- MessageBox.Show("frmReadDVD.cs - startProc " + exc.ToString());
- }
- else
- {
- MessageBox.Show(Properties.Settings.Default.defaultError.ToString());
- }
+ MessageBox.Show("frmReadDVD.cs - startProc " + exc.ToString());
}
}
diff --git a/win/C#/frmUpdater.cs b/win/C#/frmUpdater.cs index 82fe2f3b6..05598b3c0 100644 --- a/win/C#/frmUpdater.cs +++ b/win/C#/frmUpdater.cs @@ -24,7 +24,7 @@ namespace Handbrake private void setVersions()
{
- lbl_oldVersion.Text = "(you have: " + Properties.Settings.Default.CliVersion + " / " + Properties.Settings.Default.build + ").";
+ lbl_oldVersion.Text = "(you have: " + Properties.Settings.Default.hb_version + " / " + Properties.Settings.Default.hb_build + ").";
lbl_newVersion.Text = rssRead.version() + " (" + rssRead.build() + ")";
}
|