Data for the LoadDocumentAsyncOptions.Progress event.
public class LoadAsyncProgressEventArgs : ProgressChangedEventArgs public ref class LoadAsyncProgressEventArgs : System::ComponentModel::ProgressChangedEventArgs class LoadAsyncProgressEventArgs(ProgressChangedEventArgs): LoadAsyncProgressEventArgs derives from System.ComponentModel.ProgressChangedEventArgs and contains the following members:
| Member | Description |
|---|---|
|
System.ComponentModel.ProgressChangedEventArgs.ProgressPercentage |
Current progress percentage. This value goes from 0 to 100.. |
|
The same value originally set by the user in LoadDocumentAsyncOptions.UserState. |
|
|
The location of the document being loaded. This is the uri value passed to LoadFromUriAsync |
|
|
Number of bytes received during this chunk of the operation. |
|
|
Total number of bytes received so far for the whole load operation. |
|
|
Can be used to abort the load operation. |
using Leadtools;using Leadtools.Caching;using Leadtools.Document;public void DocumentFactoryLoadFromUriAsyncExample(){AutoResetEvent finished = null;EventHandler<LoadAsyncCompletedEventArgs> completed = null;// LoadAsyncProgressEventArgs referenceEventHandler<LoadAsyncProgressEventArgs> progress = null;completed = (sender, e) =>{//Assert((int)e.UserState == 1);if (e.Cancelled)Console.WriteLine("Canceled");if (e.Error != null)Console.WriteLine("Error:" + e.Error.Message);if (e.Document == null)Console.WriteLine("Document is null");var thisOptions = sender as LoadDocumentAsyncOptions;thisOptions.Completed -= completed;if (e.Document != null){PrintOutDocumentInfo(e.Document);}finished.Set();Console.WriteLine("Done");};progress = (sender, f) =>{Console.WriteLine(f.BytesReceived);Console.WriteLine(f.IsCancelPending);Console.WriteLine(f.TotalBytesToReceive);var thisOptions = sender as LoadDocumentAsyncOptions;thisOptions.Progress -= progress;};var options = new LoadDocumentAsyncOptions();options.Completed += completed;finished = new AutoResetEvent(false);DocumentFactory.LoadFromUriAsync(new Uri("http://localhost/Leadtools.pdf"), options);finished.WaitOne();}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
