Ejemplo n.º 1
0
        internal ReduceRecipeViewModel(RecipeEditorViewModel recipe)
        {
            mRecipe = recipe;
            mItems  = new BindingList <ReduceRecipeItemViewModel>();
            foreach (var item in recipe.Items)
            {
                mItems.Add(new ReduceRecipeItemViewModel(item));
            }

            Commit();
        }
Ejemplo n.º 2
0
        internal ModifyRecipeViewModel(RecipeEditorViewModel recipe)
        {
            mRecipe = recipe;
            Name    = recipe.Name + " (Modified)";

            ByIngredient        = true;
            SelectedIngredient  = null;
            NewIngredientAmount = 0;

            SelectedRecipeAmountDisplay = string.Format("Instead of {0}", Extensions.GetDisplay(recipe.Amount, recipe.Measurement));
            NewRecipeAmount             = 0;

            Commit();
        }