Table of Contents

Class MoveNodesCommand

Namespace
FlowGraph.Core.Commands
Assembly
FlowGraph.Core.dll

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

graph Graph
node Node
oldPosition Point
newPosition Point

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

graph Graph
oldPositions Dictionary<string, Point>
newPositions Dictionary<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

string

Methods

Execute()

Executes the command.

public void Execute()

Undo()

Reverses the command (undo).

public void Undo()