public void AddItem(Item newItem) { lock (listLock) { this.items.Add(newItem); SetItemsToView(this.view, this.items); ItemListChanged?.Invoke(this.items, new EventArgs()); } }
public void RemoveItem(Item target) { lock (listLock) { this.items.Remove(target); SetItemsToView(this.view, this.items); ItemListChanged?.Invoke(this.items, new EventArgs()); } }