private async void Button_Click_1(object sender, RoutedEventArgs e) { if (teamId == -1) { return; } await WeBallAPI.leaveMatch(match.teams[teamId]._id); if (WeBallAPI.Success == false) { return; } MessageBoxResult result = MessageBox.Show("Match quitté!", "Confirmation", MessageBoxButton.OK); NavigationService.Navigate(new Uri("/FiveProfilePage.xaml?five=" + JsonConvert.SerializeObject(five), UriKind.Relative)); }