Modification get smash
All checks were successful
Build App / Build (push) Successful in 1m53s

This commit is contained in:
2024-03-22 23:58:43 +01:00
parent 88fb4935b5
commit 454c12a5a9
19 changed files with 176 additions and 63 deletions

View File

@@ -18,6 +18,7 @@ namespace LaDOSE.DesktopApp.Avalonia.ViewModels
private GameDTO _currentGame;
private List<GameDTO> _games;
private List<GameDTO> _Searchgames;
private RestService RestService { get; set; }
public GamesViewModel(IScreen screen): base(screen,"Games")
{
@@ -26,6 +27,7 @@ namespace LaDOSE.DesktopApp.Avalonia.ViewModels
OnInitialize();
}
void OnInitialize()
{
LoadGames();
@@ -49,6 +51,15 @@ namespace LaDOSE.DesktopApp.Avalonia.ViewModels
}
}
public List<GameDTO> SearchGame
{
get => _Searchgames;
set
{
_Searchgames = value;
RaisePropertyChanged(nameof(this.SearchGame));
}
}
public GameDTO CurrentGame
{
get => _currentGame;
@@ -79,6 +90,10 @@ namespace LaDOSE.DesktopApp.Avalonia.ViewModels
LoadGames();
}
public void GetGame()
{
SearchGame = this.RestService.GetSmashGames(this.CurrentGame.LongName);
}
public bool CanDeleteGame => CurrentGame != null;