Exemple #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();
        }
        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();
            }
        }
Exemple #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();
        }