Пример #1
0
        private void OnFavPizzaChanged(PizzaCell pizzaCell)
        {
            bool isInFavList = pizzasFav.Contains(pizzaCell.pizza.nom);

            if (isInFavList && !pizzaCell.isFavorite)
            {
                pizzasFav.Remove(pizzaCell.pizza.nom);
            }
            else if (!isInFavList && pizzaCell.isFavorite)
            {
                pizzasFav.Add(pizzaCell.pizza.nom);
            }
            SaveFavList();
        }
Пример #2
0
        private void OnFavPizzaChanged(PizzaCell pizzaCell)
        {
            bool isInFavList = pizzasFav.Contains(pizzaCell.pizza.nom);

            if (pizzaCell.IsFavorite && !isInFavList)
            {
                pizzasFav.Add(pizzaCell.pizza.nom);
                SaveFavList();
            }
            else if (!pizzaCell.IsFavorite && isInFavList)
            {
                pizzasFav.Remove(pizzaCell.pizza.nom);
                SaveFavList();
            }
        }
Пример #3
0
        private void OnFavPizzaChanged(PizzaCell pizzaCell)
        {
            bool isinFavList = PizzasFav.Contains(pizzaCell.pizza.Nom);

            if (pizzaCell.isFavorite && !isinFavList)
            {
                PizzasFav.Add(pizzaCell.pizza.Nom);
            }
            else if (!pizzaCell.isFavorite && isinFavList)
            {
                PizzasFav.Remove(pizzaCell.pizza.Nom);
            }

            SaveFavList();
            RefreshList();
        }