示例#1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            Outils.Perso perso = new Outils.Perso
            {
                Id     = 1,
                Classe = "Paladin"
            };
            FrmNewMenu test = new FrmNewMenu(perso);

            test.Show();
        }
示例#2
0
 private void BtnOK_Click(object sender, EventArgs e)
 {
     try
     {
         perso.Hauteur   = Outils.CalculHauteur(perso.Force, perso.Con);
         perso.Sexe      = cbSexe.Text;
         perso.Age       = Convert.ToInt32(txtAge.Text);
         perso.Poids     = Convert.ToInt32(txtPoid.Text);
         perso.Taille    = Convert.ToInt32(txtTaille.Text);
         perso.Apparence = Convert.ToInt32(txtApparence.Text);
         Outils.Sauvegarde(perso, Data.per1xml);
         FrmNewMenu FrmSuite = new FrmNewMenu(perso);
         this.Visible = false;
         CreationPerso();
         FrmSuite.ShowDialog();
         this.Close();
     }
     catch
     {
     }
 }