Example #1
0
        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;
        }
Example #2
0
 public Hops()
 {
     AlphaAcid              = new HopAcids();
     BetaAcid               = new HopAcids();
     CoHumulone             = new HopAcids();
     MyrceneOilComposition  = new HopAcids();
     HumuleneOilComposition = new HopAcids();
     CaryophylleneOil       = new HopAcids();
     FarneseneOil           = new HopAcids();
 }
Example #3
0
 public Hops()
 {
     AlphaAcid = new HopAcids();
     BetaAcid = new HopAcids();
     CoHumulone = new HopAcids();
     MyrceneOilComposition = new HopAcids();
     HumuleneOilComposition = new HopAcids();
     CaryophylleneOil = new HopAcids();
     FarneseneOil = new HopAcids();
 }