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(); } } } }
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(); } }
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(); } }