Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            SkillDesigner skillMaker = new SkillDesigner();

            skillMaker.ParentWindow = this;
            List <int> abilityMods = new List <int>();

            try
            {
                abilityMods.Add(Program.getAbilityMod(Int32.Parse(strBox.Text)));
                abilityMods.Add(Program.getAbilityMod(Int32.Parse(dexBox.Text)));
                abilityMods.Add(Program.getAbilityMod(Int32.Parse(conBox.Text)));
                abilityMods.Add(Program.getAbilityMod(Int32.Parse(intBox.Text)));
                abilityMods.Add(Program.getAbilityMod(Int32.Parse(wisBox.Text)));
                abilityMods.Add(Program.getAbilityMod(Int32.Parse(chaBox.Text)));
            }
            catch
            {
                Console.WriteLine("Missing ability scores to add to skills");
            }


            skillMaker.SetAbilityMods(abilityMods);
            if (skillList.Count > 0)
            {
                skillMaker.PopulateSkillLines(skillList);
            }
            else
            {
                skillMaker.PopulateSkillLines(parent.session.settings.defaultSkillLoadout);
            }
            skillMaker.Show();
        }
Пример #2
0
 public SkillLine(SkillDesigner sender)
 {
     ParentWindow = sender;
     InitializeComponent();
     abilitySourceBox.SelectedIndex = 0;
 }