Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        private void ShowFlagForm(object sender, EventArgs e)
        {
            uint val = _combobox.Text.ToUInt32();
            FormCalculateFlags _form = new FormCalculateFlags(_type, val, String.Empty);

            _form.ShowDialog();
            _combobox.SetVal(_form.Flags);
            _form.Dispose();
        }
Esempio n. 3
0
        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);
        }