Esempio n. 1
0
        private void CustomText_LostFocus(object sender, RoutedEventArgs e)
        {
            if (!supress)
            {
                customMonster.Name            = txtName.Text;
                customMonster.Size            = txtSize.Text;
                customMonster.Type            = txtType.Text;
                customMonster.Alignment       = txtAlignment.Text;
                customMonster.AC              = txtAC.Text;
                customMonster.HP              = txtHP.Text;
                customMonster.Speed           = txtSpeed.Text;
                customMonster.Save            = txtSave.Text;
                customMonster.Skill           = txtSkill.Text;
                customMonster.Resist          = txtResist.Text;
                customMonster.Vulnerable      = txtVulnerable.Text;
                customMonster.Immune          = txtImmune.Text;
                customMonster.ConditionImmune = txtConditionImmune.Text;
                customMonster.Senses          = txtSenses.Text;
                customMonster.Passive         = byte.Parse(txtPassive.Text);
                customMonster.Languages       = txtLanguages.Text;
                customMonster.CR              = txtCR.Text;
                customMonster.Spells          = txtSpells.Text;

                CustomFlowReader.CreateDocument(customMonster);
            }
        }
Esempio n. 2
0
        private void LoadCustomMonster(Monster monster)
        {
            supress = true;

            customMonster = monster.Copy();

            txtName.Text            = customMonster.Name;
            txtSize.Text            = customMonster.Size;
            txtType.Text            = customMonster.Type;
            txtAlignment.Text       = customMonster.Alignment;
            txtAC.Text              = customMonster.AC;
            txtHP.Text              = customMonster.HP;
            txtSpeed.Text           = customMonster.Speed;
            txtSave.Text            = customMonster.Save;
            txtSkill.Text           = customMonster.Skill;
            txtResist.Text          = customMonster.Resist;
            txtVulnerable.Text      = customMonster.Vulnerable;
            txtImmune.Text          = customMonster.Immune;
            txtConditionImmune.Text = customMonster.ConditionImmune;
            txtSenses.Text          = customMonster.Senses;
            txtPassive.Text         = customMonster.Passive.ToString();
            txtLanguages.Text       = customMonster.Languages;
            txtCR.Text              = customMonster.CR;
            txtSpells.Text          = customMonster.Spells;

            //TraitsGrid.ItemsSource = customMonster.Trait;
            //ActionsGrid.ItemsSource = customMonster.Action;
            //LegendaryGrid.ItemsSource = customMonster.Legendary;

            CustomFlowReader.CreateDocument(customMonster);

            supress = false;
        }