Sub btnSync_Click
Private ListadeFicheiros As List
ListadeFicheiros=File.ListFiles(txtPastaLocal.Text)
If ListadeFicheiros.Size=0 Then
Return
Else
Private Files2Send(ListadeFicheiros.Size) As String
For i=0 To ListadeFicheiros.Size-1
Files2Send(i)=ListadeFicheiros.Get(i)
Next
End If
CallSubDelayed(Me,SendCompressedFile)
CallSubDelayed(Me, CompressFile(Files2Send))
End Sub
Sub CompressFile(F2S() As String)
Arc.AsyncZipFiles(txtPastaLocal.Text,F2S,txtPastaLocal.Text, txtNomeFicheiros & ".zip","Compress")
Log(F2S)
End Sub
Sub SendCompressedFile
If File.Exists(txtPastaLocal.text,txtNomeFicheiros.Text) Then
FTP.UpLoadFile(txtPastaLocal.Text,txtPastaSvr.Text,txtNomeFicheiros.text)
End If
End Sub
Sub Compress_ZipDone(CompletedWithOutError As Boolean,NbOffiles As Int)
If CompletedWithOutError = True Then
ToastMessageShow("Done",True)
Else
ToastMessageShow("Error",True)
End If
End Sub