void OnCollectionCleared(Collection collection, string user) { Dispatcher.BeginInvoke((Action)(() => { if (collection.Name != selectedcollection) { return; } items.RemoveWhere(i => i.User == user); })); }
void OnItemUnblocked(Collection collection, BlockedCollectionItem item) { Dispatcher.BeginInvoke((Action)(() => { if (item.Collection != selectedcollection) { return; } blockeditems.RemoveWhere(i => i.Item == item.Item); })); }
void OnOptionRemoved(PollOption option) { Dispatcher.BeginInvoke((Action)(() => { if (option.Poll != selectedpoll) { return; } options.RemoveWhere(i => i.Key == option.Key); })); }
void OnVoteRemoved(PollVote vote) { Dispatcher.BeginInvoke((Action)(() => { if (vote.Poll != selectedpoll) { return; } votes.RemoveWhere(i => i.User == vote.User && i.Vote == vote.Vote); })); }
void OnCollectionRemoved(Collection collection) { Dispatcher.BeginInvoke((Action)(() => { collections.RemoveWhere(c => c.Name == collection.Name); })); }
/// <summary> /// removes a game from the list /// </summary> /// <param name="game">game to be removed</param> public void RemoveGame(string game) { lock (gameslock) { games.RemoveWhere(g => g.Name == game); } }
void OnPollRemoved(Poll poll) { Dispatcher.BeginInvoke((Action)(() => { polls.RemoveWhere(c => c.Name == poll.Name); })); }