private void miFindClass_Click(object sender, EventArgs e) { using (var dlg = new SearchDialog()) { dlg.SearchText = lastSearchString; if (dlg.ShowDialog(this) == DialogResult.OK) { lastSearchString = dlg.SearchText; if (!string.IsNullOrEmpty(lastSearchString)) { miFindNext_Click(sender, e); } } } }
private void miFindClass_Click(object sender, EventArgs e) { using (var dlg = new SearchDialog()) { dlg.SearchText = lastSearchString; if (dlg.ShowDialog(this) == DialogResult.OK) { lastSearchString = dlg.SearchText; if(!string.IsNullOrEmpty(lastSearchString)) miFindNext_Click(sender, e); } } }