public void ConnectToSite(FtpSiteData siteData) { UnbindCurrentFtpSiteEvent(); CurrentFtpClient = siteData.GetFtpClient(); this.Invoke(new ThreadHelper.UnnamedDelegate(delegate { btnQuickConnect.Enabled = false; SetLvRemoteFileGray(false); BindCurrentFtpSiteEvent(); })); var site = CurrentFtpClient; site.BeginLogin(); }