public UserViewModel() { navManager = PageNavigationManager.Instance; userManager = UserManager.DefaultManager; recipeManager = RecipeManager.DefaultManager; //User = Classes.GlobalVariables.selectedUser; //UserName = User.FirstName + User.LastName; //recipes = recipeManager.GetUserRecipesAsync(User.Email).Result; FollowClicked = new Command(() => { navManager.showUserPage(); }); RecipeClicked = new Command(() => { navManager.showRecipePage(); }); }
public FeedViewModel() { userManager = UserManager.DefaultManager; recipeManager = RecipeManager.DefaultManager; navManager = PageNavigationManager.Instance; //recipe1.RecipeName = "Butter Chicken"; //recipe1.Ingredients = "Chicken breasts, Coriander, Garam masala, Brown onion, Tomato puree, Chicken stock, Thickened cream, Basmati rice"; //recipe1.Description = "A simple and easy butter chicken recipe for beginners"; //recipe1.Instructions = "Marinate chicken in herb mixture, cook onion, cook chicken, add cream, simmer, cook rice, serve"; //recipe1.Email = "*****@*****.**"; //recipe2.RecipeName = "Spaghetti Bolognese"; //recipe2.Ingredients = "Beef mince, Angel hair spaghetti, Tomato paste, Chunky tomato, Carrot, Zucchini, Brown onion, Parmesan cheese"; //recipe2.Description = "A classic spaghetti bolognese big enough for the whole family"; //recipe2.Instructions = "Sautee onion, cook mince, add carrot and zucchini, add tomato paste and chunky tomato, simmer, cook spaghetti, serve topped with parmesan cheese"; //recipe2.Email = "*****@*****.**"; //recipe3.RecipeName = "Asian Chicken Stir-Fry"; //recipe3.Ingredients = "Sliced chicken breasts, capsicum, soy sauce, broccoli, carrot, noodles"; //recipe3.Description = "A basic asian-style chicken stir-fry"; //recipe.Instructions = "Cook chicken, cook broccoli and carrot, add soy sauce, add capsicum, cook noodles, serve"; //recipe3.Email = "*****@*****.**"; //user1.FirstName = "Joe"; //user1.LastName = "Bloggs"; //user1.Email = "*****@*****.**"; //user2.FirstName = "Jane"; //user2.LastName = "Doe"; //user2.Email = "*****@*****.**"; //user3.FirstName = "John"; //user3.LastName = "Smith"; //user3.Email = "*****@*****.**"; //recipes.Add(recipe1); //recipes.Add(recipe2); //recipes.Add(recipe3); //users.Add(user1); //users.Add(user2); //users.Add(user3); //UserName = FindUsername(users); //users = userManager.GetUsersAsync().Result; //recipes = recipeManager.GetRecipesAsync().Result; UserClicked = new Command(() => { navManager.showUserPage(); }); RecipeClicked = new Command(() => { navManager.showRecipePage(); }); AddClicked = new Command(() => { navManager.ShowAddRecipePage(); }); }