Hi msdn .,
I am implementing custom Undo/ Redo for my Control editor type application Which looks small type Visual Basic Design Editor .
While creating a control i am saving info in arraylistas " C " with control name.WHile postion of control or resizes i am storing that information as a property action "B " with control name .
Now if Ctrl +Z based on the information present in data in Arraylist i.e., the min item in list and letter C or B
C - As Creation of control/s
B - As Bounds of control /s Changes
For these ,there is no problem i did the UNDO / REDO for my application . But the problem comes with " Delete Button "
if i give letter "D" in arraylist
D - Delete the control/s
Undo AL arraylist
REDo AL arraylist
Here goes the in the order
C
D
Ctrl Z means if D then i am creating again if C comes i am deleting the control again . NO PROBLEM
then both rows moved to AL REDO
if again ctrl Y D Comes first i am creating the cotnrol then again CTRL Y then Deleting the control . "D"
if i press again i created the control . then control is moved Ctrl infor added in Undo list . "P"
then if i press delete 1 more record added into Undo List . "D"
Here comes the duplication of Control Information . So i am creating Multiple controls with same with this logic .
If i dont maintain the Delete KEY record the problem is ::
i created 3 controls 1 2 3 then Ctrl A , Removed the controls if i CTRL Z i dont know To createall the 3 controls back ie..,Record again if Multiple Controls Exist .
I create only for the last control which is not correct
So is there any way to track the DELETE Button Control/s Infor and do exactly like MS is doing
Eagerly Waiting for your response.
VS