Example #1
0
 public static BAND ParseStringValue(string bandstr)
 {
     foreach (BAND b in Bands.GetValuesExceptNoneAndAll())
     {
         if (String.Compare(Bands.GetStringValue(b), bandstr, true) == 0)
         {
             return(b);
         }
     }
     return(BAND.BNONE);
 }
Example #2
0
        public static BAND Previous(BAND band)
        {
            BAND[] bands = Bands.GetValuesExceptNoneAndAll();
            int    i     = Array.IndexOf(bands, band);

            if (i < 1)
            {
                i = 1;
            }
            else if (i > bands.Length - 1)
            {
                i = bands.Length - 1;
            }
            return(bands[i - 1]);
        }
Example #3
0
        public static BAND Next(BAND band)
        {
            BAND[] bands = Bands.GetValuesExceptNoneAndAll();
            int    i     = Array.IndexOf(bands, band);

            if (i < 0)
            {
                i = 0;
            }
            else if (i > bands.Length - 2)
            {
                i = bands.Length - 2;
            }
            return(bands[i + 1]);
        }