public AttenteMenuViewModel(IEventAggregator eventAggregator, IInformationService serviceInfo, IConnexion connexion, IPlayersInGameService servicePlayer)
 {
     _eventAggregator         = eventAggregator;
     _connexion               = connexion;
     _servicePlayer           = servicePlayer;
     _serviceInfo             = serviceInfo;
     Players                  = new ListCollectionView(servicePlayer.GetPlayers(connexion, serviceInfo.GetCurrentGameMode().Id));
     _connexion.NewPlayer    += RefreshPlayers;
     _connexion.DeletePLayer += DeletePlayer;
     _connexion.StartGame    += Start;
 }
Ejemplo n.º 2
0
 private void StartPressed()
 {
     ButtonClic = false;
     _connexion.StartGen(_informationService.GetCurrentGameMode().Id);
     OnPropertyChanged(nameof(ButtonClic));
 }