private void component_WriteCompleted(object sender, WriteCompletedEventArgs e) { component = null; if (WriteCompleted != null) { WriteCompleted(this, e); } }
public void BeginUpload(FileInfo fileInfo, Uri uri, WebHeaderCollection headers) { if (fileInfo == null) { throw new ArgumentNullException("fileInfo"); } if (uri == null) { throw new ArgumentNullException("uri"); } if (IsBusy) { throw new InvalidOperationException("The control is uploading a file."); } component = new UploadComponent(); component.ProgressUpdated += component_ProgressUpdated; component.WriteCompleted += component_WriteCompleted; component.Headers = headers; component.UploadAsync(fileInfo, uri, null); }