Tim
Sun Mar 13 12:02:09 CST 2005
I've never actually gone through the process of creating an undo/redo action
command set in code. Sounds interesting. I just came across the Command
pattern in the past and noticed that the "real-world code demonstrates" of
the Command pattern, at the bottom of the page, has a basic undo/redo
strategy. Anything more complicated might be too complicated for the given
task. The undo/redo example is pretty much entirely written from the ground
up, meaning that there is not much framework "help" in it aside from some
stuff out of the Collections namespace.
--
Tim Wilson
.Net Compact Framework MVP
"Lini" <Lini@discussions.microsoft.com> wrote in message
news:488346BF-5F6B-43D5-80CE-ECE1D7FD7686@microsoft.com...
> Hi Tim,
>
> You're a big help! I can read the C# code in that link you sent...Not sure
> if it is deep enough but that's not my technical critique showing, just
> expected implementations of interfaces like ICommand etc which I can't
seem
> to get to from VB. Not sure what imports to use other than System.
>
> Also my drawing class has so many commands, I cannot see how to store
these
> operations for the inevitable undo actions by the user. Phew, where to
start
> skinning this cat??
>
> Gonna buy the book on Design Patterns for VB.Net or something like that...
> anything that may help a bit more!
>
> Thanks again,
>
> Lini
>
>
> "Tim Wilson" wrote:
>
> > No, sorry. The only samples that I'm currently aware of are in C#.
However,
> > there are C# to VB.Net converters out on the Internet. Here is one
> > (
http://csharpconverter.claritycon.com/Default.aspx). I don't know of
any
> > converters that are perfect so I would advise you to pass a block of C#
code
> > in at a time and then look it over to see the conversion that was made
so
> > that maybe in the future you could translate without the help of a
> > converter. I find it particularly useful to have a good working
knowledge of
> > other languages, even if I don't code in them, just so that I could
> > translate a sample if I needed to.
> >
> > --
> > Tim Wilson
> > ..Net Compact Framework MVP
> >
> > "Lini" <Lini@discussions.microsoft.com> wrote in message
> > news:61F4C3FD-DB9A-47B5-BCEE-F1FE2A53BA40@microsoft.com...
> > > Heh Tim,
> > >
> > > Great link and this has opened my eyes a lot!
> > > Have used a derivative of the Factory Pattern but that as far as I
went...
> > >
> > > Any samples in VB you know of?
> > >
> > > Thanks again,
> > >
> > > Lini
> > >
> > > "Tim Wilson" wrote:
> > >
> > > > This might be a good place to start.
> > > >
http://www.dofactory.com/Patterns/PatternCommand.aspx
> > > >
> > > > --
> > > > Tim Wilson
> > > > ..Net Compact Framework MVP
> > > >
> > > > "Stefan Lieser" <slieser@t-online.de> wrote in message
> > > > news:d0uf57$d4i$02$1@news.t-online.com...
> > > > > Hi Lini,
> > > > >
> > > > > > What do I import/reference or declare to ge tto the Command
pattern
> > or
> > > > > > Command object?
> > > > >
> > > > > well.... you should google for Command pattern. It's not as easy
as
> > > > > importing some assemblies, you have to program the necessary
classes.
> > > > There
> > > > > are lots of examples on the web, so you have not to reinvent the
wheel
> > of
> > > > > course ;-)
> > > > >
> > > > >
> > > > > Sincerely,
> > > > > Stefan Lieser
> > > > >
> > > > >
> > > >
> > > >
> > > >
> >
> >
> >