Exemple #1
0
        public static int Ordinal(this LED.State s)
        {
            int i = 0;

            foreach (LED.State v in Enum.GetValues(typeof(LED.State)))
            {
                if ((int)v == (int)s)
                {
                    return(i);
                }
                i++;
            }

            return(-1);
        }
Exemple #2
0
 public static void SetAllLEDSState(LED.State s)
 {
     workingLed.myState = s;
     breakLed.myState   = s;
     freeLed.myState    = s;
 }