Sub X01_DownTAIco
Try
For i = 0 To Main.MyPoisTA1.Size - 1
Dim Values() As String = Main.MyPoisTA1.Get(i)
Dim MyFile1 As String = "ta" & Csr.ExtraeCadena("." & Values(9), ".", ".", True) & ".png"
If File.Exists(Main.DirIco, MyFile1) = False Then
Dim j As HttpJob
j.Initialize("Job******", Me)
j.Download("http://******.***.**/*****/***/**********/" & Values(9))
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
'The result is a json string. We parse it and log the fields.
Dim MiFile2 As String = ""
Dim out As OutputStream = File.OpenOutput(Main.DirIco, MyFile1, False )
Dim MiResult As InputStream = j.GetInputStream
File.Copy2(MiResult, out)
out.Close
Dim GIcon As Bitmap = LoadBitmap(Main.DirIco, MyFile1)
TblBitMap(i) = GIcon
TblBmTxt(i, 0) = MyFile1: TblBmTxt(i, 1)= i
End If
j.Release
End If
Next
'X55_DownTASale("Test download.")
Catch
Log(LastException)
End Try
X05_DownTAIco
End Sub