CryptoPressStream:
Delphi / C++Builder Streaming Compression Library
with Strong Encryption


TCPSStream.OnProgress
TCPSStream
Top 

Occurs during potentially long operations (like LoadFromStream, SaveToStream, Read, Write, SetSize).

Delphi syntax:
type
TCPSOperation = (cpsopLoadFromStream,cpsopSaveToStream,
cpsopSetSize,cpsopRead,cpsopWrite,
cpsopCompressFile,cpsopDecompressFile);
TCPSProgressEvent = procedure (
Sender: TObject;
Progress: Double;
Operation: TCPSOperation;
var Abort: Boolean
) of object;
property OnProgress: TCPSProgressEvent;

C++ syntax:
enum
TCPSOperation { cpsopLoadFromStream, cpsopSaveToStream, cpsopSetSize, cpsopRead, cpsopWrite, cpsopCompressFile, cpsopDecompressFile };
typedef void __fastcall (__closure *TCPSProgressEvent)(System::TObject* Sender, double Progress, TCPSOperation Operation, bool &Abort);
__property TCPSProgressEvent OnProgress = {read=FOnProgress, write=FOnProgress};


Description
OnProgress occurs during potentially slow processes. OnProgress allows applications to provide the user with a feedback about the progress of the slow process. If some stream object is linked to TCPSManager and have no its own OnProgress event handler it will try to call TCPSManager.OnProgress.

The Progress parameter is an approximation of how much of the operation has completed in percent (0-100). Use Progress to update the position of a progress bar or other indicator.

The Operation parameter indicates what kind of process is running: .

When the Abort parameter is True, the execution of the process is cancelled.

Note:
write operation in compressed stream can ignore Abort parameter sometimes when it is not possible to terminate the process without corrupting stream data.



© AidAim Software CryptoPressStream: