Beispiel #1
0
        private void BtnOK_Click(object sender, EventArgs e)
        {
            if (this.Controle())
            {
                if (this.Instancie())
                {
                    FrmNewCarac FrmSuite = new FrmNewCarac(perso);
                    this.Visible = false;


                    //Bout de code utile dans FrmNewsCarac_FormClosing ligne 25
                    if (FrmSuite.ShowDialog() == DialogResult.Cancel)
                    {
                        //this.Visible = true;
                        perso = Outils.Lecture <Outils.Perso>(Data.per1xml);

                        this.txtJoueur.Text      = perso.Joueur;
                        this.txtNom.Text         = perso.Nom;
                        this.txtPrenom.Text      = perso.Prnom;
                        this.CBClasseSocial.Text = perso.ClasseSocial;
                        this.CBOrigine.Text      = perso.Origine;
                        this.CBClasse.Text       = perso.Classe;
                        this.Visible             = true;
                    }
                }
            }
        }
Beispiel #2
0
 private void FrmNewCarac_Load(object sender, EventArgs e)
 {
     if (Data.marque_page == 1)
     {
         perso            = Outils.Lecture <Outils.Perso>(Data.per1xml);
         this.NUfor.Value = Convert.ToDecimal(perso.Force);
         this.NUagi.Value = Convert.ToDecimal(perso.Agi);
         this.NUdex.Value = Convert.ToDecimal(perso.Dex);
         this.NUcon.Value = Convert.ToDecimal(perso.Con);
         this.NUint.Value = Convert.ToDecimal(perso.Inte);
         this.NUper.Value = Convert.ToDecimal(perso.Per);
         this.NUpou.Value = Convert.ToDecimal(perso.Pou);
         this.NUvol.Value = Convert.ToDecimal(perso.Vol);
     }
     else
     {
         NUfor.Value = 5;
         NUagi.Value = 5;
         NUdex.Value = 5;
         NUcon.Value = 5;
         NUint.Value = 5;
         NUper.Value = 5;
         NUpou.Value = 5;
         NUvol.Value = 5;
     }
 }
Beispiel #3
0
        private void BtnBackup_Click(object sender, EventArgs e)
        {
            try
            {
                perso            = Outils.Lecture <Outils.Perso>(Data.per1xml);
                Data.marque_page = 1;

                this.txtJoueur.Text      = perso.Joueur;
                this.txtNom.Text         = perso.Nom;
                this.txtPrenom.Text      = perso.Prnom;
                this.CBClasseSocial.Text = perso.ClasseSocial;
                this.CBOrigine.Text      = perso.Origine;
                this.CBClasse.Text       = perso.Classe;
            }
            catch
            {
                this.CBClasseSocial.SelectedIndex = 2;
                this.CBOrigine.SelectedIndex      = 0;
                this.CBClasse.SelectedIndex       = 2;
            }
        }