Indicates that an asynchronous save operation has been completed.
public event EventHandler<Leadtools.Codecs.CodecsSaveAsyncCompletedEventArgs> SaveAsyncCompleted
Public Event SaveAsyncCompleted As EventHandler(Of Leadtools.Codecs.CodecsSaveAsyncCompletedEventArgs)
public:
event EventHandler<Leadtools::Codecs::CodecsSaveAsyncCompletedEventArgs^>^ SaveAsyncCompleted
synchronized public void addSaveAsyncCompletedListener(CodecsSaveAsyncCompletedListener listener)
synchronized public void removeSaveAsyncCompletedListener(CodecsSaveAsyncCompletedListener listener)
The RasterCodecs class supports saving image files asynchronously using the SaveAsync(RasterImage,Uri,RasterImageFormat,int,int,int,object) methods. When calling any of these methods, the caller thread will not be blocked and the method will return instantly.
When the RasterCodecs object finishes saving the image, the SaveAsyncCompleted event is fired to notify that the operation is completed and whether any errors occurred.
The SaveAsyncCompleted event uses a data argument object of type CodecsSaveAsyncCompletedEventArgs. This class contains the following properties:
Property | Description |
---|---|
CodecsSaveAsyncCompletedEventArgs.Uri, CodecsSaveAsyncCompletedEventArgs.Stream and CodecsSaveAsyncCompletedEventArgs.FileName |
Contains the URI, stream or file name passed to the method that initialized this asynchronous operation. Only one of these properties can be a valid value (not a null reference) at any time. The property that contains a valid reference depends on which version overload of the SaveAsync(RasterImage,Uri,RasterImageFormat,int,int,int,object) method has been called. For example, if SaveAsync(RasterImage image, Uri uri, RasterImageFormat format, int bitsPerPixel, object userState) has been called, the Uri will contain the same URI passed to the method while Stream and FileName will both be null. If SaveAsync(RasterImage image, string fileName, RasterImageFormat format, int bitsPerPixel, object userState) has been called, the FileName will contain the same filename string value passed to the method while Uri and Stream will both be null, and so on. |
CodecsSaveAsyncCompletedEventArgs.Image | Contains the original RasterImage object passed to the calling save method. |
System.ComponentModel.AsyncCompletedEventArgs.Error | Contains any errors that might have occurred during the asynchronous operation. You must check this value when the SaveAsyncCompleted event fires and make sure it does not contain a valid System.Exception object. |
System.ComponentModel.AsyncCompletedEventArgs.Cancelled | Contains a value indicating whether an asynchronous operation has been canceled. For example, by calling CancelAsync when using SaveAsync with a URL. |
Parameter | Type | Description |
---|---|---|
sender | object | The source of the event. |
e | CodecsSaveAsyncCompletedEventArgs | The event data. |
Products |
Support |
Feedback: SaveAsyncCompleted Event (RasterCodecs) - Leadtools.Codecs |
Introduction |
Help Version 19.0.2017.6.16
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.