Ejemplo n.º 1
0
 private void AddGame(DisplayGame displayGame)
 {
     if (displayGame.GameStatus == GameStatus.Created)
     {
         CreatedGames.Add(displayGame);
     }
     else if (displayGame.GameStatus == GameStatus.Started)
     {
         StartedGames.Add(displayGame);
     }
     else
     {
         FinishedGames.Add(displayGame);
     }
 }
Ejemplo n.º 2
0
        void OnCreateGameResponse(CreateGameResponse response)
        {
            if (_request != null && response.RequestId == _request.RequestId)
            {
                ResetRequest();

                if (response.IsSuccess)
                {
                    CreatedGames.Add(response.Game);
                    _ = _localStorage.SetItemAsync(CREATED_GAMES_KEY, CreatedGames);
                    _ = ShowGamePlayer(response.Game);
                }
                else
                {
                    IsCreateGameFailedDialogVisible = true;
                    CreateGameFailedDialogMessage   = response.ErrorMessage;
                    InvokeStateChanged(EventArgs.Empty);
                }
            }
        }