Example #1
0
 private void SetDirty()
 {
     if (MenuCard != null)
     {
         MenuCard.SetDirty();
     }
 }
        public static ObservableCollection <MenuCard> GetSampleMenuCards()
        {
            Uri baseUri = new Uri("ms-appx:///");

            var      cards = new ObservableCollection <MenuCard>();
            MenuCard card1 = new MenuCard
            {
                Title = "Breakfast"
            };

            card1.MenuItems.Add(new MenuItem
            {
                Text     = "Spezialfrühstück",
                Price    = 5.4,
                MenuCard = card1
            });
            card1.MenuItems.Add(new MenuItem
            {
                Text     = "Wiener Frühstück",
                Price    = 4.4,
                MenuCard = card1
            });
            card1.MenuItems.Add(new MenuItem
            {
                Text     = "Schinken mit 3 Eiern",
                Price    = 4.4,
                MenuCard = card1
            });
            card1.ImagePath = string.Format("{0}{1}", baseUri, "Assets/Breakfast.jpg");
            cards.Add(card1);

            MenuCard card2 = new MenuCard
            {
                Title = "Salad"
            };

            card2.MenuItems.Add(new MenuItem
            {
                Text     = "Mariniertes Gemüse mit Schafkäsebällchen und Rohschinken",
                Price    = 8.60,
                MenuCard = card2
            });
            card2.MenuItems.Add(new MenuItem
            {
                Text     = "Gebratener Schafkäse im Speckhemd auf knackigem Salat",
                Price    = 7.80,
                MenuCard = card2
            });
            card2.MenuItems.Add(new MenuItem
            {
                Text     = "Backhendlsalat",
                Price    = 7.20,
                MenuCard = card2
            });
            card2.ImagePath = string.Format("{0}{1}", baseUri, "Assets/Salads.jpg");
            cards.Add(card2);

            MenuCard card3 = new MenuCard
            {
                Title = "Sweets"
            };

            card3.MenuItems.Add(new MenuItem
            {
                Text     = "Marillenknödel mit Zimtbrösel (Stück)",
                Price    = 2.30,
                MenuCard = card3
            });
            card3.MenuItems.Add(new MenuItem
            {
                Text     = "Apfelstrudel",
                Price    = 2.60,
                MenuCard = card3
            });
            card3.MenuItems.Add(new MenuItem
            {
                Text     = "Marmelade-Palatschinken (2 Stück)",
                Price    = 3.40,
                MenuCard = card3
            });
            card3.ImagePath = string.Format("{0}{1}", baseUri, "Assets/Sweets.png");
            cards.Add(card3);
            return(cards);
        }