C2024-025 Remove the tall box characters from the search results.
This commit is contained in:
parent
c508255ab3
commit
b972e40a28
@ -2752,6 +2752,29 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
#endregion UnlinkEnhanced
|
||||
#region Search
|
||||
|
||||
//CSM C2024-025 Removing the strange tall box characters that appear in the search results tree
|
||||
//Create cleaned version of variable for use in DisplaySearch
|
||||
//This is the Function that does the cleaning
|
||||
public string CleanSearchString(string value)
|
||||
{
|
||||
// \u000C = PageBreak
|
||||
// \u0009 = Tab
|
||||
// \u160? = Hard Space
|
||||
// \u0007 = Bell (Separates Parent Path and Child Path)
|
||||
// \u0011 - Separates DisplayNumber & DisplayText of Step
|
||||
|
||||
if (value == null)
|
||||
return null;
|
||||
|
||||
string tmp = value.Replace("\a", "\\").Replace("\u0007", "\\");
|
||||
tmp = tmp.Replace("\u000C", " ").Replace("\u0009", " ").Replace(@"\u160?", " ").Replace("\u0011", " ");
|
||||
|
||||
if (tmp.StartsWith("\\"))
|
||||
tmp = tmp.Substring(1);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
internal string _SearchDVPath;
|
||||
public string SearchDVPath
|
||||
{
|
||||
@ -2767,6 +2790,10 @@ namespace VEPROMS.CSLA.Library
|
||||
return _SearchDVPath;
|
||||
}
|
||||
}
|
||||
//CSM C2024-025 Removing the strange tall box characters that appear in the search results tree
|
||||
//Create cleaned version of variable for use in DisplaySearch
|
||||
public string SearchDVPath_clean => CleanSearchString(SearchDVPath);
|
||||
|
||||
internal string _SearchPath;
|
||||
public string SearchPath
|
||||
{
|
||||
@ -2790,6 +2817,10 @@ namespace VEPROMS.CSLA.Library
|
||||
return _SearchPath;
|
||||
}
|
||||
}
|
||||
//CSM C2024-025 Removing the strange tall box characters that appear in the search results tree
|
||||
//Create cleaned version of variable for use in DisplaySearch
|
||||
public string SearchPath_clean => CleanSearchString(SearchPath);
|
||||
|
||||
public string ShortSearchPath
|
||||
{
|
||||
get
|
||||
@ -2800,6 +2831,9 @@ namespace VEPROMS.CSLA.Library
|
||||
return dtext;
|
||||
}
|
||||
}
|
||||
//CSM C2024-025 Removing the strange tall box characters that appear in the search results tree
|
||||
//Create cleaned version of variable for use in DisplaySearch
|
||||
public string ShortSearchPath_clean => CleanSearchString(ShortSearchPath);
|
||||
|
||||
// B2021-076: Proms search results are not presented in order when printed to PDF
|
||||
internal string _SearchDefaultSort;
|
||||
|
@ -66,7 +66,7 @@ namespace Volian.Controls.Library
|
||||
private Color saveGrpPanSearchResults;
|
||||
private ItemInfoList _SearchResults;
|
||||
|
||||
private string _DisplayMember = "SearchPath";
|
||||
private string _DisplayMember = "SearchPath_clean";
|
||||
private bool _OpenDocFromSearch;
|
||||
private ROFSTLookup _MyROFSTLookup;
|
||||
private bool _LoadingList = false;
|
||||
@ -1745,7 +1745,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
|
||||
// B2021-076: Proms search results are not presented in order when printed to PDF
|
||||
if (_DisplayMember == "SearchPath" || _DisplayMember == "ShortSearchPath")
|
||||
if (_DisplayMember == "SearchPath_clean" || _DisplayMember == "ShortSearchPath_clean")
|
||||
{
|
||||
cbSorted.Checked = false;
|
||||
cbSorted.Enabled = false;
|
||||
@ -1880,10 +1880,10 @@ namespace Volian.Controls.Library
|
||||
switch (cmbResultsStyle.Text)
|
||||
{
|
||||
case "Document Path":
|
||||
_DisplayMember = "SearchDVPath";
|
||||
_DisplayMember = "SearchDVPath_clean";
|
||||
break;
|
||||
case "Step Path":
|
||||
_DisplayMember = "ShortSearchPath";
|
||||
_DisplayMember = "ShortSearchPath_clean";
|
||||
break;
|
||||
case "Annotation Text":
|
||||
_DisplayMember = "SearchAnnotationText";
|
||||
@ -1892,7 +1892,7 @@ namespace Volian.Controls.Library
|
||||
_DisplayMember = "DisplayText";
|
||||
break;
|
||||
default:
|
||||
_DisplayMember = "SearchPath";
|
||||
_DisplayMember = "SearchPath_clean";
|
||||
break;
|
||||
}
|
||||
DisplayResults();
|
||||
|
Loading…
x
Reference in New Issue
Block a user