'Declaration
Public Event Disconnected As EventHandler
'Usage
Dim instance As FtpClient
Dim handler As EventHandler
AddHandler instance.Disconnected, handler
Example
The following example demonstrates how to use the Disconnected event to display a messagebox when the
FTP client is disconnected from the FTP server. This example assumes that you are in a
Windows application.
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX"' Set license key here to deploy
Dim ftp AsNew FtpClient()
AddHandler ftp.Disconnected, AddressOfMe.disconnected
ftp.Connect( "localhost" )
ftp.Login()
ftp.GetFolderContents()
ftp.Disconnect()
PrivateSub disconnected( ByVal sender AsObject, 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();
privatevoid disconnected( object sender, EventArgs e )
{
MessageBox.Show( "You are no longer connected to the FTP server!" );
}
Requirements
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