Beispiel #1
0
 /// <summary>
 /// Listen for new <see cref="GameRequest"/>s
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void GameRequests_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == NotifyCollectionChangedAction.Add)
     {
         // Added the NEW items that were inserted.
         foreach (GameRequest g in e.NewItems)
         {
             ListOfGameRequests.Add(g);
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// Remove a <see cref="GameRequest"/> which has been properly handled from collection
 /// </summary>
 /// <param name="gameRequestCompleted"></param>
 void CompleteGameRequest(GameRequest gameRequestCompleted)
 {
     SocketHandler.ListOfGameRequests.Remove(gameRequestCompleted);
     ListOfGameRequests.Remove(gameRequestCompleted);
 }