Tree node name logic
This commit is contained in:
@@ -50,6 +50,18 @@ namespace VEPROMS
|
||||
// set the color of the ribbon
|
||||
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable((eOffice2007ColorScheme)Settings.Default.SystemColor);
|
||||
|
||||
// LATER: get the user setting to control what is displayed for each tree node
|
||||
// The logic is in the ToString() functions in FolderExt.cs and DocVersionExt.cs
|
||||
//the GetFolder(1) function will read in the frist node (using ToString() to assign node text)
|
||||
|
||||
// Get the saved Tree Node Diplay settings
|
||||
//if (Settings.Default["UseNameOnTreeNode"])
|
||||
//{
|
||||
//}
|
||||
//if (Settings.Default["UseTitleOnTreeNode"])
|
||||
//{
|
||||
//}
|
||||
|
||||
VETreeNode tn = VETreeNode.GetFolder(1);
|
||||
tv.Nodes.Add(tn);
|
||||
tv.NodeNew += new Volian.Controls.Library.vlnTreeViewTreeNodeEvent(tv_NodeNew);
|
||||
@@ -365,10 +377,27 @@ namespace VEPROMS
|
||||
}
|
||||
private void tv_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
string caption = null;
|
||||
SaveIfChanged();
|
||||
SetupNodes((VETreeNode)e.Node);
|
||||
this.Text = "VE-PROMS - " + e.Node.Text; // build and display window caption
|
||||
|
||||
// this.Text = "VE-PROMS - " + e.Node.Text; // build and display window caption
|
||||
caption = "";
|
||||
VETreeNode tn = (VETreeNode)e.Node;
|
||||
while (tn != null)
|
||||
{
|
||||
switch (tn.VEObject.GetType().Name)
|
||||
{
|
||||
case "FolderInfo":
|
||||
case "DocVersionInfo":
|
||||
if (caption.Equals(""))
|
||||
caption = tn.Text;
|
||||
else
|
||||
caption = tn.Text + " - " + caption;
|
||||
break;
|
||||
}
|
||||
tn = (VETreeNode)tn.Parent;
|
||||
}
|
||||
this.Text = caption;
|
||||
}
|
||||
|
||||
void tv_NodeProperties(object sender, Volian.Controls.Library.vlnTreeEventArgs args)
|
||||
|
Reference in New Issue
Block a user