HandsOff/MatchMakerPage.xaml.cs
/// <summary>
/// When the match click button is pressed check if teams chosen and execute MakeMatch.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
When the match click button is pressed check if teams chosen and execute MakeMatch.
When the match click button is pressed check if teams chosen and execute MakeMatch .
private async void Make_Match_Click(object sender, RoutedEventArgs e)
        {
            if (SelectedTeam1 == null || SelectedTeam2 == null)
            {
                MessageDialog showDialog = new MessageDialog("Kies 2 teams");
                showDialog.Commands.Add(new UICommand("Ok")
                {
                    Id = 0
                });
                showDialog.DefaultCommandIndex = 0;
                IUICommand result = await showDialog.ShowAsync();
                if ((int)result.Id == 0)
                {
                    return;
                }
            }
            MakeMatch();
        }
private async void Make_Match_Click ( object sender , RoutedEventArgs e ) { if ( SelectedTeam1 == null || SelectedTeam2 == null ) { MessageDialog showDialog = new MessageDialog ( " " ) ; showDialog . Commands . Add ( new UICommand ( " " ) { Id = 0 } ) ; showDialog . DefaultCommandIndex = 0 ; IUICommand result = await showDialog . ShowAsync ( ) ; if ( ( int ) result . Id == 0 ) { return ; } } MakeMatch ( ) ; }
When the match click button is pressed check if teams chosen and execute MakeMatch.
When the match click button is pressed check if teams chosen and execute MakeMatch .
//Show dialog if only one or no teams are selected.
sender
object
None
e
RoutedEventArgs
None