Exemplo n.º 1
0
        private void btnAddIngredient_Click(object sender, EventArgs e)
        {
            Ingredient ing = (Ingredient)lbIngrAvailable.SelectedItem;

            SelectedIngredients.Add(ing, double.Parse(tbProdQuant.Text));
            DishWeight += double.Parse(tbProdQuant.Text);
            refreshSelectedIngredients();
        }
        public RecipeListDesignViewModel()
        {
            AvailableRecipes.Add(TestData.GetTestRecipe("Eierspeis"));
            AvailableRecipes.Add(TestData.GetTestRecipe("Schnitzel"));
            AvailableRecipes.Add(TestData.GetTestRecipe("Curry"));
            AvailableRecipes.Add(TestData.GetTestRecipe("Brathendl"));
            AvailableRecipes.Add(TestData.GetTestRecipe("Pancakes"));

            AvailableIngredients.Add(new FilterObject(TestData.GetTestIngredient("Mehl")));
            AvailableIngredients.Add(new FilterObject(TestData.GetTestIngredient("Milch")));
            AvailableIngredients.Add(new FilterObject(TestData.GetTestIngredient("Eier")));

            SelectedIngredients.Add(AvailableIngredients[1]);
            SelectedIngredients.Add(AvailableIngredients[2]);

            AvailableCategories.AddRange(TestData.GetTestFilterCategories());

            SelectedCategory = AvailableCategories[0];

            SearchByRecipe     = false;
            SearchByIngredient = true;
        }
Exemplo n.º 3
0
 public void AddEmptyIngredient()
 {
     SelectedIngredients.Add(new AdminSelectedIngredient());
 }