void thr_OnThreadWorkComplete(object sender, CompressionCompleteEventArgs e) { if (e.InnerException != null) { InnerException = e.InnerException; jobResult = 1; }//throw e.InnerException; }
static void compressor_OnCompressionComplete(object sender, CompressionCompleteEventArgs e) { jobResult = e.ProcessResult; if (jobResult == 1 && File.Exists(EndFileName)) { Console.WriteLine(e.InnerException.Message); if (File.Exists(EndFileName)) { File.Delete(EndFileName); } } else { Console.WriteLine("Done!"); } }