public void PerformAction(DocumentWorkspaceAction action) { bool nullTool = false; if ((action.ActionFlags & ActionFlags.KeepToolActive) != ActionFlags.KeepToolActive) { PushNullTool(); Update(); nullTool = true; } try { using (new WaitCursorChanger(this)) { HistoryMemento ha = action.PerformAction(this); if (ha != null) { History.PushNewMemento(ha); } } } finally { if (nullTool) { PopNullTool(); } } }
public void PerformActionAsync(DocumentWorkspaceAction action) { BeginInvoke(new Procedure<DocumentWorkspaceAction>(PerformAction), new object[] { action }); }