Tree Node Name logic
This commit is contained in:
parent
5ae7cb88be
commit
50719291d1
@ -14,6 +14,7 @@ using System.Data.SqlClient;
|
|||||||
using Csla;
|
using Csla;
|
||||||
using Csla.Data;
|
using Csla.Data;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
//using VEPROMS.Properties;
|
||||||
|
|
||||||
namespace VEPROMS.CSLA.Library
|
namespace VEPROMS.CSLA.Library
|
||||||
{
|
{
|
||||||
@ -46,9 +47,38 @@ namespace VEPROMS.CSLA.Library
|
|||||||
Config = _DocVersionConfig.ToString();
|
Config = _DocVersionConfig.ToString();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
#region UserSettings
|
||||||
|
/// <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; }
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
public override string ToString()
|
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);
|
||||||
}
|
}
|
||||||
#region IVEDrillDown
|
#region IVEDrillDown
|
||||||
public System.Collections.IList GetChildren()
|
public System.Collections.IList GetChildren()
|
||||||
@ -129,9 +159,38 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
//public bool HasStandardSteps()
|
//public bool HasStandardSteps()
|
||||||
//{ return false; }
|
//{ return false; }
|
||||||
|
#region UserSettings
|
||||||
|
/// <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; }
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
public override string ToString()
|
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)
|
//public string ToString(string str,System.IFormatProvider ifp)
|
||||||
//{
|
//{
|
||||||
|
@ -130,9 +130,36 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
get { return Get().FolderConfig; }
|
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()
|
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)
|
//public string ToString(string str, System.IFormatProvider ifp)
|
||||||
//{
|
//{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user