protected virtual void ItemListViewModel_ItemAdded(object sender, ItemEventArgs e) { ItemViewModel ivm = new ItemViewModel(e.Item); AddToViewModelCollection(ivm); RaisePropertyChangedForAll(); }
void Items_ItemClicked(object sender, ItemEventArgs e) { if (PresentPersons.Selected != null) { PresentPersons.Selected.Buy(e.Item); if(Bierstrichler.Properties.Settings.Default.QuestionGameActive) QuestionMaster.Hit(); } }
protected virtual void ItemListViewModel_ItemRemoved(object sender, ItemEventArgs e) { foreach(ItemViewModel ivm in Items) if(ivm.Model == e.Item) { Items.Remove(ivm); break; } RaisePropertyChangedForAll(); }