Example #1
0
 /// <summary>
 /// Adds a single game to the catalogue.
 /// </summary>
 /// <param name="game"></param>
 public void Add(Game game)
 {
     if (!Games.Contains(game)){
         Games.Add(game);
         //OnPropertyChanged("Games");   // Unnecessary => ObservableCollection implements the INotifyCollectionChanged interface!
     }
 }
Example #2
0
 /// <summary>
 /// Constructs a game viewmodel.
 /// </summary>
 /// <param name="model"></param>
 public GameViewModel(Game model)
 {
     Model = model;
 }