public int GetNodeIndex(BasicNode target) { for (int i = 0; i < NodeCount; i++) { if (vNodes[i] == target) { return(i); } } return(-1); }
public int GetNodeIndex(BasicNode target) { for (int i = 0; i < NodeCount; i++) { if (vNodes[i] == target) { return i; } } return -1; }
public void Disconnect(BasicNode target) { int i = GetNodeIndex(target); if (NodeOnDisconnect != null) { if ((byte)NodeOnDisconnect(this, target) == CancelOperation) { return; } } if (i >= 0) { vNodes[i] = null; } }
public byte Connect(BasicNode target) { int i = GetNodeIndex(null); if (NodeOnDisconnect != null) { if ((byte)NodeOnDisconnect(this, target) == CancelOperation) { return CancelOperation; } } if (i < 0) { return ErrNodeListFull; } else { vNodes[i] = target; return Successful; } }
public byte Connect(BasicNode target) { int i = GetNodeIndex(null); byte rlt; if (NodeOnDisconnect != null) { if ((byte)NodeOnDisconnect(this, target) == CancelOperation) { return(CancelOperation); } } if (i < 0) { return(ErrNodeListFull); } else { vNodes[i] = target; return(Successful); } }