Exemple #1
0
        public async void OnAddClicked()
        {
            var tab = new TabbedPage();

            tab.Title = "New Plan";

            var page  = new RecipeSearchPage();
            var page2 = new RecipeCollectionPage();

            tab.Children.Add(page);
            tab.Children.Add(page2);

            await Navigation.PushAsync(tab);
        }
Exemple #2
0
        public async void OnAddClicked(DateTime date)
        {
            var tab = new TabbedPage();

            tab.Title = date.ToString("dddd, dd MMMM");

            var page  = new RecipeSearchPage(date);
            var page2 = new RecipeCollectionPage(date);

            tab.Children.Add(page);
            tab.Children.Add(page2);

            await Navigation.PushAsync(tab);
        }
Exemple #3
0
        public async void OpenRecipeSearch(object sender, EventArgs e)
        {
            var tab = new TabbedPage();

            tab.Title = "New Plan";

            var page  = new RecipeSearchPage();
            var page2 = new RecipeCollectionPage();

            tab.Children.Add(page);
            tab.Children.Add(page2);

            await Navigation.PushAsync(tab);
        }
        public async void Search(object sender, EventArgs e)
        {
            var button = (Button)sender;

            button.IsEnabled = false;
            busy             = Busy.Flip(busy);

            var search = new List <string>();

            foreach (InventoryListGroup group in inventoryItems)
            {
                foreach (InventoryItem item in group)
                {
                    search.Add(item.Ingredient.ingredientName);
                }
            }

            var page = new RecipeSearchPage(search);

            busy             = Busy.Flip(busy);
            button.IsEnabled = true;
            await Navigation.PushAsync(page);
        }