void OnDeleteComplete(string filename) { EventHandler <deleteCompleteEventArgs> temp = deleteComplete; if (temp != null) { deleteCompleteEventArgs e = new deleteCompleteEventArgs(); e.filename = filename; context.Post(delegate(object state) { deleteComplete(this, e); }, null); } }
void ftpobject_deleteComplete(object sender, deleteCompleteEventArgs e) { statusBar.Text = e.filename + Environment.NewLine + statusBar.Text; refreshRemote(); }