Sub DownLoadLinkServer(Url As String) As ResumableSub
Dim job As HttpJob
job.Initialize("",Me)
job.Download(Url)
Wait For (job) JobDone(job As HttpJob)
If job.Success Then
Dim Id As Int
Dim Num As String
Dim StringheJobSend() As String
Dim stringaJobSend1 As String
stringaJobSend1=job.getstring
'
StringheJobSend = Regex.Split(";", stringaJobSend1)
Num = StringheJobSend(0)
Id = sf.Val(StringheJobSend(1))
If Num = 1 Then
If Server2 = False Then
Log("JobRicevuto " & Id )
'InserisciFlagInviato( ID)
'CallSub("InserisciFlagInviato",ID)
Wait For (InserisciFlagInviato(Id)) Complete (Result As Int)
'Dim WhereFields As Map = CreateMap("Id": ID)
'Wait For (DbUtils.UpdateRecord(SQL1, "TblTempi","Inviato",1,WhereFields)) Complete (Result As Boolean)
If Result = Id Then
CallSubDelayed(Main, "FillWebView")
TimerInvioHttp.Enabled = True
End If
Log(" Download OK")
Else
InserisciFlagInviatoS2( Id)
' TimerInvioHttpS2.Enabled = True
End If
Else if Num = 2 Then
CallSubDelayed2(Main, "MessaggioAllert", "Password Errata")
CallSubDelayed2(Main, "btnWeb_status",False)
If Server2 = False Then
TimerInvioHttp.Enabled = False
Else
TimerInvioHttpS2.Enabled = False
End If
TimerTestHttp.Enabled=False
on_line = False
'cmd_connetti_Click
Else
CallSubDelayed2(Main, "MessaggioAllert", "Tempo non Inviato")
If Server2 = False Then
TimerInvioHttp.Enabled = True
Else
TimerInvioHttpS2.Enabled = True
End If
TimerTestHttp.Enabled=False
on_line = False
End If
Else
Log("ERRORE DOWNLOAD")
End If
job.Release
Return Id
End Sub