Esempio n. 1
0
        public void Merge(CompoundCommand cmd)
        {
            // Replace the current command without upsetting rest of the redo stack
            // and insert the current command into this compound command.
            Command current = Peek();

            if (current != null)
            {
                stack.Insert(pos - 1, cmd);
                stack.RemoveAt(pos);
                cmd.Do();
                cmd.Insert(current);
            }
            else
            {
                Push(cmd);
            }
        }
Esempio n. 2
0
 public void CloseCompoundAction()
 {
     this.compound = null;
 }
Esempio n. 3
0
 public CompoundCommand OpenCompoundAction(string name)
 {
     this.compound = new CompoundCommand(name);
     Add(this.compound);
     return(this.compound);
 }