This project has moved and is read-only. For the latest updates, please go here.

CanUndo/CanRedo properties on the UndoRoot class

Dec 17, 2010 at 12:20 AM

Hi Nathan,

Great work. I just took a look at the library for evaluation purposes and found it very interesting.
May I sugest a small addition to the UndoRoot class ?

        public bool CanUndo
        {
            get
            {
                return _undoStack.Count > 0;
            }
        }

        public bool CanRedo
        {
            get
            {
                return _redoStack.Count > 0;
            }
        }

Cheers!
Catalin

Dec 17, 2010 at 7:38 PM

Hi Catalin,

Thanks for the suggestion! I'll add that in.

Let me know if you run into any other issues and/or suggestions.

 

Thanks,

- Nathan

Dec 17, 2010 at 8:42 PM

Just added these properties and the associated tests. Let me know if this is what you had in mind.

I have one other change that I may add before I make another release / version.

Thanks,

- Nathan

Jun 19, 2011 at 3:36 AM

These changes have been included in the latest release. 

The binaries are also available on Nuget for those who prefer to pull things down that way.

Thanks for the feedback!