public void ShowContext(RomMatchViewModel romMatchModel)
 {
     if (romMatchModel.ContextCommand != null)
         romMatchModel.ContextCommand.Execute();
 }
 void rebuildItemsList(IEnumerable<RomMatch> newItems)
 {
     lock (syncRoot)
     {
         itemsDictionary.Clear();
         items.Clear();
         foreach (RomMatch romMatch in newItems)
         {
             RomMatchViewModel model = new RomMatchViewModel(romMatch);
             itemsDictionary[romMatch.ID] = model;
             items.Add(model);
         }
     }
     items.FireChange();
 }
 public void SelectItem(RomMatchViewModel romMatchModel)
 {
     if (romMatchModel.Command != null)
         romMatchModel.Command.Execute();
 }
 void updateItem(RomMatch romMatch, RomMatchStatus newStatus)
 {
     lock (syncRoot)
     {
         RomMatchViewModel model;
         if (itemsDictionary.TryGetValue(romMatch.ID, out model))
         {
             if (newStatus == RomMatchStatus.Ignored || newStatus == RomMatchStatus.Removed)
             {
                 itemsDictionary.Remove(romMatch.ID);
                 items.Remove(model);
             }
             else
             {
                 model.Update();
                 return;
             }
         }
         else
         {
             model = new RomMatchViewModel(romMatch);
             itemsDictionary[romMatch.ID] = model;
             items.Add(model);
         }
     }
     items.FireChange();
 }