|
|
|
|
WLanguage procedure called by zipAddDirectory to handle the progress bar WLanguage procedure ("Callback") used by zipAddDirectory to manage the progress of files being added to the archive. // -- Global declarations of the window GLOBAL ArchiveName is string = "MyArchive" // -- Click on BTN_AddDirectory // Initialize the variables DirectoryName is string CreationErrorCode is int AdditionErrorCode is int  // Create an archive CreationErrorCode = zipCreate(ArchiveName, "C:\MyDirectory\MyArchives\PdfArchive.wdz")  // Display an error message if the archive was not created IF CreationErrorCode = 0 THEN // Select the directory DirectoryName = fSelectDir("", "", "Directory to add") // Adds all the files found in the selected directory into the archive ErrorCodeAddition = zipAddDirectory(ArchiveName, DirectoryName, False, zipDirectory, ... zipAddDirectoryProgressBar_Callback) // Display an error message if the file was not added IF AdditionErrorCode <> 0 THEN Error(zipMsgError(AdditionErrorCode)) END ELSE Error(zipMsgError(CreationErrorCode)) END // This procedure is used to manage the progress bar. INTERNAL PROCÉDURE zipAddDirectoryProgressBar_Callback(CurrentFile is string, OverallProgress is int, FileProgress is int) IF OverallProgress < 100 THEN ProgressBar(OverallProgress, 100, CurrentFile) // Refresh the window Multitask(-1)  ELSE ProgressBar() END END
Syntax
zipAddDirectory_ProgressBarCallBack(<Current file> , <Overall progress percentage> , <File progress percentage>)
<Current file>: Character string Name of the file being processed. <Overall progress percentage>: Integer Progress percentage of the files added to the archive. <File progress percentage>: Integer Progress percentage of the file being added to the archive. Remarks If you are using a 7z archive, only <Overall progress percentage> is specified. <File progress percentage> will have the same value. Business / UI classification: Neutral code Component: wd290java zip.dll
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|