private double[] GetNutrientList()
        {
            double[] nutrients = new double[32];

            if (FoodList != null)
            {
                for (int i = 0; i < FoodList.Count; i++)
                {
                    nutrients.AddDoubleArray(FoodList[i].NutrientList, FoodAmount[i]);
                }
            }

            if (RecipeList != null)
            {
                foreach (RecipeModel r in RecipeList)
                {
                    for (int i = 0; i < r.NutrientList.Length; i++)
                    {
                        nutrients[i] += r.NutrientList[i];
                    }
                }
            }

            return(nutrients);
        }
Exemple #2
0
        private double[] GetNutrientList()
        {
            double[] nutrients = new double[32];

            if (FoodList != null)
            {
                for (int i = 0; i < FoodList.Count; i++)
                {
                    nutrients.AddDoubleArray(FoodList[i].NutrientList, FoodAmount[i]);
                }
            }
            return(nutrients);
        }