Fixes for new names of Volian.Object.Library Objects.

Replaced GetType().Name comparison with constants with GetType() compared with typeof(...)
This commit is contained in:
Rich 2008-03-27 19:33:36 +00:00
parent b9bb66cb3e
commit f2764894ba
2 changed files with 158 additions and 155 deletions

View File

@ -3012,12 +3012,12 @@ namespace VEPROMS
this.tc.Location = new System.Drawing.Point(37, 147); this.tc.Location = new System.Drawing.Point(37, 147);
this.tc.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.tc.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tc.Name = "tc"; this.tc.Name = "tc";
this.tc.SelectedTab = null; this.tc.SelectedDisplayTabItem = null;
this.tc.Size = new System.Drawing.Size(962, 571); this.tc.Size = new System.Drawing.Size(962, 571);
this.tc.TabIndex = 8; this.tc.TabIndex = 8;
this.tc.LinkModifyTran += new Volian.Controls.Library.DisplayPanelLinkEvent(this.tc_LinkModifyTran); this.tc.LinkModifyTran += new Volian.Controls.Library.StepPanelLinkEvent(this.tc_LinkModifyTran);
this.tc.ItemSelectedChanged += new Volian.Controls.Library.DisplayPanelEvent(this.tc_ItemSelectedChanged); this.tc.ItemSelectedChanged += new Volian.Controls.Library.StepPanelEvent(this.tc_ItemSelectedChanged);
this.tc.LinkModifyRO += new Volian.Controls.Library.DisplayPanelLinkEvent(this.tc_LinkModifyRO); this.tc.LinkModifyRO += new Volian.Controls.Library.StepPanelLinkEvent(this.tc_LinkModifyRO);
// //
// itemAnnotationsBindingSource // itemAnnotationsBindingSource
// //

View File

@ -162,7 +162,7 @@ namespace VEPROMS
MostRecentItem mri = _MyMRIList.Add((int)(btnItem.Tag)); MostRecentItem mri = _MyMRIList.Add((int)(btnItem.Tag));
//SaveMRU(); //SaveMRU();
SetupMRU(); SetupMRU();
if (mri != null) tc.OpenItem(mri.MyItem); if (mri != null) tc.OpenItem(mri.MyItemInfo);
#if (DEBUG) #if (DEBUG)
// display a property page contianing the Tab Cotrol information // display a property page contianing the Tab Cotrol information
//f = new frmPropGrid(tc); //f = new frmPropGrid(tc);
@ -195,75 +195,79 @@ namespace VEPROMS
epComments.Expanded = false; epComments.Expanded = false;
rtxbComment.Text = ""; rtxbComment.Text = "";
epComments.TitleStyle.BackColor1.Color = _CommentTitleBckColor; epComments.TitleStyle.BackColor1.Color = _CommentTitleBckColor;
if(_MyMRIList.Add(node.VEObject)!=null) if (_MyMRIList.Add(node.VEObject) != null)
SetupMRU(); SetupMRU();
switch (node.VEObject.GetType().Name) if (node.VEObject.GetType() == typeof(FolderInfo))
{ {
case "FolderInfo": _LastFolderInfo = (FolderInfo)(_LastTreeNode.VEObject);
_LastFolderInfo = (FolderInfo)(_LastTreeNode.VEObject); _LastFolder = _LastFolderInfo.Get();
_LastFolder = _LastFolderInfo.Get();
break;
case "DocVersionInfo":
_LastDocVersionInfo = (DocVersionInfo)(node.VEObject);
_LastDocVersion = _LastDocVersionInfo.Get();
break;
case "ProcedureInfo":
_LastProcedureInfo = (ProcedureInfo)(_LastTreeNode.VEObject);
_LastProcedure = _LastProcedureInfo.Get();
tc.OpenItem((ItemInfo)_LastProcedureInfo);
if (_LastProcedureInfo.ItemAnnotationCount > 0)
{
if (!cbCmntDontPopup.Checked)
epComments.Expanded = true;
rtxbComment.Text = _LastProcedureInfo.ItemAnnotations[0].SearchText;
}
break;
case "SectionInfo":
_LastSectionInfo = (SectionInfo)(_LastTreeNode.VEObject);
_LastSection = _LastSectionInfo.Get();
tc.OpenItem((ItemInfo)_LastSectionInfo);
if (_LastSectionInfo.ItemAnnotationCount > 0)
{
if (!cbCmntDontPopup.Checked)
epComments.Expanded = true;
rtxbComment.Text = _LastSectionInfo.ItemAnnotations[0].SearchText;
}
break;
case "StepInfo":
_LastStepInfo = (StepInfo)(_LastTreeNode.VEObject);
_LastStep = _LastStepInfo.Get();
tc.OpenItem((ItemInfo)_LastStepInfo);
//if (_LastStepInfo.ItemAnnotationCount > 0)
//{
// if (!cbCmntDontPopup.Checked)
// epComments.Expanded = true;
// rtxbComment.Text = _LastStepInfo.ItemAnnotations[0].SearchText;
itemAnnotationsBindingSource.DataSource = _LastStepInfo.ItemAnnotations;
// epComments.TitleStyle.BackColor1.Color = Color.Yellow;
//}
#region Sample Display Table Code
// display an exiting table in that rtf grid thing
//if ((_LastStepInfo.MyContent.Type == 20007) || (_LastStepInfo.MyContent.Type == 20009))
//{
// //MessageBox.Show("Source Grid");
// //frmTable newtable1 = new frmTable(_LastStepInfo.MyContent.Text);
// //newtable1.ShowDialog();
// //MessageBox.Show("IGrid");
// //frmIGrid newtable2 = new frmIGrid(_LastStepInfo.MyContent.Text);
// //newtable2.ShowDialog();
// //MessageBox.Show("GridView"); //standard Visual Studio Control
// //frmGridView newtable3 = new frmGridView(_LastStepInfo.MyContent.Text);
// //newtable3.ShowDialog();
// MessageBox.Show("FlexCell");
// frmFlexCell newtable4 = new frmFlexCell(_LastStepInfo.MyContent.Text);
// newtable4.ShowDialog();
//}
#endregion
break;
default:
break;
} }
else if (node.VEObject.GetType() == typeof(DocVersionInfo))
{
_LastDocVersionInfo = (DocVersionInfo)(node.VEObject);
_LastDocVersion = _LastDocVersionInfo.Get();
}
else if (node.VEObject.GetType() == typeof(ProcedureInfo))
{
_LastProcedureInfo = (ProcedureInfo)(_LastTreeNode.VEObject);
_LastProcedure = _LastProcedureInfo.Get();
tc.OpenItem((ItemInfo)_LastProcedureInfo);
if (_LastProcedureInfo.ItemAnnotationCount > 0)
{
if (!cbCmntDontPopup.Checked)
epComments.Expanded = true;
rtxbComment.Text = _LastProcedureInfo.ItemAnnotations[0].SearchText;
}
}
else if (node.VEObject.GetType() == typeof(SectionInfo))
{
_LastSectionInfo = (SectionInfo)(_LastTreeNode.VEObject);
_LastSection = _LastSectionInfo.Get();
tc.OpenItem((ItemInfo)_LastSectionInfo);
if (_LastSectionInfo.ItemAnnotationCount > 0)
{
if (!cbCmntDontPopup.Checked)
epComments.Expanded = true;
rtxbComment.Text = _LastSectionInfo.ItemAnnotations[0].SearchText;
}
}
else if (node.VEObject.GetType() == typeof(StepInfo))
{
_LastStepInfo = (StepInfo)(_LastTreeNode.VEObject);
_LastStep = _LastStepInfo.Get();
tc.OpenItem((ItemInfo)_LastStepInfo);
//if (_LastStepInfo.ItemAnnotationCount > 0)
//{
// if (!cbCmntDontPopup.Checked)
// epComments.Expanded = true;
// rtxbComment.Text = _LastStepInfo.ItemAnnotations[0].SearchText;
itemAnnotationsBindingSource.DataSource = _LastStepInfo.ItemAnnotations;
// epComments.TitleStyle.BackColor1.Color = Color.Yellow;
//}
#region Sample Display Table Code
// display an exiting table in that rtf grid thing
//if ((_LastStepInfo.MyContent.Type == 20007) || (_LastStepInfo.MyContent.Type == 20009))
//{
// //MessageBox.Show("Source Grid");
// //frmTable newtable1 = new frmTable(_LastStepInfo.MyContent.Text);
// //newtable1.ShowDialog();
// //MessageBox.Show("IGrid");
// //frmIGrid newtable2 = new frmIGrid(_LastStepInfo.MyContent.Text);
// //newtable2.ShowDialog();
// //MessageBox.Show("GridView"); //standard Visual Studio Control
// //frmGridView newtable3 = new frmGridView(_LastStepInfo.MyContent.Text);
// //newtable3.ShowDialog();
// MessageBox.Show("FlexCell");
// frmFlexCell newtable4 = new frmFlexCell(_LastStepInfo.MyContent.Text);
// newtable4.ShowDialog();
//}
#endregion
}
//break;
//default:
//break;
//}
setupRibbonTabs(node); setupRibbonTabs(node);
} }
} }
@ -298,7 +302,7 @@ namespace VEPROMS
bool IsFolder(VETreeNode veTreeNode) bool IsFolder(VETreeNode veTreeNode)
{ {
return (veTreeNode.VEObject.GetType().Name == "FolderInfo"); return (veTreeNode.VEObject.GetType() == typeof(FolderInfo));
} }
void tv_NodeDragDrop(object sender, Volian.Controls.Library.vlnTreeEventArgs args) void tv_NodeDragDrop(object sender, Volian.Controls.Library.vlnTreeEventArgs args)
@ -385,15 +389,12 @@ namespace VEPROMS
VETreeNode tn = (VETreeNode)e.Node; VETreeNode tn = (VETreeNode)e.Node;
while (tn != null) while (tn != null)
{ {
switch (tn.VEObject.GetType().Name) if (tn.VEObject.GetType() == typeof(FolderInfo) || tn.VEObject.GetType() == typeof(DocVersionInfo))
{ {
case "FolderInfo": if (caption.Equals(""))
case "DocVersionInfo": caption = tn.Text;
if (caption.Equals("")) else
caption = tn.Text; caption = tn.Text + " - " + caption;
else
caption = tn.Text + " - " + caption;
break;
} }
tn = (VETreeNode)tn.Parent; tn = (VETreeNode)tn.Parent;
} }
@ -478,7 +479,7 @@ namespace VEPROMS
// // user didn't select a FolderInfo type of node. // // user didn't select a FolderInfo type of node.
// // walk up the tree to find the first FolderInfo node type // // walk up the tree to find the first FolderInfo node type
// VETreeNode tn = (VETreeNode)(tv.SelectedNode); // VETreeNode tn = (VETreeNode)(tv.SelectedNode);
// while (tn != null && tn.VEObject.GetType().Name != "FolderInfo") // while (tn != null && tn.VEObject.GetType() != typeof(FolderInfo))
// tn = (VETreeNode)tn.Parent; // tn = (VETreeNode)tn.Parent;
// _LastFolderInfo = (FolderInfo)(tn.VEObject); // _LastFolderInfo = (FolderInfo)(tn.VEObject);
// _LastFolder = _LastFolderInfo.Get(); // _LastFolder = _LastFolderInfo.Get();
@ -504,28 +505,29 @@ namespace VEPROMS
{ {
// Display a property page. (the ppStyle selects either a tabbed or button interface) // Display a property page. (the ppStyle selects either a tabbed or button interface)
VETreeNode tn = (VETreeNode)(tv.SelectedNode); VETreeNode tn = (VETreeNode)(tv.SelectedNode);
switch (tn.VEObject.GetType().Name) if (tn.VEObject.GetType() == typeof(FolderInfo))
{ {
case "FolderInfo": frmFolderProperties frmfld = new frmFolderProperties(_LastFolder.FolderConfig);
frmFolderProperties frmfld = new frmFolderProperties(_LastFolder.FolderConfig); if (frmfld.ShowDialog() == DialogResult.OK)
if (frmfld.ShowDialog() == DialogResult.OK) _LastFolder.Save();
_LastFolder.Save(); }
break; else if (tn.VEObject.GetType() == typeof(DocVersionInfo))
case "DocVersionInfo": {
frmVersionsProperties frmver = new frmVersionsProperties(_LastDocVersion.DocVersionConfig); frmVersionsProperties frmver = new frmVersionsProperties(_LastDocVersion.DocVersionConfig);
if (frmver.ShowDialog() == DialogResult.OK) if (frmver.ShowDialog() == DialogResult.OK)
_LastDocVersion.Save(); _LastDocVersion.Save();
break; }
case "ProcedureInfo": else if (tn.VEObject.GetType() == typeof(ProcedureInfo))
frmProcedureProperties frmproc = new frmProcedureProperties(_LastProcedure.ProcedureConfig); {
if (frmproc.ShowDialog() == DialogResult.OK) frmProcedureProperties frmproc = new frmProcedureProperties(_LastProcedure.ProcedureConfig);
_LastProcedure.Save(); if (frmproc.ShowDialog() == DialogResult.OK)
break; _LastProcedure.Save();
case "SectionInfo": }
frmSectionProperties frmsec = new frmSectionProperties(_LastSection.SectionConfig); else if (tn.VEObject.GetType() == typeof(SectionInfo))
if (frmsec.ShowDialog() == DialogResult.OK) {
_LastSection.Save(); frmSectionProperties frmsec = new frmSectionProperties(_LastSection.SectionConfig);
break; if (frmsec.ShowDialog() == DialogResult.OK)
_LastSection.Save();
} }
} }
@ -538,35 +540,36 @@ namespace VEPROMS
VETreeNode tn = (VETreeNode)(tv.SelectedNode); VETreeNode tn = (VETreeNode)(tv.SelectedNode);
frmPropGrid propGrid = null; frmPropGrid propGrid = null;
string title = ""; string title = "";
switch (tn.VEObject.GetType().Name) if (tn.VEObject.GetType() == typeof(FolderInfo))
{ {
case "FolderInfo": title = string.Format("{0} Properties", _LastFolder.FolderConfig.Name);
title = string.Format("{0} Properties", _LastFolder.FolderConfig.Name); propGrid = new frmPropGrid(_LastFolder.FolderConfig, title);
propGrid = new frmPropGrid(_LastFolder.FolderConfig, title); if (propGrid.ShowDialog() == DialogResult.OK)
if ( propGrid.ShowDialog() == DialogResult.OK)
_LastFolder.Save(); _LastFolder.Save();
break; }
case "DocVersionInfo": else if (tn.VEObject.GetType() == typeof(DocVersionInfo))
title = string.Format("{0} Properties", _LastDocVersion.DocVersionConfig.Name); {
propGrid = new frmPropGrid(_LastDocVersion.DocVersionConfig, title); title = string.Format("{0} Properties", _LastDocVersion.DocVersionConfig.Name);
if ( propGrid.ShowDialog() == DialogResult.OK) propGrid = new frmPropGrid(_LastDocVersion.DocVersionConfig, title);
if (propGrid.ShowDialog() == DialogResult.OK)
_LastDocVersion.Save(); _LastDocVersion.Save();
break; }
case "ProcedureInfo": else if (tn.VEObject.GetType() == typeof(ProcedureInfo))
title = string.Format("{0} {1} Properties", _LastProcedure.ProcedureConfig.Number, _LastProcedure.ProcedureConfig.Title); {
propGrid = new frmPropGrid(_LastProcedure.ProcedureConfig, title); title = string.Format("{0} {1} Properties", _LastProcedure.ProcedureConfig.Number, _LastProcedure.ProcedureConfig.Title);
if ( propGrid.ShowDialog() == DialogResult.OK) propGrid = new frmPropGrid(_LastProcedure.ProcedureConfig, title);
if (propGrid.ShowDialog() == DialogResult.OK)
_LastProcedure.Save(); _LastProcedure.Save();
break; }
case "SectionInfo": else if (tn.VEObject.GetType() == typeof(SectionInfo))
if (_LastSection.SectionConfig.Number.Length > 0) {
title = string.Format("{0} {1} Properties", _LastSection.SectionConfig.Number, _LastSection.SectionConfig.Title); if (_LastSection.SectionConfig.Number.Length > 0)
else title = string.Format("{0} {1} Properties", _LastSection.SectionConfig.Number, _LastSection.SectionConfig.Title);
title = string.Format("{0} Properties", _LastSection.SectionConfig.Title); else
propGrid = new frmPropGrid(_LastSection.SectionConfig, title); title = string.Format("{0} Properties", _LastSection.SectionConfig.Title);
if ( propGrid.ShowDialog() == DialogResult.OK) propGrid = new frmPropGrid(_LastSection.SectionConfig, title);
if (propGrid.ShowDialog() == DialogResult.OK)
_LastSection.Save(); _LastSection.Save();
break;
} }
} }
@ -859,8 +862,8 @@ namespace VEPROMS
/// <param name="e"></param> /// <param name="e"></param>
private void btnSetBookMrk_Click(object sender, EventArgs e) private void btnSetBookMrk_Click(object sender, EventArgs e)
{ {
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel; StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
_MyBookMarks.Add(dtp.SelectedItem.MyItem); _MyBookMarks.Add(dtp.SelectedStepItem.MyItemInfo);
RefreshBookMarkData(); RefreshBookMarkData();
//VETreeNode tn = (VETreeNode)(tv.SelectedNode); //VETreeNode tn = (VETreeNode)(tv.SelectedNode);
//AddToBookMarkList(tn); //AddToBookMarkList(tn);
@ -890,16 +893,16 @@ namespace VEPROMS
// vlnCSLAPanel1.ItemSelect(item); // vlnCSLAPanel1.ItemSelect(item);
//} //}
private void vlnCSLAPanel1_LinkClicked(object sender, Volian.Controls.Library.DisplayLinkEventArgs args) private void vlnCSLAPanel1_LinkClicked(object sender, StepPanelLinkEventArgs args)
{ {
switch (args.Type) switch (args.MyParsedLinkType)
{ {
case ParsedLinkType.ReferencedObject: case ParsedLinkType.ReferencedObject:
MessageBox.Show(args.Roid, args.Type.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(args.Roid, args.MyParsedLinkType.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
break; break;
case ParsedLinkType.Transition: case ParsedLinkType.Transition:
case ParsedLinkType.TransitionRange: case ParsedLinkType.TransitionRange:
tc.OpenItem(args.MyTransition.MyItemToID); tc.OpenItem(args.MyTransitionInfo.MyItemToID);
break; break;
} }
} }
@ -1061,7 +1064,7 @@ namespace VEPROMS
/// <param name="node"></param> /// <param name="node"></param>
private void setupRibbonTabs(VETreeNode node) private void setupRibbonTabs(VETreeNode node)
{ {
//switch (node.VEObject.GetType().Name) //switch (node.VEObject.GetType().Name) // Change to else if & typeof
//{ //{
// case "FolderInfo": // case "FolderInfo":
// rtabEdit.Visible = false; // rtabEdit.Visible = false;
@ -1131,43 +1134,43 @@ namespace VEPROMS
{ {
infoPanel.Expanded = true; infoPanel.Expanded = true;
infoTabs.SelectedTab = infotabRO; infoTabs.SelectedTab = infotabRO;
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel; StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
if (dtp == null) return; if (dtp == null) return;
ROFST rofst = new ROFST("g:\\vehlp\\ro\\ro.fst"); ROFST rofst = new ROFST("g:\\vehlp\\ro\\ro.fst");
displayRO.MyROFST = rofst; displayRO.MyROFST = rofst;
displayRO.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB; displayRO.MyRTB = dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
} }
#endregion #endregion
#region InfoTabTransition #region InfoTabTransition
private void infotabTransition_Click(object sender, EventArgs e) private void infotabTransition_Click(object sender, EventArgs e)
{ {
if (tc == null || tc.SelectedTab == null) return; if (tc == null || tc.SelectedDisplayTabItem == null) return;
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel; StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
if (dtp == null) return; if (dtp == null) return;
displayTransition.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB; displayTransition.MyRTB = dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
displayTransition.CurTrans = null; displayTransition.CurTrans = null;
} }
private void btnInsTrans_Click(object sender, EventArgs e) private void btnInsTrans_Click(object sender, EventArgs e)
{ {
infoPanel.Expanded = true; infoPanel.Expanded = true;
infoTabs.SelectedTab = infotabTransition; infoTabs.SelectedTab = infotabTransition;
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel; StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
if (dtp == null) return; if (dtp == null) return;
displayTransition.MyRTB = _MyRTB; displayTransition.MyRTB = _MyRTB;
displayTransition.CurTrans = null; displayTransition.CurTrans = null;
} }
#endregion #endregion
private void tc_ItemSelectedChanged(object sender, DisplayPanelEventArgs args) private void tc_ItemSelectedChanged(object sender, StepPanelEventArgs args)
{ {
if (args == null) if (args == null)
itemAnnotationsBindingSource.DataSource = null; itemAnnotationsBindingSource.DataSource = null;
else else
{ {
itemAnnotationsBindingSource.DataSource = args.MyDisplayItem.MyItem.ItemAnnotations; itemAnnotationsBindingSource.DataSource = args.MyStepItem.MyItemInfo.ItemAnnotations;
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel; StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
if (dtp == null) return; if (dtp == null) return;
displayTransition.MyRTB = dtp.MyPanel.DisplayRTB; displayTransition.MyRTB = dtp.MyStepPanel.SelectedStepRTB;
displayRO.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB; displayRO.MyRTB = dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
} }
} }
private void itemAnnotationsBindingSource_DataSourceChanged(object sender, EventArgs e) private void itemAnnotationsBindingSource_DataSourceChanged(object sender, EventArgs e)
@ -1190,7 +1193,7 @@ namespace VEPROMS
{ {
_MyRTB.SaveText(); _MyRTB.SaveText();
} }
private void tc_LinkActiveChanged(object sender, DisplayLinkEventArgs args) private void tc_LinkActiveChanged(object sender, StepPanelLinkEventArgs args)
{ {
// determine if any infotabs are visisble, and if it is the Transition, // determine if any infotabs are visisble, and if it is the Transition,
// change the curitem for the transition to the current item. // change the curitem for the transition to the current item.
@ -1199,39 +1202,39 @@ namespace VEPROMS
displayTransition.CurTrans = null; displayTransition.CurTrans = null;
} }
} }
private void tc_LinkInsertTran(object sender, DisplayLinkEventArgs args) private void tc_LinkInsertTran(object sender, StepPanelLinkEventArgs args)
{ {
infoPanel.Expanded = true; infoPanel.Expanded = true;
infoTabs.SelectedTab = infotabTransition; infoTabs.SelectedTab = infotabTransition;
displayTransition.CurTrans = null; displayTransition.CurTrans = null;
} }
private void tc_LinkInsertRO(object sender, DisplayLinkEventArgs args) private void tc_LinkInsertRO(object sender, StepPanelLinkEventArgs args)
{ {
infoPanel.Expanded = true; infoPanel.Expanded = true;
infoTabs.SelectedTab = infotabRO; infoTabs.SelectedTab = infotabRO;
ROFST rofst = new ROFST("g:\\vehlp\\ro\\ro.fst"); ROFST rofst = new ROFST("g:\\vehlp\\ro\\ro.fst");
displayRO.MyROFST = rofst; displayRO.MyROFST = rofst;
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel; StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
if (dtp == null) return; if (dtp == null) return;
displayRO.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB; displayRO.MyRTB = dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
displayRO.CurROLink = null; displayRO.CurROLink = null;
} }
private void tc_LinkModifyTran(object sender, DisplayLinkEventArgs args) private void tc_LinkModifyTran(object sender, StepPanelLinkEventArgs args)
{ {
infoPanel.Expanded = true; infoPanel.Expanded = true;
infoTabs.SelectedTab = infotabTransition; infoTabs.SelectedTab = infotabTransition;
displayTransition.CurTrans = args.MyTransition; displayTransition.CurTrans = args.MyTransitionInfo;
} }
private void tc_LinkModifyRO(object sender, DisplayLinkEventArgs args) private void tc_LinkModifyRO(object sender, StepPanelLinkEventArgs args)
{ {
infoPanel.Expanded = true; infoPanel.Expanded = true;
infoTabs.SelectedTab = infotabRO; infoTabs.SelectedTab = infotabRO;
ROFST rofst = new ROFST("g:\\vehlp\\ro\\ro.fst"); ROFST rofst = new ROFST("g:\\vehlp\\ro\\ro.fst");
displayRO.MyROFST = rofst; displayRO.MyROFST = rofst;
StepTabPanel dtp = ((DisplayTabItem)tc.SelectedTab).MyTabPanel; StepTabPanel dtp = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
if (dtp == null) return; if (dtp == null) return;
displayRO.MyRTB = dtp.MyPanel.DisplayItemSelected.MyDisplayRTB; displayRO.MyRTB = dtp.MyStepPanel.SelectedStepItem.MyStepRTB;
displayRO.CurROLink = args.RoUsageid; // this is wrong - use for now. displayRO.CurROLink = args.RoUsageid; // this is wrong - use for now.
} }
@ -1272,7 +1275,7 @@ namespace VEPROMS
private void lbxBookMarks_Click(object sender, EventArgs e) private void lbxBookMarks_Click(object sender, EventArgs e)
{ {
MostRecentItem itm = lbxBookMarks.SelectedValue as MostRecentItem; MostRecentItem itm = lbxBookMarks.SelectedValue as MostRecentItem;
tc.OpenItem(itm.MyItem); tc.OpenItem(itm.MyItemInfo);
} }
} }
} }