void OnUploadComplete(string filename) { EventHandler <uploadCompleteEventArgs> temp = uploadComplete; if (temp != null) { uploadCompleteEventArgs e = new uploadCompleteEventArgs(); e.filename = filename; context.Post(delegate(object state) { uploadComplete(this, e); }, null); } }
void ftpobject_uploadComplete(object sender, uploadCompleteEventArgs e) { progressBar.Style = ProgressBarStyle.Blocks; statusBar.Text = "Загрузка завершена: " + e.filename + Environment.NewLine + statusBar.Text + statusBar.Text; refreshRemote(); }