void OnDownloadProgress(string filename, int bytesTransferred, int totalBytes) { EventHandler <downloadProgressEventArgs> temp = downloadProgress; if (temp != null) { downloadProgressEventArgs e = new downloadProgressEventArgs(); e.filename = filename; e.bytesTransferred = bytesTransferred; e.totalBytes = totalBytes; context.Post(delegate(object state) { downloadProgress(this, e); }, null); } }
void ftpobject_downloadProgress(object sender, downloadProgressEventArgs e) { progressBar.Style = ProgressBarStyle.Marquee; }