示例#1
0
 public void InitPizza()
 {
     Pizza = new Pizza()
     {
         Name = PizzaNames.First(), Quantity = 1, Spicyness = Spicyness.Bland
     };
 }
        internal ObservableCollection <PizzaInfo> GetPizzaInfo()
        {
            var categoryInfo = new ObservableCollection <PizzaInfo>();

            for (int i = 0; i < PizzaNames.Count(); i++)
            {
                var info = new PizzaInfo()
                {
                    PizzaName = PizzaNames[i]
                };
#if COMMONSB
                if (i == 9)
                {
                    info.PizzaImage = ImageSource.FromResource("SampleBrowser.Icons.Pizza3.jpg", assembly);
                }
                else
                {
                    info.PizzaImage = ImageSource.FromResource("SampleBrowser.Icons.Pizza" + i + ".jpg", assembly);
                }
#else
                if (i == 9)
                {
                    info.PizzaImage = ImageSource.FromResource("SampleBrowser.SfListView.Icons.Pizza3.jpg", assembly);
                }
                else
                {
                    info.PizzaImage = ImageSource.FromResource("SampleBrowser.SfListView.Icons.Pizza" + i + ".jpg", assembly);
                }
#endif
                categoryInfo.Add(info);
            }
            return(categoryInfo);
        }
示例#3
0
 public Pizza(PizzaNames name, DoughTypes dough, SauceTypes sauce, ToppingTypes[] toppings)
 {
     Name     = name;
     Dough    = dough;
     Sauce    = sauce;
     Toppings = toppings;
 }
        internal ObservableCollection <PizzaInfo> GetPizzaInfo()
        {
            var categoryInfo = new ObservableCollection <PizzaInfo>();

            for (int i = 0; i < PizzaNames.Count(); i++)
            {
                var info = new PizzaInfo()
                {
                    PizzaName = PizzaNames[i]
                };

                if (i == 9)
                {
                    info.PizzaImage = ImageSource.FromResource("SampleBrowser.Icons.ListView.Pizza3.png");
                }
                else
                {
                    info.PizzaImage = ImageSource.FromResource("SampleBrowser.Icons.ListView.Pizza" + i + ".png");
                }
                categoryInfo.Add(info);
            }
            return(categoryInfo);
        }
示例#5
0
        internal ObservableCollection <PizzaInfo> GetPizzaInfo()
        {
            var categoryInfo = new ObservableCollection <PizzaInfo>();

            for (int i = 0; i < PizzaNames.Count(); i++)
            {
                var info = new PizzaInfo()
                {
                    PizzaName = PizzaNames[i]
                };

                if (i == 9)
                {
                    info.PizzaImage = "Pizza3.jpg";
                }
                else
                {
                    info.PizzaImage = "Pizza" + i + ".jpg";
                }

                categoryInfo.Add(info);
            }
            return(categoryInfo);
        }