/// <inheritdoc/> public void Execute(IUndoCommand command) { #region Sanity checks if (command == null) throw new ArgumentNullException(nameof(command)); #endregion command.Execute(); }
public void Execute(IUndoCommand cmd) { var r = cmd.Execute(); if (r) { ++this.CommandCount; this.CommandStack.Push(cmd); } }
/// <inheritdoc/> public void Execute(IUndoCommand command) { #region Sanity checks if (command == null) { throw new ArgumentNullException(nameof(command)); } #endregion command.Execute(); }
public void Redo() { if (RedoCommands.Count == 0) { return; } IUndoCommand cmd = RedoCommands.Pop(); cmd.Execute(); UndoCommands.Push(cmd); redoCallback(); }
/// <summary> /// Adds a command and executes it /// </summary> /// <param name="command"></param> public void Add(IUndoCommand command) { if (currentCommands == null) { using (BeginAdd()) Add(command); } else { currentCommands.ModifiedAssemblies.AddRange(GetLoadedAssemblies(command)); command.Execute(); OnExecutedOneCommand(currentCommands); currentCommands.Commands.Add(command); } }
public void ReverseUndo() { if (this.reverseStack.Count > 0) { IUndoCommand command = ReverseStackPopCommand(); if (command == null) { return; } command.Execute(); UndoStackPushCommand(command); } }
public void Redo() { if (mRedoCommands.Count == 0) { return; } IUndoCommand cmd = mRedoCommands.Pop(); cmd.Execute(); mUndoCommands.Push(cmd); TextChangedEvent(); }
public void Add(IUndoCommand command) { if (currentCommands == null) { using (BeginAdd()) Add(command); } else { foreach (var o in GetModifiedObjects(command)) { currentCommands.ModifiedObjects.Add(o); } command.Execute(); OnExecutedOneCommand(currentCommands); currentCommands.Commands.Add(command); } }
/// <summary> /// Adds a command and executes it /// </summary> /// <param name="command"></param> public void Add(IUndoCommand command) { if (currentCommands == null) { using (BeginAdd()) Add(command); } else { currentCommands.ModifiedObjects.AddRange(GetModifiedObjects(command)); command.Execute(); OnExecutedOneCommand(currentCommands); currentCommands.Commands.Add(command); } }
public void Execute(object parameter) { _command.Execute(parameter); _undoManager.AddCommand(_command); }
public void ExecuteCommand(IUndoCommand command) { command.Execute(); AddCommand(command); }
/// <summary> /// Adds a command and executes it /// </summary> /// <param name="command"></param> public void Add(IUndoCommand command) { if (currentCommands == null) { using (BeginAdd()) Add(command); } else { currentCommands.ModifiedAssemblies.AddRange(GetAssemblyTreeNodes(command)); command.Execute(); OnExecutedOneCommand(currentCommands); currentCommands.Commands.Add(command); } }
public void Execute(object parameter) { _command.Execute(parameter); _mgr.AddCommand(_command); }