示例#1
0
        private void ReplaceInCells(bool selectedOnly)
        {
            var searcher = new DataGridViewSearcher(CurrentGridView);
            bool notReplaced = searcher.Replace(
                _findToolStripTextBox.Text,
                _replaceToolStripTextBox.Text,
                selectedOnly) == DataGridViewSearcher.Result.NotMatched;

            if (notReplaced)
                MessageBox.Show("\"" + _findToolStripTextBox.Text + "\" was not found.", "No Replacements Performed");
        }
示例#2
0
        private void FindButton_Click(object sender, EventArgs e)
        {
            _logger.Debug("Find " + _findToolStripTextBox.Text);

            var searcher = new DataGridViewSearcher(CurrentGridView);

            bool notFound = searcher.Search(_findToolStripTextBox.Text) == DataGridViewSearcher.Result.NotMatched;

            if (notFound)
                MessageBox.Show("\"" + _findToolStripTextBox.Text + "\" was not found.", "Not Found");
        }