Sub Process_Globals
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private ftp As FTP
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage2(Page1, True)
ftp.Initialize("ftp", "94.145.79.229", 21, "apps", "apps")
ftp.PassiveMode = True
ftp.List("/apps/1")
End Sub
Sub ftp_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
For Each fe As FTPEntry In Files
If fe.Size < 100000 Then ftp.DownloadFile("/apps/1/" & fe.Name, False, File.DirTemp, fe.Name)
Next
End Sub
Sub ftp_DownloadCompleted (ServerPath As String, Success As Boolean)
Log($"$Time{DateTime.Now}: ${ServerPath}, success = ${Success}"$)
End Sub