private void ShowForm(object sender, EventArgs e) { switch (_bType) { case BType.SPELL: { FormSearchSpell _form = new FormSearchSpell(ComboboxValue); _form.ShowDialog(); if (_form.DialogResult == DialogResult.OK) { _combobox.SetValue(_form.Spell.ID); } _form.Dispose(); } break; case BType.FLAG: { FormCalculateFlags _form = new FormCalculateFlags(_type, ComboboxValue, String.Empty); _form.ShowDialog(); if (_form.DialogResult == DialogResult.OK) { _combobox.SetValue(_form.Flags); } _form.Dispose(); } break; case BType.TEXT: { MySQLConnenct.SelectAIText(); ParentForm._tPanel.SelectedIndex = 1; } break; case BType.SUMMON: { MySQLConnenct.SelectAIText(); ParentForm._tPanel.SelectedIndex = 2; } break; default: { FormDbSearch _form = new FormDbSearch(_bType, ComboboxValue); _form.ShowDialog(); if (_form.DialogResult == DialogResult.OK) { _combobox.SetValue(_form.Value); } _form.Dispose(); } break; } if (_comboboxAdditional != null) { _comboboxAdditional.SetValue(_additionalValue); } }
private void ShowSpellForm(object sender, EventArgs e) { FormSearchSpell _form = new FormSearchSpell(Who.Spell); _form.ShowDialog(); _combobox.SetVal(_form.Spell.ID); _form.Dispose(); }
private void ShowForm(object sender, EventArgs e) { switch (_bType) { case BType.SPELL: { FormSearchSpell _form = new FormSearchSpell(ComboboxValue); _form.ShowDialog(); if(_form.DialogResult == DialogResult.OK) _combobox.SetValue(_form.Spell.ID); _form.Dispose(); } break; case BType.FLAG: { FormCalculateFlags _form = new FormCalculateFlags(_type, ComboboxValue, String.Empty); _form.ShowDialog(); if (_form.DialogResult == DialogResult.OK) _combobox.SetValue(_form.Flags); _form.Dispose(); } break; case BType.TEXT: { MySQLConnenct.SelectAIText(); ParentForm._tPanel.SelectedIndex = 1; } break; case BType.SUMMON: { MySQLConnenct.SelectAIText(); ParentForm._tPanel.SelectedIndex = 2; } break; default: { FormDbSearch _form = new FormDbSearch(_bType, ComboboxValue); _form.ShowDialog(); if (_form.DialogResult == DialogResult.OK) _combobox.SetValue(_form.Value); _form.Dispose(); } break; } if (_comboboxAdditional != null) _comboboxAdditional.SetValue(_additionalValue); }