Ejemplo n.º 1
0
 ///<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);
 }
Ejemplo n.º 2
0
 ///<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);
 }
Ejemplo n.º 3
0
		///<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;
		}
Ejemplo n.º 4
0
        ///<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);
        }
Ejemplo n.º 5
0
        ///<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);
        }
Ejemplo n.º 6
0
 ///<summary></summary>
 public static SigElementDef[] GetSubList(SignalElementType sigElementType)
 {
     //No need to check RemotingRole; no call to db.
     return(GetWhere(x => x.SigElementType == sigElementType).ToArray());
 }
Ejemplo n.º 7
0
 ///<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;
 }