|
|
|
|
WLanguage Procedure llamado por zipAddDirectory para manipular la barra de progreso WLanguage Procedure ("Callback") utilizado por zipAddDirectory para gestionar el progreso de los ficheros que se añaden al archivo. // -- 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 PROCEDURE 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
Sintaxis
zipAddDirectory_ProgressBarCallBack(<Current file> , <Overall progress percentage> , <File progress percentage>)
<Current file>: Cadena de caracteres Nombre del archivo que se está procesando. <Overall progress percentage>: Integro Porcentaje de progreso de los ficheros añadidos al archivo. <File progress percentage>: Integro Porcentaje de progreso del fichero que se está añadiendo al archivo. Observaciones Si se utiliza un archivo 7z de , sólo se especifica <Porcentaje de progreso general>. <El porcentaje de progreso del archivo tendrá el mismo valor. Clasificación Lógica de negocio / UI: Código neutro Componente: wd290java zip.dll
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|