コード例 #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();
            }
        }
コード例 #2
0
        public override async Task OnAppearing()
        {
            await base.OnAppearing();

            Recipe = await recipesFacade.GetRecipeAsync(viewModelParameter);
        }