private bool NodeHasConnections(Nodes.NodeRow node) { if (!node.IsConnection1Null() && node.Connection1 != "-1") { return true; } if (!node.IsConnection2Null() && node.Connection2 != "-1") { return true; } if (!node.IsConnection3Null() && node.Connection3 != "-1") { return true; } if (!node.IsConnection4Null() && node.Connection4 != "-1") { return true; } return false; }
public void FromNodeRow(Nodes.NodeRow nodeRow) { if (!nodeRow.IsIDNull()) ID = Convert.ToInt32(nodeRow.ID); if (!nodeRow.IsEntityNull()) Entity = Convert.ToInt32(nodeRow.Entity); if (!nodeRow.IsRadiusNull()) Radius = Convert.ToInt32(nodeRow.Radius); if (!nodeRow.IsFlagNull()) Flags = Convert.ToInt32(nodeRow.Flag); if (!nodeRow.IsGroupNull()) Group = Convert.ToInt32(nodeRow.Group); if (!nodeRow.IsTeamNull()) Team = Convert.ToInt32(nodeRow.Team); if (!nodeRow.IsConnection1Null()) Connect1 = Convert.ToInt32(nodeRow.Connection1); if (!nodeRow.IsConnection2Null()) Connect2 = Convert.ToInt32(nodeRow.Connection2); if (!nodeRow.IsConnection3Null()) Connect3 = Convert.ToInt32(nodeRow.Connection3); if (!nodeRow.IsConnection4Null()) Connect4 = Convert.ToInt32(nodeRow.Connection4); if (!nodeRow.IsPositionXNull()) Position = Convert.ToInt32(nodeRow.PositionX); if (!nodeRow.IsPositionYNull()) Position = Convert.ToInt32(nodeRow.PositionY); if (!nodeRow.IsPositionZNull()) Position = Convert.ToInt32(nodeRow.PositionZ); }