///<summary>Loops through the element list and pulls out one element of a specific type. Used in the button edit window.</summary> public static SigButDefElement GetElement(SigButDef def, SignalElementType elementType) { for (int i = 0; i < def.ElementList.Length; i++) { if (SigElementDefs.GetElement(def.ElementList[i].SigElementDefNum).SigElementType == elementType) { return(def.ElementList[i].Copy()); } } return(null); }
///<summary>Loops through the element list and pulls out one element of a specific type. Used in the button edit window.</summary> public static SigButDefElement GetElement(SigButDef def, SignalElementType elementType) { //No need to check RemotingRole; no call to db. for (int i = 0; i < def.ElementList.Length; i++) { if (SigElementDefs.GetElement(def.ElementList[i].SigElementDefNum).SigElementType == elementType) { return(def.ElementList[i].Copy()); } } return(null); }
///<summary></summary> public static SigElementDef[] GetSubList(SignalElementType sigElementType){ //No need to check RemotingRole; no call to db. ArrayList AL=new ArrayList(); for(int i=0;i<List.Length;i++){ if(sigElementType==List[i].SigElementType){ AL.Add(List[i]); } } SigElementDef[] retVal=new SigElementDef[AL.Count]; AL.CopyTo(retVal); return retVal; }
///<summary></summary> public static SigElementDef[] GetSubList(SignalElementType sigElementType) { ArrayList AL = new ArrayList(); for (int i = 0; i < List.Length; i++) { if (sigElementType == List[i].SigElementType) { AL.Add(List[i]); } } SigElementDef[] retVal = new SigElementDef[AL.Count]; AL.CopyTo(retVal); return(retVal); }
///<summary></summary> public static SigElementDef[] GetSubList(SignalElementType sigElementType) { //No need to check RemotingRole; no call to db. ArrayList AL = new ArrayList(); for (int i = 0; i < List.Length; i++) { if (sigElementType == List[i].SigElementType) { AL.Add(List[i]); } } SigElementDef[] retVal = new SigElementDef[AL.Count]; AL.CopyTo(retVal); return(retVal); }
///<summary></summary> public static SigElementDef[] GetSubList(SignalElementType sigElementType) { //No need to check RemotingRole; no call to db. return(GetWhere(x => x.SigElementType == sigElementType).ToArray()); }
///<summary>Loops through the element list and pulls out one element of a specific type. Used in the button edit window.</summary> public static SigButDefElement GetElement(SigButDef def,SignalElementType elementType) { //No need to check RemotingRole; no call to db. for(int i=0;i<def.ElementList.Length;i++) { if(SigElementDefs.GetElement(def.ElementList[i].SigElementDefNum).SigElementType==elementType) { return def.ElementList[i].Copy(); } } return null; }