Changed search to allow the user to select all DocVersions, by not selecting any

This commit is contained in:
Rich 2013-04-08 19:26:52 +00:00
parent 55f918c150
commit 5cec2324de

View File

@ -957,6 +957,8 @@ namespace Volian.Controls.Library
private string ConvertSpecialChars(string str) private string ConvertSpecialChars(string str)
{ {
string rtnVal = str; string rtnVal = str;
if (_MyDocVersion != null)
{
rtnVal = rtnVal.Replace("\u00A0", @"\u160?"); //convert \u00A0 to a hard space (\u00A0 shows as a blank in the search text field) rtnVal = rtnVal.Replace("\u00A0", @"\u160?"); //convert \u00A0 to a hard space (\u00A0 shows as a blank in the search text field)
rtnVal = rtnVal.Replace("\n", ""); rtnVal = rtnVal.Replace("\n", "");
FormatData fmtdata = _MyDocVersion.ActiveFormat.PlantFormat.FormatData; FormatData fmtdata = _MyDocVersion.ActiveFormat.PlantFormat.FormatData;
@ -969,6 +971,7 @@ namespace Volian.Controls.Library
rtnVal = rtnVal.Replace(((char)sym.Unicode).ToString(), rplace); rtnVal = rtnVal.Replace(((char)sym.Unicode).ToString(), rplace);
} }
} }
}
return rtnVal; return rtnVal;
} }
@ -1017,7 +1020,9 @@ namespace Volian.Controls.Library
//TypesSelected = "Step Types Searched: " + ((typstr != null) ? typstr : "all step types"); //TypesSelected = "Step Types Searched: " + ((typstr != null) ? typstr : "all step types");
//TypesSelected = "Searched Step Types: " + ((typstr != null) ? typstr : "all step types"); //TypesSelected = "Searched Step Types: " + ((typstr != null) ? typstr : "all step types");
//TypesSelected = (typstr != null) ? "Searched Step Types: " + typstr : "Searched All Step Types"; //TypesSelected = (typstr != null) ? "Searched Step Types: " + typstr : "Searched All Step Types";
string unitPrefix = Mydocversion.DocVersionConfig.Unit_ProcedureNumber; string unitPrefix = "";
if(Mydocversion != null)
unitPrefix = Mydocversion.DocVersionConfig.Unit_ProcedureNumber;
if (unitPrefix.EndsWith("#")) if (unitPrefix.EndsWith("#"))
unitPrefix = unitPrefix.Replace("#", ""); unitPrefix = unitPrefix.Replace("#", "");
@ -1291,16 +1296,20 @@ namespace Volian.Controls.Library
{ {
if (lstCheckedDocVersions.Count == 0) if (lstCheckedDocVersions.Count == 0)
{ {
xpSetToSearch.Expanded = true; xpSetToSearch.TitleText = string.Format("All Procedure Sets Selected");
xpSetToSearch.TitleStyle.BackColor1.Color = Color.Crimson; xpSetToSearch.TitleStyle.BackColor1.Color = Color.PapayaWhip;
btnSearch.Enabled = false; btnSearch.Enabled = true;
tabSearchTypes.Enabled = false; // disable all the search tabs tabSearchTypes.Enabled = true; // enable all the search tabs
//if (xpSetToSearch.Expanded) // xpSetToSearch.Expanded = true;
xpSetToSearch.TitleText = "Select Procedure Sets to Search"; // xpSetToSearch.TitleStyle.BackColor1.Color = Color.Crimson;
//else // btnSearch.Enabled = false;
// xpSetToSearch.TitleText = "Click Here to Select Procedure Sets"; // tabSearchTypes.Enabled = false; // disable all the search tabs
// //if (xpSetToSearch.Expanded)
// xpSetToSearch.TitleText = "Select Procedure Sets to Search";
// //else
// // xpSetToSearch.TitleText = "Click Here to Select Procedure Sets";
//xpSetToSearch.TitleStyle.BackColor1.Color = saveXpSetToSearchColor; // //xpSetToSearch.TitleStyle.BackColor1.Color = saveXpSetToSearchColor;
} }
else //if (lstCheckedDocVersions.Count > 0) else //if (lstCheckedDocVersions.Count > 0)
{ {