Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, November 7, 2006 10:50:32 PM(UTC)

marasma  
marasma

Groups: Registered
Posts: 51


Hi,
I need to develop Undo/Redo Function in my application. I'm using a manual coded annotation environment, not the automated one. In automated env I see the way, but in manual coded way?

Thanks.

P.S.: I use LT 14.5 in Vb.NET
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, November 9, 2006 10:02:40 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

There is no built-in Undo/Redo feature when you use non-automated Annotations. One way to implement them yourself is to take a snapshot of the annotations before every change using the AnnCodecs.Save Method (for example to a memory stream). When the user wants to undo a step, you can use the AnnCodecs.Load method to retrieve the previous state.

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Wednesday, April 18, 2007 3:55:43 AM(UTC)
vijaychikte

Groups: Registered
Posts: 2


Hi Expert,

I'm using LeadTools 14.5 in my application with automated annotations. I found that there is no support for Redo, though there is a support for Undo.

Will you please guide me how to implement Redo functionality? Actually, I'm not getting the recently undone HANNOBJECT. I thought of using the recently undone HANNOBJECT to insert again into the container.

Hope to get a positive and valuable reply soon.

~Vijay
 
#4 Posted : Thursday, April 19, 2007 10:16:01 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


The easiest way to do it would be to Save and load annotation files.  Depending on your LEADTOOLS interface, the function calls will be a little different, but the basic idea is this:

1. Just before calling Undo, save an annotation file to a temporary disk location.  You should do this each time you wish to be able to track undos so that ou can redo the action.  For example, if you only want to be able to redo up to the last 10 undos, you should create up to 10 annotation files.
2. If you decide you want to redo an action, all you have to do is delete all the annotations currently on your container and then load the annotation file corresponding to the latest undo action.
3. Whenever you redo, you will probably want to delete the annotation file you used to "redo" as well as delete them all once your application is done running.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.152 seconds.