private bool ParseMaxMinAcid(HopAcids aAcid, string aValueString) { Regex r = new Regex(@"[0-9]+[\,\.]?[0-9]?"); var m = r.Matches(aValueString); float floatVal; bool ret = true; int ix = 0; foreach (Match s in m) { if (float.TryParse(s.Value, out floatVal)) { if (ix != 0) aAcid.Max = floatVal; else aAcid.Min = floatVal; } else { ret = false; break; } ix++; } return ret; }
public Hops() { AlphaAcid = new HopAcids(); BetaAcid = new HopAcids(); CoHumulone = new HopAcids(); MyrceneOilComposition = new HopAcids(); HumuleneOilComposition = new HopAcids(); CaryophylleneOil = new HopAcids(); FarneseneOil = new HopAcids(); }