diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/C#/HandBrakeCS.csproj | 5 | ||||
-rw-r--r-- | win/C#/Parsing/AudioTrack.cs | 6 | ||||
-rw-r--r-- | win/C#/Parsing/Chapter.cs | 2 | ||||
-rw-r--r-- | win/C#/Parsing/Subtitle.cs | 2 | ||||
-rw-r--r-- | win/C#/Parsing/Title.cs | 75 | ||||
-rw-r--r-- | win/C#/Properties/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | win/C#/Properties/Settings.Designer.cs | 25 | ||||
-rw-r--r-- | win/C#/Properties/Settings.settings | 6 | ||||
-rw-r--r-- | win/C#/app.config | 6 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 24 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 28 | ||||
-rw-r--r-- | win/C#/frmOptions.Designer.cs | 21 | ||||
-rw-r--r-- | win/C#/frmOptions.cs | 12 | ||||
-rw-r--r-- | win/C#/frmQueue.cs | 4 | ||||
-rw-r--r-- | win/C#/frmReadDVD.Designer.cs | 55 | ||||
-rw-r--r-- | win/C#/frmReadDVD.cs | 50 |
16 files changed, 206 insertions, 117 deletions
diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj index 33ad098d7..2898dbc60 100644 --- a/win/C#/HandBrakeCS.csproj +++ b/win/C#/HandBrakeCS.csproj @@ -25,14 +25,17 @@ <LangVersion>default</LangVersion>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<NoStdLib>false</NoStdLib>
+ <DocumentationFile>
+ </DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
+ <Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
diff --git a/win/C#/Parsing/AudioTrack.cs b/win/C#/Parsing/AudioTrack.cs index 98114a5ca..22861b9e6 100644 --- a/win/C#/Parsing/AudioTrack.cs +++ b/win/C#/Parsing/AudioTrack.cs @@ -98,12 +98,12 @@ namespace Handbrake.Parsing if (m.Success)
{
AudioTrack thisTrack = new AudioTrack();
- thisTrack.m_trackNumber = int.Parse(m.Groups[1].Value);
+ thisTrack.m_trackNumber = int.Parse(m.Groups[1].Value.Trim().ToString());
thisTrack.m_language = m.Groups[2].Value;
thisTrack.m_format = m.Groups[3].Value;
thisTrack.m_subFormat = m.Groups[4].Value;
- thisTrack.m_frequency = int.Parse(m.Groups[5].Value);
- thisTrack.m_bitrate = int.Parse(m.Groups[6].Value);
+ thisTrack.m_frequency = int.Parse(m.Groups[5].Value.Trim().ToString());
+ thisTrack.m_bitrate = int.Parse(m.Groups[6].Value.Trim().ToString());
return thisTrack;
}
else
diff --git a/win/C#/Parsing/Chapter.cs b/win/C#/Parsing/Chapter.cs index 665841e97..6496354c9 100644 --- a/win/C#/Parsing/Chapter.cs +++ b/win/C#/Parsing/Chapter.cs @@ -50,7 +50,7 @@ namespace Handbrake.Parsing if (m.Success)
{
Chapter thisChapter = new Chapter();
- thisChapter.m_chapterNumber = int.Parse(m.Groups[1].Value);
+ thisChapter.m_chapterNumber = int.Parse(m.Groups[1].Value.Trim().ToString());
thisChapter.m_duration = TimeSpan.Parse(m.Groups[5].Value);
return thisChapter;
}
diff --git a/win/C#/Parsing/Subtitle.cs b/win/C#/Parsing/Subtitle.cs index a30fd7882..8fb889f8f 100644 --- a/win/C#/Parsing/Subtitle.cs +++ b/win/C#/Parsing/Subtitle.cs @@ -51,7 +51,7 @@ namespace Handbrake.Parsing if (m.Success && !curLine.Contains("HandBrake has exited."))
{
Subtitle thisSubtitle = new Subtitle();
- thisSubtitle.m_trackNumber = int.Parse(m.Groups[1].Value);
+ thisSubtitle.m_trackNumber = int.Parse(m.Groups[1].Value.Trim().ToString());
thisSubtitle.m_language = m.Groups[2].Value;
return thisSubtitle;
}
diff --git a/win/C#/Parsing/Title.cs b/win/C#/Parsing/Title.cs index 1611f5c23..16c032edf 100644 --- a/win/C#/Parsing/Title.cs +++ b/win/C#/Parsing/Title.cs @@ -134,6 +134,14 @@ namespace Handbrake.Parsing this.m_duration.Minutes, this.m_duration.Seconds);
}
+
+ /*
+ *
+ * There is some pretty extensive exception handling in here. A number of people have been seeing random problems.
+ * It just helps pinpointing which line of code is causing the issue.
+ * Can be cut down at a later date.
+ *
+ */
public static Title Parse(StringReader output)
{
Title thisTitle = new Title();
@@ -145,15 +153,20 @@ namespace Handbrake.Parsing // Match track number for this title
if (m.Success)
{
- thisTitle.m_titleNumber = int.Parse(m.Groups[1].Value);
+ //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
}
- output.ReadLine();
- }
+ }
catch (Exception exc)
{
- MessageBox.Show("Title.cs - Track Number " + exc.ToString());
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ MessageBox.Show("Title.cs - Track Number " + exc.ToString());
+ }
}
-
+
+ output.ReadLine();
// Get duration for this title
try
@@ -166,7 +179,10 @@ namespace Handbrake.Parsing }
catch (Exception exc)
{
- MessageBox.Show("Title.cs - Duration " + exc.ToString());
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ MessageBox.Show("Title.cs - Duration " + exc.ToString());
+ }
}
try
@@ -182,7 +198,10 @@ namespace Handbrake.Parsing }
catch (Exception exc)
{
- MessageBox.Show("Title.cs - Resolution and Aspect " + exc.ToString());
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ MessageBox.Show("Title.cs - Resolution and Aspect " + exc.ToString());
+ }
}
try
@@ -196,24 +215,55 @@ namespace Handbrake.Parsing }
catch (Exception exc)
{
- MessageBox.Show("Title.cs - Auto Crop " + exc.ToString());
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ MessageBox.Show("Title.cs - Auto Crop " + exc.ToString());
+ }
}
try
{
thisTitle.m_chapters.AddRange(Chapter.ParseList(output));
+ }
+ catch (Exception exc)
+ {
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ MessageBox.Show("Title.cs - Chapters EXC " + exc.ToString());
+ }
+ }
+
+ try
+ {
thisTitle.m_audioTracks.AddRange(AudioTrack.ParseList(output));
+ }
+ catch (Exception exc)
+ {
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ MessageBox.Show("Title.cs - Audio EXC " + exc.ToString());
+ }
+ }
+
+ try
+ {
thisTitle.m_subtitles.AddRange(Subtitle.ParseList(output));
}
catch (Exception exc)
{
- MessageBox.Show("Title.cs - Chapters / Audio / Subtitles " + exc.ToString());
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ MessageBox.Show("Title.cs - Subtitles EXC " + exc.ToString());
+ }
}
}
catch (Exception exc)
{
- MessageBox.Show("Title.cs - Parse " + exc.ToString());
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ MessageBox.Show("Title.cs - Parse " + exc.ToString());
+ }
}
@@ -233,7 +283,10 @@ namespace Handbrake.Parsing }
catch (Exception exc)
{
- MessageBox.Show("Title.cs - ParseList " + exc.ToString());
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ MessageBox.Show("Title.cs - ParseList " + exc.ToString());
+ }
}
return titles.ToArray();
}
diff --git a/win/C#/Properties/AssemblyInfo.cs b/win/C#/Properties/AssemblyInfo.cs index 6af0e190d..ed9c1d186 100644 --- a/win/C#/Properties/AssemblyInfo.cs +++ b/win/C#/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ using System.Resources; //
[assembly: AssemblyVersion("2.4.0.1")]
[assembly: AssemblyFileVersion("2.4.0.1")]
-[assembly: NeutralResourcesLanguageAttribute("en-GB")]
+[assembly: NeutralResourcesLanguageAttribute("")]
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index fb25c386e..aecb25910 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -537,5 +537,30 @@ namespace Handbrake.Properties { 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;
+ }
+ }
}
}
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index 8cdfa64e9..d518d7825 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -131,5 +131,11 @@ <Setting Name="CliVersion" Type="System.String" Scope="User">
<Value Profile="(Default)">0.9.1</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>
</Settings>
</SettingsFile>
\ No newline at end of file diff --git a/win/C#/app.config b/win/C#/app.config index 9453e432b..46f1a7d7a 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -133,6 +133,12 @@ <setting name="CliVersion" serializeAs="String">
<value>0.9.1</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>
</Handbrake.Properties.Settings>
</userSettings>
</configuration>
\ No newline at end of file diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 04b0c4539..76e8b36ed 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -268,7 +268,7 @@ namespace Handbrake //
this.RadioISO.AutoSize = true;
this.RadioISO.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.RadioISO.Location = new System.Drawing.Point(358, 34);
+ this.RadioISO.Location = new System.Drawing.Point(487, 33);
this.RadioISO.Name = "RadioISO";
this.RadioISO.Size = new System.Drawing.Size(44, 17);
this.RadioISO.TabIndex = 19;
@@ -282,7 +282,7 @@ namespace Handbrake this.text_source.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.text_source.Location = new System.Drawing.Point(99, 22);
this.text_source.Name = "text_source";
- this.text_source.Size = new System.Drawing.Size(253, 21);
+ this.text_source.Size = new System.Drawing.Size(294, 21);
this.text_source.TabIndex = 1;
this.text_source.Text = "Click \'Browse\' to continue";
this.ToolTip.SetToolTip(this.text_source, "The input source location.");
@@ -293,7 +293,7 @@ namespace Handbrake this.text_destination.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.text_destination.Location = new System.Drawing.Point(99, 21);
this.text_destination.Name = "text_destination";
- this.text_destination.Size = new System.Drawing.Size(262, 21);
+ this.text_destination.Size = new System.Drawing.Size(294, 21);
this.text_destination.TabIndex = 4;
this.ToolTip.SetToolTip(this.text_destination, "Location where the enoceded file will be saved.");
//
@@ -303,7 +303,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(424, 22);
+ this.btn_Browse.Location = new System.Drawing.Point(399, 22);
this.btn_Browse.Name = "btn_Browse";
this.btn_Browse.Size = new System.Drawing.Size(78, 22);
this.btn_Browse.TabIndex = 2;
@@ -341,7 +341,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(370, 21);
+ this.btn_destBrowse.Location = new System.Drawing.Point(399, 21);
this.btn_destBrowse.Name = "btn_destBrowse";
this.btn_destBrowse.Size = new System.Drawing.Size(83, 22);
this.btn_destBrowse.TabIndex = 4;
@@ -460,7 +460,7 @@ namespace Handbrake // ISO_Open
//
this.ISO_Open.DefaultExt = "ISO";
- this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.mpeg;*.vob;*.ts";
+ this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.vob;*.ts;*.mpeg;";
this.ISO_Open.SupportMultiDottedExtensions = true;
//
// FileToolStripMenuItem
@@ -822,7 +822,7 @@ namespace Handbrake //
// frmMainMenu
//
- this.frmMainMenu.BackColor = System.Drawing.SystemColors.Control;
+ this.frmMainMenu.BackColor = System.Drawing.SystemColors.ControlLight;
this.frmMainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.FileToolStripMenuItem,
this.ToolsToolStripMenuItem,
@@ -830,7 +830,7 @@ namespace Handbrake this.HelpToolStripMenuItem});
this.frmMainMenu.Location = new System.Drawing.Point(0, 0);
this.frmMainMenu.Name = "frmMainMenu";
- this.frmMainMenu.Size = new System.Drawing.Size(675, 24);
+ this.frmMainMenu.Size = new System.Drawing.Size(676, 24);
this.frmMainMenu.TabIndex = 1;
this.frmMainMenu.Text = "MenuStrip1";
//
@@ -883,7 +883,7 @@ namespace Handbrake this.RadioDVD.AutoSize = true;
this.RadioDVD.Checked = true;
this.RadioDVD.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.RadioDVD.Location = new System.Drawing.Point(358, 18);
+ this.RadioDVD.Location = new System.Drawing.Point(487, 17);
this.RadioDVD.Name = "RadioDVD";
this.RadioDVD.Size = new System.Drawing.Size(60, 17);
this.RadioDVD.TabIndex = 20;
@@ -1081,10 +1081,10 @@ namespace Handbrake // lbl_encode
//
this.lbl_encode.AutoSize = true;
- this.lbl_encode.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_encode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_encode.Location = new System.Drawing.Point(12, 571);
this.lbl_encode.Name = "lbl_encode";
- this.lbl_encode.Size = new System.Drawing.Size(96, 13);
+ this.lbl_encode.Size = new System.Drawing.Size(129, 13);
this.lbl_encode.TabIndex = 418;
this.lbl_encode.Text = "Encoding started...";
this.lbl_encode.Visible = false;
@@ -1938,7 +1938,7 @@ namespace Handbrake this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlLight;
- this.ClientSize = new System.Drawing.Size(675, 621);
+ this.ClientSize = new System.Drawing.Size(676, 621);
this.Controls.Add(this.btn_eCancel);
this.Controls.Add(this.lbl_encode);
this.Controls.Add(this.lbl_update);
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 1df5d7fdc..58ccc7df4 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -1019,10 +1019,8 @@ namespace Handbrake private void btn_encode_Click(object sender, EventArgs e)
{
- btn_eCancel.Enabled = true;
- String query = "";
- lbl_encode.Visible = false;
-
+ //btn_eCancel.Enabled = true;
+ String query = "";
if (QueryEditorText.Text == "")
{
query = GenerateTheQuery();
@@ -1033,7 +1031,8 @@ namespace Handbrake }
ThreadPool.QueueUserWorkItem(procMonitor, query);
- lbl_encode.Text = "Encoding Started";
+ lbl_encode.Visible = true;
+ lbl_encode.Text = "Encoding in Progress";
}
private void btn_eCancel_Click(object sender, EventArgs e)
@@ -1053,7 +1052,6 @@ namespace Handbrake else
{
hbProc = process.runCli(this, (string)state, false, false, false, false);
- MessageBox.Show("The encode process has now started.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
hbProc.WaitForExit();
try
@@ -1083,13 +1081,25 @@ namespace Handbrake // Do nothing
}
- MessageBox.Show("The encode process has now ended.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+
+ setEncodeLabel();
hbProc = null;
}
}
+ private delegate void UpdateUIHandler();
+ private void setEncodeLabel()
+ {
+ if (this.InvokeRequired)
+ {
+ this.BeginInvoke(new UpdateUIHandler(setEncodeLabel));
+ return;
+ }
+ lbl_encode.Text = "Encoding Finished";
+ }
- private void encode_OnEncodeProgress(object Sender, int CurrentTask, int TaskCount, float PercentComplete, float CurrentFps, float AverageFps, TimeSpan TimeRemaining)
+ /*private void encode_OnEncodeProgress(object Sender, int CurrentTask, int TaskCount, float PercentComplete, float CurrentFps, float AverageFps, TimeSpan TimeRemaining)
{
+
if (this.InvokeRequired)
{
this.BeginInvoke(new Parsing.EncodeProgressEventHandler(encode_OnEncodeProgress),
@@ -1097,7 +1107,7 @@ namespace Handbrake return;
}
lbl_encode.Text = string.Format("Encode Progress: {0}%, FPS: {1}, Avg FPS: {2}, Time Remaining: {3} ", PercentComplete, CurrentFps, AverageFps, TimeRemaining);
- }
+ }*/
#endregion
diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs index 40b2e2db3..e86809574 100644 --- a/win/C#/frmOptions.Designer.cs +++ b/win/C#/frmOptions.Designer.cs @@ -42,6 +42,7 @@ namespace Handbrake this.Label11 = new System.Windows.Forms.Label();
this.GroupBox3 = new System.Windows.Forms.GroupBox();
this.GroupBox1 = new System.Windows.Forms.GroupBox();
+ this.check_guiDebug = new System.Windows.Forms.CheckBox();
this.btn_close = new System.Windows.Forms.Button();
this.GroupBox2.SuspendLayout();
this.GroupBox3.SuspendLayout();
@@ -141,9 +142,9 @@ namespace Handbrake 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(20, 31);
this.check_verbose.Name = "check_verbose";
- this.check_verbose.Size = new System.Drawing.Size(71, 17);
+ this.check_verbose.Size = new System.Drawing.Size(139, 17);
this.check_verbose.TabIndex = 51;
- this.check_verbose.Text = "Enabled";
+ this.check_verbose.Text = "Enable Verbose CLI";
this.check_verbose.UseVisualStyleBackColor = true;
this.check_verbose.CheckedChanged += new System.EventHandler(this.check_verbose_CheckedChanged);
//
@@ -201,6 +202,7 @@ namespace Handbrake // GroupBox1
//
this.GroupBox1.BackColor = System.Drawing.SystemColors.ControlLight;
+ this.GroupBox1.Controls.Add(this.check_guiDebug);
this.GroupBox1.Controls.Add(this.check_verbose);
this.GroupBox1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.GroupBox1.Location = new System.Drawing.Point(13, 283);
@@ -208,7 +210,19 @@ namespace Handbrake this.GroupBox1.Size = new System.Drawing.Size(386, 70);
this.GroupBox1.TabIndex = 54;
this.GroupBox1.TabStop = false;
- this.GroupBox1.Text = "Verbose Mode";
+ this.GroupBox1.Text = "Verbose && Debug Mode";
+ //
+ // 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(187, 31);
+ 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
//
@@ -266,5 +280,6 @@ namespace Handbrake internal System.Windows.Forms.GroupBox GroupBox3;
internal System.Windows.Forms.GroupBox GroupBox1;
internal System.Windows.Forms.Button btn_close;
+ internal System.Windows.Forms.CheckBox check_guiDebug;
}
}
\ No newline at end of file diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs index fc2e15207..b0bab6806 100644 --- a/win/C#/frmOptions.cs +++ b/win/C#/frmOptions.cs @@ -32,6 +32,11 @@ namespace Handbrake {
check_verbose.CheckState = CheckState.Checked;
}
+
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ check_guiDebug.CheckState = CheckState.Checked;
+ }
}
private void check_updateCheck_CheckedChanged(object sender, EventArgs e)
@@ -64,5 +69,12 @@ namespace Handbrake Properties.Settings.Default.Save(); // Small hack for Vista. Seems to work fine on XP without this
this.Close();
}
+
+ private void check_guiDebug_CheckedChanged(object sender, EventArgs e)
+ {
+ Properties.Settings.Default.GuiDebug = check_guiDebug.CheckState.ToString();
+ }
+
+
}
}
\ No newline at end of file diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs index 62e32d374..8e59e1116 100644 --- a/win/C#/frmQueue.cs +++ b/win/C#/frmQueue.cs @@ -71,6 +71,7 @@ namespace Handbrake return;
}
this.list_queue.Items.RemoveAt(0);
+
progressBar.PerformStep();
lbl_progressValue.Text = string.Format("{0} %", progressBar.Value);
progressBar.Update();
@@ -93,6 +94,8 @@ namespace Handbrake * Code to Re-arrange / Delete items from the Queue
*
*/
+ #region Queue Management
+
private void btn_up_Click(object sender, EventArgs e)
{
int count = list_queue.Items.Count;
@@ -133,6 +136,7 @@ namespace Handbrake if (started == true)
initialListCount--;
}
+ #endregion
/*
* Hide the Queue Window
diff --git a/win/C#/frmReadDVD.Designer.cs b/win/C#/frmReadDVD.Designer.cs index c71d46d89..6c3a254cd 100644 --- a/win/C#/frmReadDVD.Designer.cs +++ b/win/C#/frmReadDVD.Designer.cs @@ -29,41 +29,12 @@ namespace Handbrake private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmReadDVD));
- this.lbl_pressOk = new System.Windows.Forms.Label();
- this.btn_ok = new System.Windows.Forms.Button();
this.Label3 = new System.Windows.Forms.Label();
this.Label2 = new System.Windows.Forms.Label();
this.lbl_status = new System.Windows.Forms.Label();
this.lbl_progress = new System.Windows.Forms.Label();
- this.btn_skip = new System.Windows.Forms.Button();
this.SuspendLayout();
//
- // lbl_pressOk
- //
- this.lbl_pressOk.AutoSize = true;
- this.lbl_pressOk.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_pressOk.Location = new System.Drawing.Point(77, 61);
- this.lbl_pressOk.Name = "lbl_pressOk";
- this.lbl_pressOk.Size = new System.Drawing.Size(178, 13);
- this.lbl_pressOk.TabIndex = 29;
- this.lbl_pressOk.Text = "Press OK to start the process.";
- //
- // btn_ok
- //
- this.btn_ok.BackColor = System.Drawing.SystemColors.ControlLight;
- this.btn_ok.FlatAppearance.BorderColor = System.Drawing.Color.Black;
- this.btn_ok.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_ok.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_ok.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_ok.Location = new System.Drawing.Point(351, 56);
- this.btn_ok.Name = "btn_ok";
- this.btn_ok.Size = new System.Drawing.Size(71, 22);
- this.btn_ok.TabIndex = 28;
- this.btn_ok.TabStop = false;
- this.btn_ok.Text = "OK";
- this.btn_ok.UseVisualStyleBackColor = false;
- this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
- //
// Label3
//
this.Label3.AutoSize = true;
@@ -106,36 +77,15 @@ namespace Handbrake this.lbl_progress.Text = "{ % }";
this.lbl_progress.Visible = false;
//
- // btn_skip
- //
- this.btn_skip.BackColor = System.Drawing.SystemColors.ControlLight;
- this.btn_skip.FlatAppearance.BorderColor = System.Drawing.Color.Black;
- this.btn_skip.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_skip.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_skip.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_skip.Location = new System.Drawing.Point(351, 4);
- this.btn_skip.Name = "btn_skip";
- this.btn_skip.Size = new System.Drawing.Size(71, 22);
- this.btn_skip.TabIndex = 33;
- this.btn_skip.TabStop = false;
- this.btn_skip.Text = "Cancel";
- this.btn_skip.UseVisualStyleBackColor = false;
- this.btn_skip.Visible = false;
- this.btn_skip.Click += new System.EventHandler(this.btn_skip_Click);
- //
// frmReadDVD
//
- this.AcceptButton = this.btn_ok;
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlLight;
- this.ClientSize = new System.Drawing.Size(434, 88);
+ this.ClientSize = new System.Drawing.Size(346, 70);
this.ControlBox = false;
- this.Controls.Add(this.btn_skip);
this.Controls.Add(this.lbl_progress);
this.Controls.Add(this.lbl_status);
- this.Controls.Add(this.lbl_pressOk);
- this.Controls.Add(this.btn_ok);
this.Controls.Add(this.Label3);
this.Controls.Add(this.Label2);
this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -155,12 +105,9 @@ namespace Handbrake #endregion
- internal System.Windows.Forms.Label lbl_pressOk;
- internal System.Windows.Forms.Button btn_ok;
internal System.Windows.Forms.Label Label3;
internal System.Windows.Forms.Label Label2;
internal System.Windows.Forms.Label lbl_status;
private System.Windows.Forms.Label lbl_progress;
- internal System.Windows.Forms.Button btn_skip;
}
}
\ No newline at end of file diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs index 526e9bd28..f697e3425 100644 --- a/win/C#/frmReadDVD.cs +++ b/win/C#/frmReadDVD.cs @@ -28,28 +28,34 @@ namespace Handbrake this.inputFile = inputFile;
this.mainWindow = parent;
this.dvdInfo = dvdInfoWindow;
+ startScan();
+
}
- private void btn_ok_Click(object sender, EventArgs e)
+ private void startScan()
{
-
try
{
- btn_ok.Enabled = false;
//btn_skip.Visible = true;
- lbl_pressOk.Visible = false;
lbl_progress.Text = "0%";
//lbl_progress.Visible = true;
lbl_status.Visible = true;
// throw cli call and parsing on it's own thread
ThreadPool.QueueUserWorkItem(startProc);
}
- catch(Exception exc)
+ catch (Exception exc)
{
- MessageBox.Show("frmReadDVD.cs - btn_ok_Click " + exc.ToString());
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ MessageBox.Show("frmReadDVD.cs - startScan " + exc.ToString());
+ }
+ else
+ {
+ MessageBox.Show(Properties.Settings.Default.defaultError.ToString());
+ }
}
}
-
+
private void updateUIElements()
{
try
@@ -69,7 +75,14 @@ namespace Handbrake }
catch(Exception exc)
{
- MessageBox.Show("frmReadDVD.cs - updateUIElements " + exc.ToString());
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ MessageBox.Show("frmReadDVD.cs - updateUIElements " + exc.ToString());
+ }
+ else
+ {
+ MessageBox.Show(Properties.Settings.Default.defaultError.ToString());
+ }
}
}
@@ -103,7 +116,14 @@ namespace Handbrake }
catch (Exception exc)
{
- MessageBox.Show("frmReadDVD.cs - startProc " + exc.ToString());
+ if (Properties.Settings.Default.GuiDebug == "Checked")
+ {
+ MessageBox.Show("frmReadDVD.cs - startProc " + exc.ToString());
+ }
+ else
+ {
+ MessageBox.Show(Properties.Settings.Default.defaultError.ToString());
+ }
}
}
@@ -146,17 +166,5 @@ namespace Handbrake this.lbl_progress.Text = progress.ToString() + "%";
}*/
- private void btn_skip_Click(object sender, EventArgs e)
- {
- try
- {
- this.Close();
- //cancel = 1;
- }
- catch (Exception exc)
- {
- MessageBox.Show(exc.ToString());
- }
- }
}
}
\ No newline at end of file |