Пример #1
0
 /// <summary>
 ///		Convierte la librería en ViewModels
 /// </summary>
 private void ConvertToViewModel(LibraryModel library)
 {
     // Asigna el archivo
     Library = library;
     // Limpia la lista
     Games.Clear();
     // Carga los juegos
     foreach (GameModel game in library.Games)
     {
         Games.Add(new PgnGameInfoViewModel(this, game));
     }
     // Selecciona un elemento
     if (Games.Count > 0)
     {
         SelectedGame = Games[0];
     }
     else
     {
         SelectedGame = new PgnGameInfoViewModel(this, new GameModel());
     }
 }
 public PgnGameInfoTagListViewModel(PgnGameInfoViewModel game)
 {
     Game = game;
     LoadInfo(game.Game);
 }