protected override void UpdateContent() { AllItems.Clear(); IList <Item> all_items = FindAllItems(mSearchField, mSearchValue); foreach (Item item in all_items) { AllItems.Add(item); } SoldItems.Clear(); IList <Item> sold_items = FindSoldItems(mSearchField, mSearchValue); foreach (Item item in sold_items) { SoldItems.Add(item); } BoughtItems.Clear(); IList <Item> bought_items = FindBoughtItems(mSearchField, mSearchValue); foreach (Item item in bought_items) { BoughtItems.Add(item); } InventoriedItems.Clear(); IList <Item> inventoried_items = FindInventoriedItems(mSearchField, mSearchValue); foreach (Item item in inventoried_items) { InventoriedItems.Add(item); } }
public void SetSoldItems(List <SoldItem> items) { SoldItems.Clear(); SoldItems.AddRange(items); foreach (SoldEntity se in SoldEntities) { if (se.Status == SoldEntity.SellStatus.Confirmed) { continue; } if (SoldItems.Any(si => si.ID == se.Item.ID && si.ItemPrefab == se.Item.Prefab && (GameMain.Client == null || GameMain.Client.ID == si.SellerID))) { se.Status = SoldEntity.SellStatus.Confirmed; } else { se.Status = SoldEntity.SellStatus.Unconfirmed; } } OnSoldItemsChanged?.Invoke(); }
public void ClearSoldItemsProjSpecific() { SoldItems.Clear(); }