示例#1
0
        private void NewSpell_Click(object sender, EventArgs e)
        {
            Spell s = new Spell()
            {
                Level  = 1,
                Source = Program.Context.Config.DefaultSource
            };

            s.Keywords.Add(new Keyword("Verbal"));
            s.Keywords.Add(new Keyword("Somatic"));
            SpellForm r = new SpellForm(s);

            r.Saved += SpellSaved;
            r.Show();
        }
示例#2
0
        private void editSpell(object sender, EventArgs e)
        {
            if (spellBox.SelectedItem == null)
            {
                return;
            }
            Spell selected = Program.Context.GetSpell((string)spellBox.SelectedItem, null);

            if (selected != null)
            {
                string    sel = selected.Name;
                SpellForm r   = new SpellForm(selected.Clone());
                r.Saved += SpellSaved;
                r.Show();
            }
        }