Exemplo n.º 1
0
        public override async Task OnAppearing()
        {
            await base.OnAppearing();

            if (viewModelParameter == null)
            {
                Recipe = new RecipeDetailModel();
            }
            else
            {
                Recipe = await recipesFacade.GetRecipeAsync(viewModelParameter.Value);

                OnPropertyChanged("Recipe.FoodType");
            }

            if (IngredientsAll == null)
            {
                IngredientsAll = await ingredientsFacade.GetIngredientsAsync();
            }

            if (UnitTexts == null)
            {
                UnitTexts = Enum.GetNames(typeof(Unit)).ToList();
            }

            if (FoodTypeTexts == null)
            {
                FoodTypeTexts = Enum.GetNames(typeof(FoodType)).ToList();
            }
        }
Exemplo n.º 2
0
        public override async Task OnAppearing()
        {
            await base.OnAppearing();

            Recipe = await recipesFacade.GetRecipeAsync(viewModelParameter);
        }