private void PropItemViewModel_Click(object sender, EventArgs e) { var propViewModel = (IPropItemViewModel)sender; var actorViewModel = _playerState.ActiveActor; var inventory = actorViewModel.Actor.Person.Inventory; switch (propViewModel.Prop) { case Resource resource: inventory.Remove(new Resource(resource.Scheme, 1)); break; case Equipment _: case Concept _: inventory.Remove(propViewModel.Prop); break; default: throw new InvalidOperationException(); } var goods = _trader.Offer(); inventory.Add(goods); UpdateProps(); }