You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
663 B
35 lines
663 B
using System; |
|
using System.Collections.Generic; |
|
using System.Linq; |
|
using System.Text; |
|
|
|
namespace SharpDevelop.XamlDesigner.Dom.UndoSystem |
|
{ |
|
class UndoTransaction : UndoAction |
|
{ |
|
public List<UndoAction> Actions = new List<UndoAction>(); |
|
|
|
public override IEnumerable<DesignItem> GetAffectedItems() |
|
{ |
|
foreach (var action in Actions) { |
|
foreach (var item in action.GetAffectedItems()) { |
|
yield return item; |
|
} |
|
} |
|
} |
|
|
|
public override void Undo() |
|
{ |
|
foreach (var action in Enumerable.Reverse(Actions)) { |
|
action.Undo(); |
|
} |
|
} |
|
|
|
public override void Redo() |
|
{ |
|
foreach (var action in Actions) { |
|
action.Redo(); |
|
} |
|
} |
|
} |
|
}
|
|
|