// get all the values that previously added
        private void FinalForm_Load(object sender, EventArgs e)
        {
            STR_textBox.Text    = AbilityForm.getSTR().ToString();
            DEX_textBox.Text    = AbilityForm.getDEX().ToString();
            END_textBox.Text    = AbilityForm.getEND().ToString();
            INT_textBox.Text    = AbilityForm.getINT().ToString();
            PER_textBox.Text    = AbilityForm.getPER().ToString();
            CHA_textBox.Text    = AbilityForm.getCHA().ToString();
            job_textBox.Text    = JobForm.getJob();
            race_textBox.Text   = RaceForm.getRace();
            health_textBox.Text = JobForm.getHealthPoints().ToString();

            if (race_textBox.Text.Equals("Human"))
            {
                race_pictureBox.Image = human;
            }
            else if (race_textBox.Text.Equals("Dwarf"))
            {
                race_pictureBox.Image = dwarf;
            }
            else if (race_textBox.Text.Equals("Elf"))
            {
                race_pictureBox.Image = elf;
            }
            else
            {
                race_pictureBox.Image = halfling;
            }
        }
Ejemplo n.º 2
0
 // open the RaceForm form and hide this form when the next button is clicked
 private void next_button_Click(object sender, EventArgs e)
 {
     if (!STR_textBox.Text.Equals(""))
     {
         RaceForm rf = new RaceForm();
         rf.Show();
         Hide();
     }
     else
     {
         MessageBox.Show("Please press the roll button first", "Error");
     }
 }