How to implement Undo and redo operations in .NET

3 views
Skip to first unread message

Yeshwanth H V

unread,
Jul 11, 2006, 4:37:18 AM7/11/06
to DotNetDe...@googlegroups.com
Hi friends,
 
        I am trying to implement Undo and Redo Operations in C#.NET. Can anyone of you give me an idea how I can perform this ?
 
Thanks in Advance,
Yeshwanth

Bradley, Peter

unread,
Jul 11, 2006, 5:52:29 AM7/11/06
to DotNetDe...@googlegroups.com

What do you want to undo and redo?  An ASP.NET page?  A Windows form?  A single control in a Web page?  A single control in a form?  Groups of controls?  What types of controls (e.g. do you want word-by-word undo/redo in a text control)?

 

Peter

 


Yesh

unread,
Jul 17, 2006, 3:05:56 AM7/17/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi Peter,

I am writing an windows application in C#.NET. What I am trying
to do is I am creating some graphical shapes on the form. let us assume
that I draw a sqaure, a rectangle , a line on the form in the same
order.

So when I click Undo, at first line has to be disappear. Next
when I click undo , rectangle has to disappear.

In short , I need something where all the user actions can be
saved and then retreive it when desired . I know that we can use stack
and arraylist for this. But I am in need of some more information on
this.


Thanks,
Yesh


Bradley, Peter wrote:

> What do you want to undo and redo? An ASP.NET page? A Windows form? A
> single control in a Web page? A single control in a form? Groups of
> controls? What types of controls (e.g. do you want word-by-word
> undo/redo in a text control)?
>
>
>
> Peter
>
>
>
> _____
>

> From: DotNetDe...@googlegroups.com
> [mailto:DotNetDe...@googlegroups.com] On Behalf Of Yeshwanth H V
> Sent: 11 July 2006 09:37
> To: DotNetDe...@googlegroups.com
> Subject: [DotNetDevelopment] How to implement Undo and redo operations
> in .NET
>
>
>
> Hi friends,
>
>
>
> I am trying to implement Undo and Redo Operations in C#.NET. Can
> anyone of you give me an idea how I can perform this ?
>
>
>
> Thanks in Advance,
>
> Yeshwanth
>
>
>
>

> ------_=_NextPart_001_01C6A4CF.B9381F90
> Content-Type: text/html; charset=utf-8
> Content-Transfer-Encoding: quoted-printable
> X-Google-AttachSize: 4849
>
> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
>
> <head>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
> <meta name=Generator content="Microsoft Word 11 (filtered medium)">
> <!--[if !mso]>
> <style>
> v\:* {behavior:url(#default#VML);}
> o\:* {behavior:url(#default#VML);}
> w\:* {behavior:url(#default#VML);}
> .shape {behavior:url(#default#VML);}
> </style>
> <![endif]--><o:SmartTagType
> namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
> <!--[if !mso]>
> <style>
> st1\:*{behavior:url(#default#ieooui) }
> </style>
> <![endif]-->
> <style>
> <!--
> /* Font Definitions */
> @font-face
> {font-family:Tahoma;
> panose-1:2 11 6 4 3 5 4 4 2 4;}
> /* Style Definitions */
> p.MsoNormal, li.MsoNormal, div.MsoNormal
> {margin:0in;
> margin-bottom:.0001pt;
> font-size:12.0pt;
> font-family:"Times New Roman";}
> a:link, span.MsoHyperlink
> {color:blue;
> text-decoration:underline;}
> a:visited, span.MsoHyperlinkFollowed
> {color:purple;
> text-decoration:underline;}
> span.EmailStyle17
> {mso-style-type:personal-reply;
> font-family:Arial;
> color:navy;}
> @page Section1
> {size:8.5in 11.0in;
> margin:1.0in 1.25in 1.0in 1.25in;}
> div.Section1
> {page:Section1;}
> -->
> </style>
>
> </head>
>
> <body lang=EN-US link=blue vlink=purple>
>
> <div class=Section1>
>
> <p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
> 10.0pt;font-family:Arial;color:navy'>What do you want to undo and redo?&nbsp; An
> ASP.NET page?&nbsp; A Windows form?&nbsp; A single control in a Web page?&nbsp; A single
> control in a form?&nbsp; Groups of controls?&nbsp; What types of controls (e.g. do you
> want word-by-word undo/redo in a text control)?<o:p></o:p></span></font></p>
>
> <p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
> 10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
> 10.0pt;font-family:Arial;color:navy'>Peter<o:p></o:p></span></font></p>
>
> <p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
> 10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>
>
> <div>
>
> <div class=MsoNormal align=center style='text-align:center'><font size=3
> face="Times New Roman"><span style='font-size:12.0pt'>
>
> <hr size=2 width="100%" align=center tabindex=-1>
>
> </span></font></div>
>
> <p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
> font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
> face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> <st1:PersonName
> w:st="on">DotNetDe...@googlegroups.com</st1:PersonName> [mailto:<st1:PersonName
> w:st="on">DotNetDe...@googlegroups.com</st1:PersonName>] <b><span
> style='font-weight:bold'>On Behalf Of </span></b>Yeshwanth H V<br>
> <b><span style='font-weight:bold'>Sent:</span></b> 11 July 2006 09:37<br>
> <b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">DotNetDe...@googlegroups.com</st1:PersonName><br>
> <b><span style='font-weight:bold'>Subject:</span></b> [DotNetDevelopment] How
> to implement Undo and redo operations in .NET</span></font><o:p></o:p></p>
>
> </div>
>
> <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
> 12.0pt'><o:p>&nbsp;</o:p></span></font></p>
>
> <div>
>
> <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
> 12.0pt'>Hi friends,<o:p></o:p></span></font></p>
>
> </div>
>
> <div>
>
> <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
> 12.0pt'>&nbsp;<o:p></o:p></span></font></p>
>
> </div>
>
> <div>
>
> <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
> 12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I am trying to implement


> Undo and Redo Operations in C#.NET. Can anyone of you give me an idea how I can

> perform this ?<o:p></o:p></span></font></p>
>
> </div>
>
> <div>
>
> <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
> 12.0pt'>&nbsp;<o:p></o:p></span></font></p>
>
> </div>
>
> <div>
>
> <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
> 12.0pt'>Thanks in Advance,<o:p></o:p></span></font></p>
>
> </div>
>
> <div>
>
> <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
> 12.0pt'>Yeshwanth<o:p></o:p></span></font></p>
>
> </div>
>
> <p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
> face="Times New Roman"><span style='font-size:12.0pt'><br>
>
> </div>
>
> </body>
>
> </html>
>
> ------_=_NextPart_001_01C6A4CF.B9381F90--

Cerebrus

unread,
Jul 17, 2006, 7:09:00 AM7/17/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I suggest you read Peter's answer to the other similar thread doing the
rounds.

Reply all
Reply to author
Forward
0 new messages