private void displaySpellInfo(Spell s) { Spell_Name.Text = "Spell Name : " + s.sName; Spell_Class_Level.Text = "Spell Level : " + s.getClass() + " " + s.getLevel(); Spell_Range.Text = "Spell Range : " + s.sRange; Spell_CastTime.Text = "Spell Cast Time : " + s.sCastTime; Spell_Duration.Text = "Spell Duration : " + s.sDuration; Spell_Components.Text = "Spell Components : " + s.sComponents; Spell_Effects.Text = "Spell Effects : " + s.sEffect; }
private Spell createSpell() { string spellclass; string spelllevel; if (combo_SpellClass.SelectedItem != null) { spellclass = (string)combo_SpellClass.SelectedItem; } else { spellclass = "None"; } if (combo_SpellLevel.SelectedItem != null) { spelllevel = (string)combo_SpellLevel.SelectedItem; } else { spelllevel = "Cantrip"; } Spell s = new Spell(txt_SpellName.Text, spellclass.ParseEnum<SpellClass>(), spelllevel.ParseEnum<SpellLevel>()); s.sEffect = txt_SpellEffects.Text; s.sComponents = txt_SpellComponents.Text; s.sRange = txt_SpellRange.Text; s.sDuration = txt_SpellDuration.Text; s.sCastTime = txt_SpellCastTime.Text; return s; }