Tree Node Name logic
This commit is contained in:
@@ -130,9 +130,36 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
get { return Get().FolderConfig; }
|
||||
}
|
||||
/// <summary>
|
||||
/// These settings are set on the user interface side.
|
||||
/// This is used to control whether the Name and/or Title is displayed
|
||||
/// next to the tree nodes in the user interface
|
||||
/// </summary>
|
||||
private bool _DisplayTreeNodeNames = true;
|
||||
public bool DisplayTreeNodeNames
|
||||
{
|
||||
get { return _DisplayTreeNodeNames; }
|
||||
set { _DisplayTreeNodeNames = value; }
|
||||
}
|
||||
private bool _DisplayTreeNodeTitles = false;
|
||||
|
||||
public bool DisplayTreeNodeTitles
|
||||
{
|
||||
get { return _DisplayTreeNodeTitles; }
|
||||
set { _DisplayTreeNodeTitles = value; }
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} - {1}", Name, Title);
|
||||
// assume that at least one of the two options was selected
|
||||
string rtnstr = "";
|
||||
if ( _DisplayTreeNodeNames) rtnstr = Name;
|
||||
if (_DisplayTreeNodeTitles)
|
||||
{
|
||||
if (rtnstr.Length > 0) rtnstr += " - ";
|
||||
rtnstr += Title;
|
||||
}
|
||||
return rtnstr;
|
||||
//return string.Format("{0} - {1}", Name, Title);
|
||||
}
|
||||
//public string ToString(string str, System.IFormatProvider ifp)
|
||||
//{
|
||||
|
Reference in New Issue
Block a user