コード例 #1
0
        private void addItemToOrder(food_type item)
        {
            if (order == null)
            {
                order = new Order();
            }

            order.AddItem(new OrderItem(item));
        }
コード例 #2
0
        public OrderItem(food_type item)
        {
            item_type = item;

            switch (item)
            {
            case food_type.BigTasty:
                itemName = "Биг тейсти";
                break;

            case food_type.CocaCola:
                itemName = "Кока-кола";
                break;

            case food_type.Free:
                itemName = "Картошка 'фри'";
                break;

            case food_type.IceCream:
                itemName = "Мороженое";
                break;
            }
        }