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