'Declaration Public Event StateChanged As EventHandler
'Usage Dim instance As FtpClient Dim handler As EventHandler AddHandler instance.StateChanged, handler
public event EventHandler StateChanged
'Declaration Public Event StateChanged As EventHandler
'Usage Dim instance As FtpClient Dim handler As EventHandler AddHandler instance.StateChanged, handler
public event EventHandler StateChanged
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" ' Set license key here to deploy Dim ftp As New FtpClient() AddHandler ftp.StateChanged, AddressOf Me.state_changed ftp.Connect( "localhost" ) ftp.Login() ftp.ReceiveMultipleFiles( "ClientFiles\*", "d:\", True, True ) ftp.Disconnect() Private Sub state_changed( ByVal sender As Object, ByVal e As EventArgs ) label1.Text = CType( sender, FtpClient ).State.ToString() label1.Refresh() End Sub
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" // Set license key here to deploy FtpClient ftp = new FtpClient(); ftp.StateChanged += new EventHandler( this.state_changed ); ftp.Connect( "localhost" ); ftp.Login(); ftp.ReceiveMultipleFiles( @"ClientFiles\*", @"d:\", true, true ); ftp.Disconnect(); private void state_changed( object sender, EventArgs e ) { label1.Text = ( ( FtpClient )sender ).State.ToString(); label1.Refresh(); }
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