Development

This commit is contained in:
2026-07-27 11:19:47 -04:00
parent 99fe567e78
commit 58a6cb9a24
@@ -2079,7 +2079,7 @@ namespace Volian.Controls.Library
if (cbxFndUnLnkROVals.Enabled && cbxFndUnLnkROVals.Checked) if (cbxFndUnLnkROVals.Enabled && cbxFndUnLnkROVals.Checked)
{ {
string ROSearchList2 = exactsearch(ROSearchList); // match exact string string ROSearchList2 = exactsearch(ROSearchList); // match exact string
// B2022-031 - added a cbxProcSectSrch to filter out procedure and section titles from global search results. // B2022-031 - added a exactsearch to filter out procedure and section titles from global search results.
SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, ROSearchList2, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxProcSectSrch.Checked ? 1 : 0, ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars, unitPrefix, string.Empty, string.Empty); SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, ROSearchList2, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxProcSectSrch.Checked ? 1 : 0, ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars, unitPrefix, string.Empty, string.Empty);
cmbResultsStyleIndex = 3; // display step text in results cmbResultsStyleIndex = 3; // display step text in results
} }
@@ -2193,18 +2193,22 @@ namespace Volian.Controls.Library
private string exactsearch(string SearchString) // B2026-053 private string exactsearch(string SearchString) // B2026-053
{ {
string ss = ""; //string ss = "";
StringBuilder ss = new StringBuilder();
int sl = SearchString.Length; int sl = SearchString.Length;
int LstIdxSp = SearchString.LastIndexOf(' '); int LstIdxSp = SearchString.LastIndexOf(' ');
if (sl == LstIdxSp + 1) // B2026-053 if ' ' the last char. if (sl == LstIdxSp + 1) // B2026-053 if ' ' the last char.
{ {
ss = ' ' + SearchString; //add a space prefix to make the search exact if the end of the search string is a space. ss.Append(' ');
ss.Append(SearchString); // B2026-053 add a space prefix to make the search exact if the end of the searchString is a space.
} }
else else
{ {
ss = ' ' + SearchString + ' '; // Exact match add spaces before and after search string. ss.Append(' ');
ss.Append(SearchString); // B2026-053 Exact match add spaces before and after searchString.
ss.Append(' ');
} }
return ss; return ss.ToString();
} }
private void ClearResults() // B2021-103 if no results when RNO only, clear results list. (moved from btnSearch_Click) private void ClearResults() // B2021-103 if no results when RNO only, clear results list. (moved from btnSearch_Click)