Beispiel #1
0
 private void SearchGraphic(object sender, EventArgs e)
 {
     if (Utils.ConvertStringToInt(textBoxGraphic.Text, out int graphic, 0, 0x3FFF))
     {
         bool res = LandTilesControl.SearchGraphic(graphic);
         if (!res)
         {
             DialogResult result = MessageBox.Show(
                 "No landtile found",
                 "Result",
                 MessageBoxButtons.OKCancel,
                 MessageBoxIcon.Error,
                 MessageBoxDefaultButton.Button1);
             if (result == DialogResult.Cancel)
             {
                 Close();
             }
         }
     }
 }
Beispiel #2
0
        private void SearchNextName(object sender, EventArgs e)
        {
            bool res = LandTilesControl.SearchName(textBoxItemName.Text, true);

            if (res)
            {
                return;
            }

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

            if (result == DialogResult.Cancel)
            {
                Close();
            }
        }
Beispiel #3
0
        private void SearchName(object sender, EventArgs e)
        {
            _lastSearchedName = textBoxItemName.Text;
            bool res = Options.DesignAlternative
                ? LandTilesAlternativeControl.SearchName(textBoxItemName.Text, false)
                : LandTilesControl.SearchName(textBoxItemName.Text, false);

            if (res)
            {
                return;
            }

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

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