summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-11-11 12:26:34 +0000
committersr55 <[email protected]>2010-11-11 12:26:34 +0000
commit7943612c617b56c5932255c4ab3e0dc5b1cde33c (patch)
tree7aa9be368fb91fe4ef0d67ae7f85cf2e3a0a73fa /win
parent3fdad03f776473d8c59c5779638b10d2af7fba80 (diff)
WinGui:
- Remove some code that has been causing a crash after encoding has completed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3673 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/Encode.cs11
-rw-r--r--win/C#/HandBrake.Framework/Services/ErrorService.cs4
-rw-r--r--win/C#/HandBrake.Framework/Services/Interfaces/IErrorService.cs6
3 files changed, 8 insertions, 13 deletions
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
index 9e5d7beae..5e7527118 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
+++ b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
@@ -110,11 +110,6 @@ namespace HandBrake.ApplicationServices.Services
protected Process HbProcess { get; set; }
/// <summary>
- /// Determines if the process was killed or safely closed.
- /// </summary>
- private bool processKilled;
-
- /// <summary>
/// Gets a value indicating whether IsEncoding.
/// </summary>
public bool IsEncoding { get; private set; }
@@ -339,12 +334,6 @@ namespace HandBrake.ApplicationServices.Services
/// </param>
private void HbProcess_Exited(object sender, EventArgs e)
{
- if (HbProcess != null && HbProcess.HasExited && HbProcess.ExitCode != 0 && !processKilled)
- {
- errorService.ShowError("It appears that HandBrakeCLI has crashed. You can check the Activity Log for further information.", string.Format("Exit Code was: {0}", HbProcess.ExitCode));
- }
-
- processKilled = false;
IsEncoding = false;
if (this.EncodeEnded != null)
this.EncodeEnded(this, new EventArgs());
diff --git a/win/C#/HandBrake.Framework/Services/ErrorService.cs b/win/C#/HandBrake.Framework/Services/ErrorService.cs
index 41372648d..3858f1674 100644
--- a/win/C#/HandBrake.Framework/Services/ErrorService.cs
+++ b/win/C#/HandBrake.Framework/Services/ErrorService.cs
@@ -35,7 +35,7 @@ namespace HandBrake.Framework.Services
try
{
- Thread newThread = new Thread(new ParameterizedThreadStart(WriteExceptionToFile));
+ Thread newThread = new Thread(new ParameterizedThreadStart(this.LogError));
newThread.Start(shortError + Environment.NewLine + longError);
}
catch (Exception)
@@ -78,7 +78,7 @@ namespace HandBrake.Framework.Services
/// <param name="state">
/// The state.
/// </param>
- public void WriteExceptionToFile(object state)
+ public void LogError(object state)
{
try
{
diff --git a/win/C#/HandBrake.Framework/Services/Interfaces/IErrorService.cs b/win/C#/HandBrake.Framework/Services/Interfaces/IErrorService.cs
index 86d6f02d7..9eceead57 100644
--- a/win/C#/HandBrake.Framework/Services/Interfaces/IErrorService.cs
+++ b/win/C#/HandBrake.Framework/Services/Interfaces/IErrorService.cs
@@ -31,5 +31,11 @@ namespace HandBrake.Framework.Services.Interfaces
/// Is a warning window, show the warning icon instead of the notice
/// </param>
void ShowNotice(string notice, bool isWarning);
+
+ /// <summary>
+ /// Log the error
+ /// </summary>
+ /// <param name="state">The error message</param>
+ void LogError(object state);
}
} \ No newline at end of file