public FoodOrder(FoodOrder order)
        {
            List <FoodInfo> foodResource = new List <FoodInfo>();

            foreach (FoodInfo fi in order.foodResource)
            {
                FoodInfo food = new FoodInfo(fi);
                foodResource.Add(food);
            }
            _name = order.Name;
            SetOrderFood(order.id, order.timeOrder, order.priceOrder, order.priceMissingOrder, order.imageFoodOrder, foodResource);
        }
        public FoodOrder CreateOrder()
        {
            List <FoodInfo> foodResource = new List <FoodInfo>();
            string          idOrder      = _name;
            FoodInfo        fi           = new FoodInfo();
            List <string>   symbol       = new List <string>();

            symbol.Add(Symbols.GetRandomSymbol());
            fi.SetFoodInfo("ca_hoi", idOrder, _imageResourceFood[0], 1, symbol);
            FoodInfo      fi2     = new FoodInfo();
            List <string> symbol2 = new List <string>();

            symbol2.Add(Symbols.GetRandomSymbol());
            fi2.SetFoodInfo("com", idOrder, _imageResourceFood[1], 2, symbol2);
            foodResource.Add(fi);
            foodResource.Add(fi2);

            FoodOrder fo = new FoodOrder();

            fo.Name = _name;
            fo.SetOrderFood(idOrder, _timeOrder, 5.0f, 3.0f, _imageFoodOrder, foodResource);

            return(fo);
        }
Exemple #3
0
 public FoodInfo(FoodInfo food)
 {
     SetFoodInfo(food.id, food.idFoodOrder, food.image, food.Amount, food.SymbolKey);
 }