1
是否有人知道如何在使用JclCompression时停止/中止压缩或解压缩?JclCompression,如何中止或停止
是否有人知道如何在使用JclCompression时停止/中止压缩或解压缩?JclCompression,如何中止或停止
您需要实施进度处理程序并通过OnProgress
事件处理程序将其附加到压缩类。然后,在您的进度处理程序中,将CancelCurrentOperation
设置为True
。传递给进度处理程序的第一个参数是TJclCompressionArchive
实例。
你的处理器可能是这样的:
procedure TMyClass.CompressionArchiveProgress(Sender: TObject;
const Value, MaxValue: Int64);
begin
if FAborted then
(Sender as TJclCompressionArchive).CancelCurrentOperation := True;
end;
我假设你正在使用的TJclCompressionArchive
的后代之一。
JEDI代码是作为源代码提供的,因此您可以自己检查源代码以计算出详细信息。
大卫 非常感谢。 这就是我正在寻找的 – 2012-01-08 20:34:11
@ETLMan,所以不要犹豫[[接受这个答案]](http://meta.stackexchange.com/a/5235);) – TLama 2012-01-09 08:46:34