private void NewSpellbook() { var editor = new SpellbookEditor(); var tabPage = new TabPage("New Spellbook "); var control = new SpellbookEditor { Dock = DockStyle.Fill }; tabPage.Controls.Add(control); tabControl1.TabPages.Add(tabPage); tabControl1.Visible = true; tsmiSaveSpellbook.Enabled = true; }
public SpellEditor(SpellbookEditor editor, string spellName) : this() { _spellbookEditor = editor; if (_spellbookEditor.Spells.ContainsKey(spellName)) { Spell = _spellbookEditor.Spells[spellName]; } else { Spell = new SpellDescription(); _spellbookEditor.Spells.Add(spellName, Spell); } bsSpell.DataSource = Spell; }
public ModuleFileWriter(SpellbookEditor editor) { _editor = editor; }