示例#1
0
文件: Band.cs 项目: dh1df/AirScout
 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);
 }
示例#2
0
文件: Band.cs 项目: dh1df/AirScout
        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]);
        }
示例#3
0
文件: Band.cs 项目: dh1df/AirScout
        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]);
        }