Example #1
0
        private async Task Pizza()
        {
            // Creating list
            var _positions = new List <Position>
            {
                new Position {
                    Name        = "Pizza", Description = "Mexico", OnePrice = 20, Count = 1, Url = "http://images.pizza33.ua/products_for_catalog/fKBxGDG2d4IxUR69a576Ct1QGwRa3xHP.jpg",
                    Composition = "Italian flour or all-purpose flour, oz fresh yeast, water, salt, extra virgin olive oil, mozzarella cheese, basil, tomatoes"
                },
                new Position {
                    Name        = "Pizza", Description = "Italiano", OnePrice = 25, Count = 1, Url = "http://images.pizza33.ua/products_for_catalog/fKBxGDG2d4IxUR69a576Ct1QGwRa3xHP.jpg",
                    Composition = "Italian flour or all-purpose flour, oz fresh yeast, water, salt, extra virgin olive oil, mozzarella cheese, basil, tomatoes"
                },
                new Position {
                    Name        = "Pizza", Description = "Neapolitan", OnePrice = 115, Count = 1, Url = "http://images.pizza33.ua/products_for_catalog/fKBxGDG2d4IxUR69a576Ct1QGwRa3xHP.jpg",
                    Composition = "Italian flour or all-purpose flour, oz fresh yeast, water, salt, extra virgin olive oil, mozzarella cheese, basil, tomatoes"
                },
                new Position {
                    Name        = "Pizza", Description = "Chicago", OnePrice = 35, Count = 1, Url = "http://images.pizza33.ua/products_for_catalog/fKBxGDG2d4IxUR69a576Ct1QGwRa3xHP.jpg",
                    Composition = "Italian flour or all-purpose flour, oz fresh yeast, water, salt, extra virgin olive oil, mozzarella cheese, basil, tomatoes"
                },
                new Position {
                    Name        = "Pizza", Description = "New York Style", OnePrice = 18, Count = 1, Url = "http://images.pizza33.ua/products_for_catalog/fKBxGDG2d4IxUR69a576Ct1QGwRa3xHP.jpg",
                    Composition = "Italian flour or all-purpose flour, oz fresh yeast, water, salt, extra virgin olive oil, mozzarella cheese, basil, tomatoes"
                },
                new Position {
                    Name        = "Pizza", Description = "Sicilian", OnePrice = 34, Count = 1, Url = "http://images.pizza33.ua/products_for_catalog/fKBxGDG2d4IxUR69a576Ct1QGwRa3xHP.jpg",
                    Composition = "Italian flour or all-purpose flour, oz fresh yeast, water, salt, extra virgin olive oil, mozzarella cheese, basil, tomatoes"
                },
                new Position {
                    Name        = "Pizza", Description = "Greek", OnePrice = 41, Count = 1, Url = "http://images.pizza33.ua/products_for_catalog/fKBxGDG2d4IxUR69a576Ct1QGwRa3xHP.jpg",
                    Composition = "Italian flour or all-purpose flour, oz fresh yeast, water, salt, extra virgin olive oil, mozzarella cheese, basil, tomatoes"
                },
                new Position {
                    Name        = "Pizza", Description = "California", OnePrice = 10, Count = 1, Url = "http://images.pizza33.ua/products_for_catalog/fKBxGDG2d4IxUR69a576Ct1QGwRa3xHP.jpg",
                    Composition = "Italian flour or all-purpose flour, oz fresh yeast, water, salt, extra virgin olive oil, mozzarella cheese, basil, tomatoes"
                },
                new Position {
                    Name        = "Pizza", Description = "Thin Crust", OnePrice = 1, Count = 1, Url = "http://images.pizza33.ua/products_for_catalog/fKBxGDG2d4IxUR69a576Ct1QGwRa3xHP.jpg",
                    Composition = "Italian flour or all-purpose flour, oz fresh yeast, water, salt, extra virgin olive oil, mozzarella cheese, basil, tomatoes"
                },
                new Position {
                    Name        = "Pizza", Description = "Alternative", OnePrice = 33, Count = 1, Url = "http://images.pizza33.ua/products_for_catalog/fKBxGDG2d4IxUR69a576Ct1QGwRa3xHP.jpg",
                    Composition = "Italian flour or all-purpose flour, oz fresh yeast, water, salt, extra virgin olive oil, mozzarella cheese, basil, tomatoes"
                }
            };

            var viewModel = new PositionListPageViewModel(_userBase, _pageService, _positions);

            // If 'add to order' pressed -> invoke posAdded
            viewModel.PosAdded += (source, newPosition) =>
            {
                PosAdded?.Invoke(this, newPosition);
            };

            await _pageService.PushAsync(new PositionListPage(viewModel));
        }
Example #2
0
        private async Task Soup()
        {
            // Creating list
            var _positions = new List <Position>
            {
                new Position {
                    Name        = "Soup", Description = "Mexico", OnePrice = 22, Count = 1, Url = "http://cdn3.tmbi.com/toh/GoogleImages/Summer-Vegetable-Soup_exps18529_HWS133216C07_11_2bC_RMS.jpg",
                    Composition = "Sturgeon, salmon, and freshwater crayfish, lemon juice is added to the soup"
                },
                new Position {
                    Name        = "Soup", Description = "Shchi", OnePrice = 17, Count = 1, Url = "http://cdn3.tmbi.com/toh/GoogleImages/Summer-Vegetable-Soup_exps18529_HWS133216C07_11_2bC_RMS.jpg",
                    Composition = "Sturgeon, salmon, and freshwater crayfish, lemon juice is added to the soup"
                },
                new Position {
                    Name        = "Soup", Description = "Solyanka", OnePrice = 120, Count = 1, Url = "http://cdn3.tmbi.com/toh/GoogleImages/Summer-Vegetable-Soup_exps18529_HWS133216C07_11_2bC_RMS.jpg",
                    Composition = "Sturgeon, salmon, and freshwater crayfish, lemon juice is added to the soup"
                },
                new Position {
                    Name        = "Soup", Description = "Svartsoppa", OnePrice = 30, Count = 1, Url = "http://cdn3.tmbi.com/toh/GoogleImages/Summer-Vegetable-Soup_exps18529_HWS133216C07_11_2bC_RMS.jpg",
                    Composition = "Sturgeon, salmon, and freshwater crayfish, lemon juice is added to the soup"
                },
                new Position {
                    Name        = "Soup", Description = "Tarator", OnePrice = 40, Count = 1, Url = "http://cdn3.tmbi.com/toh/GoogleImages/Summer-Vegetable-Soup_exps18529_HWS133216C07_11_2bC_RMS.jpg",
                    Composition = "Sturgeon, salmon, and freshwater crayfish, lemon juice is added to the soup"
                },
                new Position {
                    Name        = "Soup", Description = "Tarhana", OnePrice = 63, Count = 1, Url = "http://cdn3.tmbi.com/toh/GoogleImages/Summer-Vegetable-Soup_exps18529_HWS133216C07_11_2bC_RMS.jpg",
                    Composition = "Sturgeon, salmon, and freshwater crayfish, lemon juice is added to the soup"
                },
            };

            var viewModel = new PositionListPageViewModel(_userBase, _pageService, _positions);

            // If 'add to order' pressed -> invoke posAdded
            viewModel.PosAdded += (source, newPosition) =>
            {
                PosAdded?.Invoke(this, newPosition);
            };

            await _pageService.PushAsync(new PositionListPage(viewModel));
        }
Example #3
0
        private async Task Dessert()
        {
            // Creating list
            var _positions = new List <Position>
            {
                new Position {
                    Name        = "Dessert", Description = "Charlotte", OnePrice = 123, Count = 1, Url = "http://www.kraftrecipes.com/-/media/assets/2016-summer/berry-bliss-cake-106367-642x428.jpg",
                    Composition = "Cheesecake (Vatrushka) is in the form of a dough ring and filled with quark or cottage cheese"
                },
                new Position {
                    Name        = "Dessert", Description = "Cheesecake", OnePrice = 51, Count = 1, Url = "http://www.kraftrecipes.com/-/media/assets/2016-summer/berry-bliss-cake-106367-642x428.jpg",
                    Composition = "Cheesecake (Vatrushka) is in the form of a dough ring and filled with quark or cottage cheese"
                },
                new Position {
                    Name        = "Dessert", Description = "Miguelitos", OnePrice = 71, Count = 1, Url = "http://www.kraftrecipes.com/-/media/assets/2016-summer/berry-bliss-cake-106367-642x428.jpg",
                    Composition = "Cheesecake (Vatrushka) is in the form of a dough ring and filled with quark or cottage cheese"
                },
                new Position {
                    Name        = "Dessert", Description = "Natillas", OnePrice = 141, Count = 1, Url = "http://www.kraftrecipes.com/-/media/assets/2016-summer/berry-bliss-cake-106367-642x428.jpg",
                    Composition = "Cheesecake (Vatrushka) is in the form of a dough ring and filled with quark or cottage cheese"
                },
                new Position {
                    Name        = "Dessert", Description = "Tiramisu", OnePrice = 213, Count = 1, Url = "http://www.kraftrecipes.com/-/media/assets/2016-summer/berry-bliss-cake-106367-642x428.jpg",
                    Composition = "Cheesecake (Vatrushka) is in the form of a dough ring and filled with quark or cottage cheese"
                },
            };

            var viewModel = new PositionListPageViewModel(_userBase, _pageService, _positions);

            // If 'add to order' pressed -> invoke posAdded
            viewModel.PosAdded += (source, newPosition) =>
            {
                PosAdded?.Invoke(this, newPosition);
            };

            await _pageService.PushAsync(new PositionListPage(viewModel));
        }