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); }
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]); }
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]); }