void BtnEnchantClick(object sender, EventArgs e) { btnEnchant.Enabled = false; enchantForm = new EnchantForm(); enchantForm.Closed += delegate { btnEnchant.Enabled = true; enchantForm = null; }; if (tabControl.SelectedTab != null) { enchantForm.Update(((Page)tabControl.SelectedTab).selected); } enchantForm.Show(this); }
void BtnEnchantClick(object sender, EventArgs e) { btnEnchant.Enabled = false; enchantForm = new EnchantForm(); enchantForm.Closed += delegate { btnEnchant.Enabled = true; enchantForm = null; }; if (tabControl.SelectedTab != null) enchantForm.Update(((Page)tabControl.SelectedTab).selected); enchantForm.Show(this); }