예제 #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;
        }
예제 #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();
 }
예제 #3
0
파일: Hops.cs 프로젝트: rmcarlsson/wbc
 public Hops()
 {
     AlphaAcid = new HopAcids();
     BetaAcid = new HopAcids();
     CoHumulone = new HopAcids();
     MyrceneOilComposition = new HopAcids();
     HumuleneOilComposition = new HopAcids();
     CaryophylleneOil = new HopAcids();
     FarneseneOil = new HopAcids();
 }