Update Caption to reflect selected tab

Set caption listing from highest folder to the document version
This commit is contained in:
Rich 2012-02-21 15:33:09 +00:00
parent ef555954e8
commit f44fed0eca

View File

@ -398,6 +398,7 @@ namespace VEPROMS
{
tv.AdjustTree(_MyMRIList[0].MyItemInfo.MyProcedure);
tv.SelectedNode.Expand();
SetCaption(tv.SelectedNode as VETreeNode);
}
displaySearch1.SetupAnnotationSearch(ctrlAnnotationDetails, tc);
ctrlAnnotationDetails.SetupAnnotations(displaySearch1);
@ -597,7 +598,8 @@ namespace VEPROMS
{
if (tn.VEObject.GetType() == typeof(FolderInfo) || tn.VEObject.GetType() == typeof(DocVersionInfo))
{
caption.Append(sep + tn.Text);
//caption.Append(sep + tn.Text);
caption.Insert(0, tn.Text + sep);
sep = " - ";
}
tn = (VETreeNode)tn.Parent;
@ -652,6 +654,7 @@ namespace VEPROMS
{
tv.AdjustTree(tc.SelectedDisplayTabItem.SelectedItemInfo);
tc.SelectedDisplayTabItem.Focus();
SetCaption(tv.SelectedNode as VETreeNode);
}
}
}
@ -1172,7 +1175,7 @@ namespace VEPROMS
}
private void tc_SelectedDisplayTabItemChanged(object sender, EventArgs args)
{
// If the current procedure or section doesn't match then change it.
// If the current procedure or section in the treeview doesn't match then change the treeview selection.
ItemInfo tvii = ((tv.SelectedNode as VETreeNode).VEObject) as ItemInfo;
if (tc.SelectedDisplayTabItem == null) return;
if (tc.SelectedDisplayTabItem.MyItemInfo.IsProcedure)
@ -1185,6 +1188,7 @@ namespace VEPROMS
if (tvii == null || tc.SelectedDisplayTabItem.MyItemInfo.ItemID != tvii.ItemID)
tv.AdjustTree(tc.SelectedDisplayTabItem.MyItemInfo);
}
SetCaption(tv.SelectedNode as VETreeNode);
}
private void tc_StepPanelModeChange(object sender, StepRTBModeChangeEventArgs args)
{
@ -1195,7 +1199,6 @@ namespace VEPROMS
private StepRTB _LastStepRTB = null;
private void tc_ItemSelectedChanged(object sender, ItemSelectedChangedEventArgs args)
{
ItemInfo tvSelected = (tv.SelectedNode as VETreeNode).VEObject as ItemInfo;
if (_LastStepRTB != null && !_LastStepRTB.Disposing && !_LastStepRTB.Closed)
_LastStepRTB.EditModeChanged -= new StepRTBEvent(_LastStepRTB_EditModeChanged);
_LastStepRTB = args != null && args.MyEditItem != null ? args.MyEditItem.MyStepRTB : null;