\'\'\'
Dim lb1 As WinForm.Label = e.Form.Controls("Label1")
Dim btn As WinForm.Button = e.Form.Controls("Button1")
btn.Visible = False
Dim pros As WinForm.ProgressBar = e.Form.Controls("ProgressBar1")
pros.Minimum = 1
pros.Value = 1
Dim ftp As New FTPClient \'定义FTP客户端
ftp.Host="*******" \'ip地址
ftp.Account = "****" \'用户名
ftp.Password = "****" \'密码
ftp.RootDir = "/儿童附件/"
pros.Maximum = ftp.GetFileList.Count + 1
For Each fl As String In ftp.GetFileList
If FileSys.FileExists(ProjectPath & "RemoteFiles\\" & fl) = False Then
Application.DoEvents
lb1.Text = "正在同步:" & fl
ftp.Download(fl,ProjectPath & "RemoteFiles\\" & fl)
End If
pros.Value = pros.Value +1
Next
btn.Visible = True