private async void button2_Click(object sender, EventArgs e) { dispose = false; await gameSessionService.SurrenderGameSessionUser(gameSession.Id, UserProfile.Login); HubService.Surrender(UserProfile.Login, UserProfile.RivalName); Menu mainMenu = new Menu(); mainMenu.Show(); this.Close(); }
public void SurrenderGameSessionUser([FromBody] bool surrendered, int gameSessionId, string userName) { try { gameSessionService.SurrenderGameSessionUser(gameSessionId, userName, surrendered); } catch (Exception ex) { throw; } }