DrawToolsRedux/Command.cs

(完整代码) 855B

/// Undo-Redo code is written using the article:
/// http://www.codeproject.com/cs/design/commandpatterndemo.asp
//  The Command Pattern and MVC Architecture
//  By David Veeneman.
namespace DrawTools
{
	/// <summary>
	/// Base class for commands used for Undo - Redo
	/// </summary>
	public abstract class Command
	{
		// This function is used to make Undo operation.
		// It makes action opposite to the original command.
		//public abstract void Undo(GraphicsList list);
		public abstract void Undo(Layers list);
		// This command is used to make Redo operation.
		// It makes original command again.
		//public abstract void Redo(GraphicsList list);
		public abstract void Redo(Layers list);
		// Derived classes have members which contain enough information
		// to make Undo and Redo operations for every specific command.
	}
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。