Beispiel #1
0
        internal void ItemQuantityIncreased(BuyCell item)
        {
            if (allItems != null)
            {
                var obj = allItems.First(x => x.Name == item.Text);
                if (obj != null)
                {
                    obj.Quantity += 1;
                }
            }

            UpdateBuyItemsList();
        }
Beispiel #2
0
        internal void ItemBought(BuyCell item)
        {
            if (allItems != null)
            {
                var obj = allItems.First(x => x.Name == item.Text);
                if (obj != null)
                {
                    obj.Buy      = false;
                    obj.Quantity = 1;
                }
                App.Database.UpdateItem((Item)obj);
            }

            UpdateBuyItemsList();
            MessagingCenter.Send <BuyPage>(this, "UpdateAddItemsListFromBuyList");
        }