Recommended way to determine if save is completed

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
smithsw
Posts: 11
Joined: Fri Mar 19, 2010 9:21 pm

Recommended way to determine if save is completed

Post by smithsw »

I'm using code from the Image Viewer Demo (v4.2) saveCurrentImageToolStripMenuItem_Click function to save the image file back to the source file. What is the best way to determine if the image save process has completed? I need to make sure the file save process is complete before the application moves the image file to it's final destination on the server.

If the progress value in UpdateSavingImagesProgress = 100, does that do it? I noticed that this value will hit 100 without running through the function above (for example when rotating a page) but the changes are not saved back to the source file until the code in that function is run.

Thanks,

Shane
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Recommended way to determine if save is completed

Post by Alex »

Hello Shane,
If the progress value in UpdateSavingImagesProgress = 100, does that do it? I noticed that this value will hit 100 without running through the function above (for example when rotating a page) but the changes are not saved back to the source file until the code in that function is run.
100% progress means that all images from image collection were processed. You must subscribe to the ImageCollectionSaved event if you want to know when image collection was saved.

Best regards, Alexander
smithsw
Posts: 11
Joined: Fri Mar 19, 2010 9:21 pm

Re: Recommended way to determine if save is completed

Post by smithsw »

So I'm assuming that once that the event created by:

Code: Select all

AddHandler encoder.ImageCollectionSaved, New ImageCollectionSavedEventHandler(AddressOf encoder_ImageCollectionSaved)
is raised (which finally ends up in the sub ChangeSourceStreamToSaveStream), I can safely assume the image collection is saved and the file is ready to be closed and moved.
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Recommended way to determine if save is completed

Post by Alex »

Hello Shane,

Yes, file is ready to be closed and moved after the ImageCollectionSaved event.

Best regards, Alexander
vincomgo
Posts: 1
Joined: Mon Jul 05, 2010 7:23 am

Re: Recommended way to determine if save is completed

Post by vincomgo »

hi,is it invalid yet:-?
---------
Dedicated JAVA Developers
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Recommended way to determine if save is completed

Post by Alex »

Hello,
hi,is it invalid yet:-?
What do you mean?

Best regards, Alexander
Post Reply