如何实现撤销/重做操作,而在程序的重大变化 [英] how to implement undo/redo operation without major changes in program
问题描述
喜
我正要新的功能添加到应用程序,我目前书面方式。我需要写一个撤销/重做fnctionality。但是90%的应用程序已经准备好,我不知道什么是对执行没有它已经被创建affectig(太多)代码这一功能的最佳方式。
Hi I'm about to add new functionality to application which I'm currently writting. I need to write a undo/redo fnctionality. However 90% of our application is ready and I don't know what is the best way to implementing this functionality without affectig(too much ) code which has been already created.
推荐答案
有没有很多细节在这里。然而,撤销/重做功能通常通过命令模式的一些变化处理。根据您的架构,这可能是你的基本功能的简单改造成命令或大修。
There aren't many details here. However, Undo/Redo functionality is typically handled via some variation of the Command Pattern. Depending on your architecture, this could be a simple reworking of your basic functionality into "commands", or a major overhaul.
这篇关于如何实现撤销/重做操作,而在程序的重大变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!