Esempio n. 1
0
        private void NextButton_Click(object sender, EventArgs e)
        {
            AbilityGeneratorForm abil = new AbilityGeneratorForm();

            abil.Show();
            this.Hide();
        }
        /// <summary>
        /// When we click on next button AbilityGeneratorform is instanstiated
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void NextButton_Click(object sender, EventArgs e)
        {
            // Create an insatnce of AbilityGeneratorForm
            AbilityGeneratorForm agf = new AbilityGeneratorForm();

            // Hide GenerateName Form
            this.Hide();
            // Show AbilityGeneratorForm
            agf.Show();
        }
        private void NextButton_Click(object sender, EventArgs e)
        {
            //Instantiate a new AbilityGeneratorForm object
            AbilityGeneratorForm abilityGeneratorForm = new AbilityGeneratorForm();

            //Call the show method of AbilityGeneratorForm object
            abilityGeneratorForm.Show();

            //Call the Hide method of the GenerateNameForm
            this.Hide();
        }
        /// <summary>
        /// This event handler will be trigger by pressing next button which will open Ability form
        /// and assign the random  selected names to the appropriate class  fields
        /// which will allow the app to transfer data between forms
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void NextButton_Click(object sender, EventArgs e)
        {
            AbilityGeneratorForm abilityGeneratorForm = new AbilityGeneratorForm();

            abilityGeneratorForm.Show();
            this.Hide();

            //These 2 extra steps to set values of firstname and lastname prop. when next button clicked
            Program.character.FirstName = textBox1.Text;
            Program.character.LastName  = LastNameTextBox.Text;
        }
Esempio n. 5
0
        private void NextButton_Click(object sender, EventArgs e)
        {
            Character character = Program.character;

            character.FirstName = FirstNameTextBox.Text;
            character.LastName  = LastNameTextBox.Text;

            AbilityGeneratorForm abilityGeneratorForm = new AbilityGeneratorForm();

            this.Hide();
            abilityGeneratorForm.Show();
        }
        private void NextButton_Click(object sender, EventArgs e)
        {
            Program.character.FirstName = firstNameTextBox.Text;
            Program.character.LastName  = LastNameTextBox.Text;

            // instantiated abilitygeneratorform object
            AbilityGeneratorForm abilityGeneratorForm = new AbilityGeneratorForm();

            //this will abilitygenerator form
            abilityGeneratorForm.Show();

            //this will generate name form
            Program.generatenameform.Hide();
        }
Esempio n. 7
0
        private void NextButton_Click(object sender, EventArgs e)
        {
            //the following sets the value of the properties to the value that was generated for the textfields
            Program.character.FirstName = firstNameTextBox.Text;
            Program.character.LastName  = LastNameTextBox.Text;

            // instantiated abilitygeneratorform object
            AbilityGeneratorForm abilityGeneratorForm = new AbilityGeneratorForm();

            //showing abilitygenerator form
            abilityGeneratorForm.Show();

            //hiding generate name form
            Program.generatenameform.Hide();
        }