Class MoveNodesCommand
Command to move one or more nodes to new positions.
public class MoveNodesCommand : IGraphCommand
- Inheritance
-
MoveNodesCommand
- Implements
- Inherited Members
Constructors
MoveNodesCommand(Graph, Node, Point, Point)
Creates a move command for a single node.
public MoveNodesCommand(Graph graph, Node node, Point oldPosition, Point newPosition)
Parameters
MoveNodesCommand(Graph, Dictionary<string, Point>, Dictionary<string, Point>)
Creates a move command for multiple nodes.
public MoveNodesCommand(Graph graph, Dictionary<string, Point> oldPositions, Dictionary<string, Point> newPositions)
Parameters
graphGrapholdPositionsDictionary<string, Point>newPositionsDictionary<string, Point>
Exceptions
- ArgumentNullException
Thrown when graph is null.
- ArgumentException
Thrown when position dictionaries are empty or have mismatched keys.
Properties
Description
Gets a human-readable description of the command.
public string Description { get; }
Property Value
Methods
Execute()
Executes the command.
public void Execute()
Undo()
Reverses the command (undo).
public void Undo()