Example #1
0
        public void AddNom(Nom nom, double grams)
        {
            foreach (NomsThisMeal test in _noms)
            {
                if (test.NomType.Id == nom.Id)
                {
                    test.Grams += grams;
                    return;
                }
            }
            NomsThisMeal newNom = new NomsThisMeal
            {
                MyMeal  = this,
                NomType = nom,
                Grams   = grams
            };

            _noms.Add(newNom);
        }
Example #2
0
 public MealDisplayer(NomsThisMeal noms)
 {
     _nom = noms;
 }