protected Process HbProcess { get; set; }\r
\r
/// <summary>\r
- /// Determines if the process was killed or safely closed.\r
- /// </summary>\r
- private bool processKilled;\r
-\r
- /// <summary>\r
/// Gets a value indicating whether IsEncoding.\r
/// </summary>\r
public bool IsEncoding { get; private set; }\r
/// </param>\r
private void HbProcess_Exited(object sender, EventArgs e)\r
{\r
- if (HbProcess != null && HbProcess.HasExited && HbProcess.ExitCode != 0 && !processKilled)\r
- {\r
- 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));\r
- }\r
-\r
- processKilled = false;\r
IsEncoding = false;\r
if (this.EncodeEnded != null)\r
this.EncodeEnded(this, new EventArgs());\r
\r
try\r
{\r
- Thread newThread = new Thread(new ParameterizedThreadStart(WriteExceptionToFile));\r
+ Thread newThread = new Thread(new ParameterizedThreadStart(this.LogError));\r
newThread.Start(shortError + Environment.NewLine + longError);\r
}\r
catch (Exception)\r
/// <param name="state">\r
/// The state.\r
/// </param>\r
- public void WriteExceptionToFile(object state)\r
+ public void LogError(object state)\r
{\r
try\r
{\r
/// Is a warning window, show the warning icon instead of the notice\r
/// </param>\r
void ShowNotice(string notice, bool isWarning);\r
+\r
+ /// <summary>\r
+ /// Log the error\r
+ /// </summary>\r
+ /// <param name="state">The error message</param>\r
+ void LogError(object state);\r
}\r
}
\ No newline at end of file