public SpellForm(XmlNode node) { InitializeComponent(); #region RangeBox.BeginUpdate(); RangeBox.Items.Clear(); foreach (string name in Enum.GetNames(typeof(SpellRange))) { RangeBox.Items.Add(name); } RangeBox.EndUpdate(); #endregion Spell spell = new Spell(); spell.Load(node); RangeBox.SelectedItem = spell.Range.ToString(); DescriptionBox.Text = spell.Description; DurationBox.Value = (int)spell.Duration.TotalSeconds; CastingTimeBox.Value = (int)spell.CastingTime.TotalSeconds; LevelBox.Value = (int)spell.Level; ScriptBox.SetValues <ISpell>(spell.Script); ClassBox.SelectedItem = spell.Class.ToString(); Spell = spell; }