1234567891011121314151617181920212223242526272829303132 |
- /////////////////////////////////////////////////////////////////////////////////
- // Paint.NET //
- // Copyright (C) dotPDN LLC, Rick Brewster, Tom Jackson, and contributors. //
- // Portions Copyright (C) Microsoft Corporation. All Rights Reserved. //
- // See src/Resources/Files/License.txt for full licensing and attribution //
- // details. //
- // . //
- /////////////////////////////////////////////////////////////////////////////////
- using System;
- namespace PaintDotNet.Measurement.HistoryMementos
- {
- /// <summary>
- /// This history action doesn't really do anything. It is useful for putting in a
- /// "New Image" placeholder, since the first item in the undo stack can't really
- /// be "undone".
- /// NullHistoryMemento instances are also not undoable.
- /// </summary>
- public class NullHistoryMemento : HistoryMemento
- {
- protected override HistoryMemento OnUndo()
- {
- throw new InvalidOperationException("NullHistoryMementos are not undoable");
- }
- public NullHistoryMemento(string name, ImageResource image)
- : base(name, image)
- {
- }
- }
- }
|