Modification Zarghatt
This commit is contained in:
@@ -49,6 +49,7 @@ namespace LaDOSE.DesktopApp.ViewModels
|
||||
{
|
||||
_currentGame = value;
|
||||
NotifyOfPropertyChange(()=>CurrentGame);
|
||||
NotifyOfPropertyChange(() => CanDeleteGame);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,8 +61,16 @@ namespace LaDOSE.DesktopApp.ViewModels
|
||||
public void AddGame()
|
||||
{
|
||||
var item = new GameDTO();
|
||||
this.Games.Add(item);
|
||||
this.CurrentGame = item;
|
||||
this.RestService.UpdateGame(item);
|
||||
LoadGames();
|
||||
}
|
||||
public void DeleteGame()
|
||||
{
|
||||
|
||||
this.RestService.DeleteGame(this.CurrentGame.Id);
|
||||
LoadGames();
|
||||
}
|
||||
|
||||
public bool CanDeleteGame => CurrentGame != null;
|
||||
}
|
||||
}
|
||||
@@ -197,8 +197,8 @@ namespace LaDOSE.DesktopApp.ViewModels
|
||||
var findUser = FindUser(SelectedWpEvent.Id, SelectedGame);
|
||||
var findUser2 = FindUser(SelectedWpEvent.Id, SelectedGame,true);
|
||||
|
||||
findUser.ForEach((e) => this.Players.AddUI(e,()=>NotifyOfPropertyChange(() => this.CanGenerate)));
|
||||
findUser2.ForEach((e) => this.PlayersOptions.AddUI(e,null));
|
||||
findUser.OrderBy(e=>e.Name).ToList().ForEach((e) => this.Players.AddUI(e,()=>NotifyOfPropertyChange(() => this.CanGenerate)));
|
||||
findUser2.OrderBy(e => e.Name).ToList().ForEach((e) => this.PlayersOptions.AddUI(e,null));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user