Ejemplo n.º 1
0
        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();
                }
            }
        }
Ejemplo n.º 2
0
 public void PerformActionAsync(DocumentWorkspaceAction action)
 {
     BeginInvoke(new Procedure<DocumentWorkspaceAction>(PerformAction), new object[] { action });
 }