Esempio n. 1
0
 public void BeginCompoundCommand(string name)
 {
     if (IsInCompoundMode)
     {
         tempCompoundCommand.BeginCompoundCommand(name);
     }
     else
     {
         tempCompoundCommand = new CompoundCommand(name)
         {
             Owner = Owner
         }
     };
 }
Esempio n. 2
0
 public void EndCompoundCommand()
 {
     if (IsInCompoundMode && tempCompoundCommand.IsInCompoundMode)
     {
         tempCompoundCommand.EndCompoundCommand();
     }
     else
     {
         if (tempCompoundCommand.Count > 0)
         {
             commands.Push(tempCompoundCommand);
         }
         tempCompoundCommand = null;
     }
 }
Esempio n. 3
0
 public void EndCompoundCommand()
 {
     if (IsInCompoundMode && tempCompoundCommand.IsInCompoundMode)
     {
         tempCompoundCommand.EndCompoundCommand();
     }
     else
     {
         redoStack.Clear();
         if (tempCompoundCommand.Count > 0)
         {
             undoStack.Push(tempCompoundCommand);
         }
         tempCompoundCommand = null;
     }
 }