Пример #1
0
        private void SearchNextName(object sender, EventArgs e)
        {
            bool res = Options.DesignAlternative
                ? ItemShowAlternativeControl.SearchName(textBoxItemName.Text, true)
                : ItemShowControl.SearchName(textBoxItemName.Text, true);

            if (res)
            {
                return;
            }

            DialogResult result = MessageBox.Show("No item found", "Result",
                                                  MessageBoxButtons.OKCancel, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);

            if (result == DialogResult.Cancel)
            {
                Close();
            }
        }
Пример #2
0
        private void Search_Graphic(object sender, EventArgs e)
        {
            if (!Utils.ConvertStringToInt(textBoxGraphic.Text, out int graphic, 0, Ultima.Art.GetMaxItemID()))
            {
                return;
            }

            bool res = Options.DesignAlternative
                ? ItemShowAlternativeControl.SearchGraphic(graphic)
                : ItemShowControl.SearchGraphic(graphic);

            if (res)
            {
                return;
            }

            DialogResult result = MessageBox.Show("No item found", "Result",
                                                  MessageBoxButtons.OKCancel, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);

            if (result == DialogResult.Cancel)
            {
                Close();
            }
        }