HandsOff/TeamCreatorPage.xaml.cs
/// <summary>
/// Generates a new random team with random properties on button click.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
Generates a new random team with random properties on button click.
Generates a new random team with random properties on button click .
private async void CreateRandomTeam_Click(object sender, RoutedEventArgs e)
        {
            Team RandomTeam = CreateTeam();
            RandomTeam.TeamName = Generate_TeamName();
            App.Teams.Add(RandomTeam);
            MessageDialog showDialog = new MessageDialog("Random team has been generated with the name : " + RandomTeam.TeamName);
            showDialog.Commands.Add(new UICommand("Ok")
            {
                Id = 0
            });
            showDialog.DefaultCommandIndex = 0;
            IUICommand result = await showDialog.ShowAsync();
            if ((int)result.Id == 0)
            {
                return;
            }
        }
private async void CreateRandomTeam_Click ( object sender , RoutedEventArgs e ) { Team RandomTeam = CreateTeam ( ) ; RandomTeam . TeamName = Generate_TeamName ( ) ; App . Teams . Add ( RandomTeam ) ; MessageDialog showDialog = new MessageDialog ( " " + RandomTeam . TeamName ) ; showDialog . Commands . Add ( new UICommand ( " " ) { Id = 0 } ) ; showDialog . DefaultCommandIndex = 0 ; IUICommand result = await showDialog . ShowAsync ( ) ; if ( ( int ) result . Id == 0 ) { return ; } }
Generates a new random team with random properties on button click.
Generates a new random team with random properties on button click .
// Show message dialog when random team has been generated.
sender
object
None
e
RoutedEventArgs
None