'Declaration Public Event Disconnected As EventHandler
'Usage Dim instance As FtpClient Dim handler As EventHandler AddHandler instance.Disconnected, handler
public event EventHandler Disconnected
'Declaration Public Event Disconnected As EventHandler
'Usage Dim instance As FtpClient Dim handler As EventHandler AddHandler instance.Disconnected, handler
public event EventHandler Disconnected
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" ' Set license key here to deploy Dim ftp As New FtpClient() AddHandler ftp.Disconnected, AddressOf Me.disconnected ftp.Connect( "localhost" ) ftp.Login() ftp.GetFolderContents() ftp.Disconnect() Private Sub disconnected( ByVal sender As Object, ByVal e As EventArgs ) MessageBox.Show( "You are no longer connected to the FTP server!" ) End Sub
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" // Set license key here to deploy FtpClient ftp = new FtpClient(); ftp.Disconnected += new EventHandler( this.disconnected ); ftp.Connect( "localhost" ); ftp.Login(); ftp.GetFolderContents(); ftp.Disconnect(); private void disconnected( object sender, EventArgs e ) { MessageBox.Show( "You are no longer connected to the FTP server!" ); }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2