public TBaseWorkShape FindFirstChild(int AltId, int ANumAlt, int AIdParentShape, ref int AUID) { int nUid; TNodeMain TempN; TNodeSearch Node; nUid = FindNextUid(); AUID = nUid; Node = new TNodeSearch(); List.Add(Node); Node.UID = nUid; Node.indexFindChild = -1; TempN = MainList.SearchFirstNodeToAlternate(AltId, ANumAlt, AIdParentShape); while (TempN != null) { Node.List.Add(TempN.WorkShape); TempN = MainList.SearchNextNodeToAlternate(AltId, ANumAlt, TempN); } if (Node.List.Count > 0) { Node.indexFindChild = 0; return((TBaseWorkShape)(Node.List.ElementAt(Node.indexFindChild))); } return(null); }
public TBaseWorkShape FindNextChild(int AUID) { TNodeSearch Node = FindNode(AUID); if (Node != null) { Node.indexFindChild++; if (Node.List.Count > Node.indexFindChild) { return((TBaseWorkShape)(Node.List.ElementAt(Node.indexFindChild))); } } return(null); }