Can edit and delete spells.
Signed-off-by: Melissa Avery-Weir <melissa.avery@wellsfargo.com>
This commit is contained in:
@@ -24,6 +24,7 @@ namespace d20_SRD_Spell_Lists {
|
||||
|
||||
if (_spell != null) {
|
||||
spell = _spell;
|
||||
loadSpell();
|
||||
} else {
|
||||
spell = new Spell();
|
||||
}
|
||||
@@ -32,6 +33,13 @@ namespace d20_SRD_Spell_Lists {
|
||||
txtName.LostFocus += new EventHandler(txtName_LostFocus);
|
||||
}
|
||||
|
||||
private void loadSpell() {
|
||||
txtName.Text = spell.Name;
|
||||
txtLevel.Value = spell.Level;
|
||||
txtComponents.Text = spell.Components;
|
||||
txtDescription.Text = spell.ShortDescription;
|
||||
}
|
||||
|
||||
void txtName_LostFocus(object sender, EventArgs e) {
|
||||
if (txtName.Text != "") {
|
||||
baseSpellComboBox.SelectedValue = "--";
|
||||
|
||||
Reference in New Issue
Block a user