Exemplo n.º 1
0
        public List <RecipeListItem> recipes(string path)
        {
            ApiCall apiCall = new ApiCall {
            };
            List <RecipeListItem> folders = new List <RecipeListItem> {
            };
            List <string> folderseses     = new List <string> {
            };

            folderseses = apiCall.GetRecipesInFolder(path);
            foreach (string recipe in folderseses)
            {
                string[] fileName = recipe.Split('\\');

                RecipeListItem fold = new RecipeListItem();
                fold.path = path + "\\" + recipe;
                fold.Name = (fileName[fileName.Length - 1]).Replace(".xml", "");

                folders.Add(fold);
            }
            return(folders);
        }
Exemplo n.º 2
0
 private async void ListViewRecipes_ItemTapped(object sender, ItemTappedEventArgs e)
 {
     RecipeListItem tappedRecipe = (RecipeListItem)((ListView)sender).SelectedItem;
     await Navigation.PushAsync(new RecipePage(tappedRecipe.path));
 }