Пример #1
0
        public void RecipeBook()
        {
            RecipeBook book = new RecipeBook();
            book.Title = "Bread Recipies";

            Recipe r = new Recipe();
            r.Title = "Nachos!";
            r.Author = "Gavin Jones";

            book.Add(r);
        }
Пример #2
0
        public void Pantry()
        {
            Pantry s = new Pantry();
            Ingredient mince = s.Find("Prime Beef Mince").Ingredient;
            Ingredient onion = s.Find("Onion").Ingredient.Prepare("Chopped");
            Ingredient beans = s.Find("Mexican Beans", "Can").Ingredient;

            Recipe r = new Recipe();
            r.IngredientsRequired.Add(Measure.Weight<Grams>(500), mince);
            r.IngredientsRequired.Add(Measure.Quantity<Units>(0.5), onion);
            r.IngredientsRequired.Add(Measure.Quantity<Units>(1), beans);
        }
Пример #3
0
        public Model.Models.Recipe ToRecipe()
        {
            Recipe ret = new Recipe();
            string title = d.head.Rows[0][d.head.titleColumn.ColumnName] as string;
            ret.Title = title;

            foreach (var ing in d.ing)
            {
                var id = ing.ing_Id;
                var item = ing.item;
                TheKitchen.Converters.CoreConverters.RecipeML.NewDataSet.amtRow qty = d.amt.FirstOrDefault(p => p.ing_Id == id);
                var qtyVal = ParseQty(qty);
                if (qtyVal == null)
                    throw new ApplicationException(string.Format("Exception reading ingredient ID {0}", id));

                RecipeIngredient recipeItem = new RecipeIngredient(qtyVal, new Ingredient(item));
                ret.IngredientsRequired.Add(recipeItem);
            }

            return ret;
        }
Пример #4
0
        public void Nachos()
        {
            Recipe r = new Recipe();
            r.Title = "Nachos!";
            r.Author = "Gavin Jones";

            r.IngredientsRequired.Add(Measure.Weight<Grams>(500), "Prime Beef Mince");
            r.IngredientsRequired.Add(Measure.Quantity<Units>(0.5), "Onion", "Chopped");
            r.IngredientsRequired.Add(Measure.Quantity<Units>(2), "Garlic Cloves", "Chopped");
            r.IngredientsRequired.Add(Measure.Quantity<Units>(1), "Large Carrot", "Grated");
            r.IngredientsRequired.Add(Measure.Volume<Teaspoons>(0.5), "Greggs Chilli (jar)");
            r.IngredientsRequired.Add(Measure.Quantity<Units>(1), "Chopped Peeled Tomatos (can)");
            r.IngredientsRequired.Add(Measure.Quantity<Units>(1), "Mexican Beans (can)");
            r.IngredientsRequired.Add(Measure.Quantity<Units>(1), "Maggi Burrito Mix (packet)");

            r.IngredientsRequired.Add(Measure.Quantity<Units>(1), "Black Pepper (taste)");
            r.IngredientsRequired.Add(Measure.Quantity<Units>(1), "Chilli Powder (taste)");

            r.IngredientsRequired.Add(Measure.Quantity<Units>(1), "Nacho Chips (packet)");
            r.IngredientsRequired.Add(Measure.Quantity<Units>(1), "Sour Cream");
            r.IngredientsRequired.Add(Measure.Quantity<Units>(1), "Cheese", "Grated");
        }
Пример #5
0
 // TODO: Implement
 public void Add(Recipe r)
 {
 }