private void SearchGraphic(object sender, EventArgs e) { if (Utils.ConvertStringToInt(textBoxGraphic.Text, out int graphic, 0, 0x3FFF)) { bool res = Options.DesignAlternative ? LandTilesAlternativeControl.SearchGraphic(graphic) : LandTilesControl.SearchGraphic(graphic); if (!res) { DialogResult result = MessageBox.Show( "No landtile found", "Result", MessageBoxButtons.OKCancel, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); if (result == DialogResult.Cancel) { Close(); } } } }
private void SearchNextName(object sender, EventArgs e) { bool res = Options.DesignAlternative ? LandTilesAlternativeControl.SearchName(textBoxItemName.Text, true) : 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(); } }