Page 1 of 1

Recommended way to determine if save is completed

Posted: Tue Jun 15, 2010 3:01 am
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

Re: Recommended way to determine if save is completed

Posted: Tue Jun 15, 2010 8:29 am
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

Re: Recommended way to determine if save is completed

Posted: Tue Jun 15, 2010 5:52 pm
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.

Re: Recommended way to determine if save is completed

Posted: Thu Jun 17, 2010 8:09 am
by Alex
Hello Shane,

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

Best regards, Alexander

Re: Recommended way to determine if save is completed

Posted: Mon Jul 05, 2010 7:46 am
by vincomgo
hi,is it invalid yet:-?
---------
Dedicated JAVA Developers

Re: Recommended way to determine if save is completed

Posted: Wed Jul 07, 2010 8:10 am
by Alex
Hello,
hi,is it invalid yet:-?
What do you mean?

Best regards, Alexander