Beispiel #1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            FormEnterId form = new FormEnterId();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                _changingItemCache = true;
                try
                {
                    WebRequestWrapper.ResetFatalErrorIndicator();
                    int itemId = form.Value;
                    if (itemId > 0)
                    {
                        AddItemById(form.Value, form.UseArmory, form.UseWowhead);
                    }
                    else
                    {
                        AddItemByName(form.ItemName, form.UseArmory, form.UseWowhead);
                    }
                }
                finally
                {
                    _changingItemCache = false;
                }
            }
            form.Dispose();
        }
Beispiel #2
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            FormEnterId form = new FormEnterId();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                _changingItemCache = true;
                try
                {
                    WebRequestWrapper.ResetFatalErrorIndicator();
                    AddItemById(form.Value);
                }
                finally
                {
                    _changingItemCache = false;
                }
            }
            form.Dispose();
        }