private void UpdateItems() { foreach (object obj in ItemsContainer.Items) { ShopWindowItem shopWindowItem = obj as ShopWindowItem; shopWindowItem.HideIfOwned(GameManager.Instance.PC.items); } }
public ShopWindow(Shop shop) : this() { using (Dispatcher.DisableProcessing()) { IEnumerable <Item> items = shop.Items.getItems(); foreach (Item item in items) { ShopWindowItem shopWindowItem = new ShopWindowItem(this, item); ItemsContainer.Items.Add(shopWindowItem); } Update(); } }