protected override void OnNavigatedTo(NavigationEventArgs e) { ViewModel = e.Parameter as EndGameViewModel; //DataContext = ViewModel; AppShell.Instance.ContentFrame.BackStack.Clear(); SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed; }
public EndGameView() { this.viewModel = new EndGameViewModel(); this.DataContext = viewModel; this.InitializeComponent(); }
public EndGameViewModel WhoWon() { var victory = new EndGameViewModel(); if (CheckForWinner()) { victory.Winner = Winner; } return(victory); }
public async Task <IHttpActionResult> EndGame(EndGameViewModel endGameViewModel) { try { if (endGameViewModel == null || endGameViewModel.Result == null) { return(BadRequest(GameMessageHelper.ReceivedDataError)); } await _gameService.EndGame(endGameViewModel); return(Ok(GameMessageHelper.Success)); } catch (Exception ex) { string message = $"{ex.Source}|{ex.TargetSite}|{ex.StackTrace}|{ex.Message}"; _logger.Error(message); return(BadRequest(GameMessageHelper.GameError)); } }
public async Task EndGame(EndGameViewModel GameLogicEndGameView) { await _gameRepository.UpdateResult(GameLogicEndGameView.GameId, GameLogicEndGameView.Result); await _gamePlayerRepository.DeleteAllByGameId(GameLogicEndGameView.GameId); }
public Scenario3() { this.InitializeComponent(); ViewModel = new EndGameViewModel(); }
public EndGameView() { DataContext = new EndGameViewModel(); InitializeComponent(); }
public Scenario4() { this.InitializeComponent(); ViewModel = new EndGameViewModel(); SizeChanged += Scenario4_SizeChanged; }