picupload.Visible = False
If ftpconnection1.IsConnected Then
ftpconnection1.Close()
End If
FilesListBox.Items.Clear()
ftpconnection1.ServerAddress = txtServerName.Text
ftpconnection1.ServerPort = Integer.Parse(txtPort.Text)
ftpconnection1.UserName = txtUserName.Text
ftpconnection1.Password = txtPassword.Text
ftpconnection1.Connect()
FilesListBox.Items.AddRange(ftpconnection1.GetFiles())
If ftpconnection1.IsConnected Then
MsgBox("Connection is available.Please upload the package", MsgBoxStyle.Information)
picconnect.Visible = False
picupload.Visible = False
'picupload.Visible = True
picauto.Visible = True
picmodify.Visible = True
picmanual.Visible = True
End If
Catch ex As Exception
MsgBox("Connection is not available. Please try again", MsgBoxStyle.Information)
Exit Sub
End Try