public bool ConnectNodes(AFlowNode from, ANode to)
{
if (_nodes.Contains(from) && _nodes.Contains(to) && to != Root) {
var n = to as AFlowNode;
if (n != null) {
//check nodes recursive to prevent circular trees
if (IsConnected(from, n)) {
return false;
}
}
return from.AddNode(to);
}
return false;
}