public ChecksSaves(dnd.Hero hero)
        {
            this.hero = hero;
            InitializeComponent();
            List <Check> checks = new List <Check>();

            checks.Add(new Check("initiative", hero.dexterity));
            checks.Add(new Check("perception", hero.wisdom));
            checks.Add(new Check("acrobatics", hero.dexterity));
            checks.Add(new Check("animal Handling", hero.wisdom));
            checks.Add(new Check("arcana", hero.intelligence));
            checks.Add(new Check("athletics", hero.strength));
            checks.Add(new Check("decpetion", hero.charisma));
            checks.Add(new Check("history", hero.intelligence));
            checks.Add(new Check("insight", hero.wisdom));
            checks.Add(new Check("intimidation", hero.charisma));
            checks.Add(new Check("investigation", hero.intelligence));
            checks.Add(new Check("medicine", hero.wisdom));
            checks.Add(new Check("performance", hero.charisma));
            checks.Add(new Check("persuation", hero.charisma));
            checks.Add(new Check("religion", hero.intelligence));
            checks.Add(new Check("slightOfHand", hero.dexterity));
            checks.Add(new Check("stealth", hero.dexterity));
            checks.Add(new Check("Constitution", hero.constitution));
            checks.Add(new Check("strength", hero.wisdom));
            checks.Add(new Check("Int", hero.wisdom));
            checks.Add(new Check("Wisdom", hero.wisdom));
            checks.Add(new Check("dexterity", hero.wisdom));
            checks.Add(new Check("charisma", hero.wisdom));

            foreach (Check c in checks)
            {
                this.flowPnl.Controls.Add(new dnd.Cards.CheckCard(c.text, c.dependency));
            }
        }
예제 #2
0
        private void tabPage_Leave(object sender, EventArgs e)
        {
            TabPage tp = (TabPage)sender;

            dnd.Hero hero = (dnd.Hero)tp.Tag;
            saveXml(hero);
            MessageBox.Show("saving");
        }
예제 #3
0
        private void saveXml(dnd.Hero hero)
        {
            List <dnd.Hero> MasterControlList = new List <dnd.Hero>();

            MasterControlList.Add(hero);
            string path = "";

            SerializeObject <List <dnd.Hero> >(MasterControlList, path);
        }
예제 #4
0
 public characterSheet(dnd.Hero hero)
 {
     InitializeComponent();
     this.hero = hero;
 }