Skip to content

NodeChain

Class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll

A straight chain of nodes on a node canvas, top to bottom (a Provisioning profile, one camera’s flow): the nodes, the selected one and the view. Set NodeChain.Nodes to change what is drawn; NodeChainCanvas draws it with the look of every node canvas (NodeCanvasPainter) and selects on a click.

public sealed class NodeChain : ObservableObject

Inherits ObservableObject

string AddTip { get; set; }

The tooltip of the + below a card.

bool CanAdd { get; set; }

The + below the cards that may be followed (NodeChainNode.CanAddAfter) shows (the editor).

bool CanSelect { get; set; }

Clicks select nodes (the editor); false: read only, only pan and zoom.

int FitRequest { get; set; }

Rises to ask the canvas to fit every node in the view again (Fit view).

IReadOnlyList<NodeChainNode> Nodes { get; set; }

The nodes from top to bottom.

int SelectedIndex { get; set; }

The selected node; -1: none. A click on a card sets it, a click on the background clears it (when CanSelect).

CanvasView View { get; set; }

The view (zoom and pan); the canvas fits every node in the view when the number of nodes changes.

void FitView()

Every node in the view again.

void RequestAdd(int index, Point at)

The + below the card at index: raises NodeChain.AddRequested (the canvas on a click, tests).

Parameters

  • index: The card whose + was clicked; the new node goes right after it.
  • at: Where the node list opens: right of the + (pixels of the canvas control).
bool ShowsPlus(int index)

The + shows below the card at index: it may be followed and it is the last or the selected one.

event EventHandler<NodeChainAddEventArgs>? AddRequested

The + below a card was clicked: open the node list there (NodePicker).