Merge pull request 'B2025-011-Global-search-is-not-finding-question-marks' (#514) from B2025-011-Global-search-is-not-finding-question-marks into Development
good for testing phase
This commit is contained in:
commit
a33f136e77
@ -1699,6 +1699,8 @@ namespace Volian.Controls.Library
|
||||
else lbSrchResultsIncTrans.DisplayMember = _DisplayMember;
|
||||
if (_SearchResults != null)
|
||||
{
|
||||
// record count flag
|
||||
bool reccnt = true;
|
||||
// B2021-076: Proms search results are not presented in order when printed to PDF
|
||||
// B2023-041 - backed out previous change as it was not needed and was preventing the sorting of search results text
|
||||
if (cbSorted.Checked)
|
||||
@ -1713,11 +1715,37 @@ namespace Volian.Controls.Library
|
||||
// B2021-076: Proms search results are not presented in order when printed to PDF
|
||||
var sortedResults = _SearchResults.OrderBy(x => x.SearchDefaultSort).ToList();
|
||||
|
||||
// if searching for just a "?" remove all the special code matches and leaving only the true matches.
|
||||
if (SearchString == "\\?")
|
||||
{
|
||||
string pat = @"\?";
|
||||
Regex r = new Regex(pat, RegexOptions.IgnoreCase);
|
||||
for (int i = 0; i < sortedResults.Count; i++)
|
||||
{
|
||||
|
||||
Match m = r.Match(sortedResults[i].DisplayText);
|
||||
if (m.Success)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
sortedResults.Remove(sortedResults[i]);
|
||||
|
||||
i--;
|
||||
}
|
||||
}
|
||||
grpPanSearchResults.Text = string.Format("Search Results Found: {0}", sortedResults.Count);
|
||||
reccnt = false;
|
||||
}
|
||||
|
||||
if (tabSearchTypes.SelectedTab != tabSearchTypes.Tabs[4]) lbSrchResults.DataSource = sortedResults;
|
||||
else lbSrchResultsIncTrans.DataSource = sortedResults;
|
||||
}
|
||||
|
||||
if (reccnt)
|
||||
{
|
||||
grpPanSearchResults.Text = string.Format("Search Results Found: {0}", _SearchResults.Count);
|
||||
}
|
||||
grpPanSearchResults.Style.BackColor = Color.LightGreen;// Color.YellowGreen; Color.DarkSeaGreen;
|
||||
}
|
||||
else
|
||||
@ -2076,6 +2104,7 @@ namespace Volian.Controls.Library
|
||||
//TypesSelected = (typstr != null) ? "Searched Step Types: " + typstr : "Searched All Step Types";
|
||||
//TypesSelected = "Searched Step Types: " + ((typstr != null) ? typstr : "All Step Types");
|
||||
SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, TextSearchString /*.Replace(@"\",@"\u9586?")*/, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxIncROTextSrch.Checked ? ItemSearchIncludeLinks.Value : ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars, unitPrefix, byWordPrefix, byWordSuffix);
|
||||
|
||||
cmbResultsStyleIndex = 3; // display step text in results
|
||||
//}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user