This commit is contained in:
Kathy Ruffing 2009-11-13 14:09:58 +00:00
parent bb048290ef
commit c4f381e9c4
2 changed files with 54 additions and 8 deletions

View File

@ -1150,6 +1150,8 @@ namespace VEPROMS
this.tc.Size = new System.Drawing.Size(1088, 660); this.tc.Size = new System.Drawing.Size(1088, 660);
this.tc.TabIndex = 8; this.tc.TabIndex = 8;
this.tc.PanelTabDisplay += new Volian.Controls.Library.StepPanelTabDisplayEvent(this.tc_PanelTabDisplay); this.tc.PanelTabDisplay += new Volian.Controls.Library.StepPanelTabDisplayEvent(this.tc_PanelTabDisplay);
this.tc.WordSectionClose += new Volian.Controls.Library.StepPanelWordSectionCloseEvent(tc_WordSectionClose);
this.tc.WordSectionDeleted += new Volian.Controls.Library.StepPanelWordSectionDeletedEvent(tc_WordSectionDeleted);
this.tc.ItemSelectedChanged += new Volian.Controls.Library.ItemSelectedChangedEvent(this.tc_ItemSelectedChanged); this.tc.ItemSelectedChanged += new Volian.Controls.Library.ItemSelectedChangedEvent(this.tc_ItemSelectedChanged);
this.tc.ModeChange += new Volian.Controls.Library.StepPanelModeChangeEvent(this.tc_StepPanelModeChange); this.tc.ModeChange += new Volian.Controls.Library.StepPanelModeChangeEvent(this.tc_StepPanelModeChange);
this.tc.LinkModifyTran += new Volian.Controls.Library.StepPanelLinkEvent(this.tc_LinkModifyTran); this.tc.LinkModifyTran += new Volian.Controls.Library.StepPanelLinkEvent(this.tc_LinkModifyTran);

View File

@ -45,12 +45,12 @@ namespace VEPROMS
if (value == null) // DSO Tab Panel if (value == null) // DSO Tab Panel
{ {
if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyItemInfo != null) // 2nd part is for unassociated libdocs if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyItemInfo != null) // 2nd part is for unassociated libdocs
SelectedDVI = tc.SelectedDisplayTabItem.MyItemInfo.MyActiveParent.ActiveParent as DocVersionInfo; SelectedDVI = tc.SelectedDisplayTabItem.MyItemInfo.ActiveParent.ActiveParent as DocVersionInfo;
else else
SelectedDVI = null; SelectedDVI = null;
} }
else // Step Tab Panel else // Step Tab Panel
SelectedDVI = value.MyStepPanel.MyProcedureItemInfo.MyProcedure.MyActiveParent as DocVersionInfo; SelectedDVI = value.MyStepPanel.MyProcedureItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
} }
} }
public DocVersionInfo SelectedDVI public DocVersionInfo SelectedDVI
@ -120,6 +120,8 @@ namespace VEPROMS
tv.Nodes.Add(tn); tv.Nodes.Add(tn);
tv.NodeOpenProperty += new vlnTreeViewPropertyEvent(tv_NodeOpenProperty); tv.NodeOpenProperty += new vlnTreeViewPropertyEvent(tv_NodeOpenProperty);
tv.NodeSelect += new Volian.Controls.Library.vlnTreeViewEvent(tv_NodeSelect); tv.NodeSelect += new Volian.Controls.Library.vlnTreeViewEvent(tv_NodeSelect);
tv.OpenItem += new vlnTreeViewItemInfoEvent(tv_OpenItem);
tv.DeleteItemInfo += new vlnTreeViewItemInfoDeleteEvent(tv_DeleteItemInfo);
_CommentTitleBckColor = epAnnotations.TitleStyle.BackColor1.Color; _CommentTitleBckColor = epAnnotations.TitleStyle.BackColor1.Color;
if (!btnAnnoDetailsPushPin.Checked) if (!btnAnnoDetailsPushPin.Checked)
epAnnotations.Expanded = false; epAnnotations.Expanded = false;
@ -127,7 +129,15 @@ namespace VEPROMS
toolsPanel.Expanded = false; toolsPanel.Expanded = false;
ribbonControl1.ExpandedChanged +=new EventHandler(ribbonControl1_ExpandedChanged); ribbonControl1.ExpandedChanged +=new EventHandler(ribbonControl1_ExpandedChanged);
} }
private bool tv_DeleteItemInfo(object sender, vlnTreeItemInfoEventArgs args)
{
return tc.DeleteStepItem(args.MyItemInfo);
//if (si == null) return false;
//si.RemoveItem();
//return true;
}
private void frmVEPROMS_FormClosing(object sender, FormClosingEventArgs e) private void frmVEPROMS_FormClosing(object sender, FormClosingEventArgs e)
{ {
// Save the location and size of the VE-PROMS appication for this user // Save the location and size of the VE-PROMS appication for this user
@ -147,12 +157,18 @@ namespace VEPROMS
if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size; if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size;
if (Settings.Default["WindowState"] != null) this.WindowState = Settings.Default.WindowState; if (Settings.Default["WindowState"] != null) this.WindowState = Settings.Default.WindowState;
_MyMRIList = MostRecentItemList.GetMRILst((System.Collections.Specialized.StringCollection)(Properties.Settings.Default["MRIList"])); _MyMRIList = MostRecentItemList.GetMRILst((System.Collections.Specialized.StringCollection)(Properties.Settings.Default["MRIList"]));
_MyMRIList.AfterRemove += new ItemInfoEvent(_MyMRIList_AfterRemove);
SetupMRU(); SetupMRU();
displaySearch1.SetupAnnotationSearch(ctrlAnnotationDetails, tc); displaySearch1.SetupAnnotationSearch(ctrlAnnotationDetails, tc);
ctrlAnnotationDetails.SetupAnnotations(displaySearch1); ctrlAnnotationDetails.SetupAnnotations(displaySearch1);
SetupButtons(); SetupButtons();
displayBookMarks.MyDisplayTabControl = tc; // allows bookmark selection to bring up steps/docs displayBookMarks.MyDisplayTabControl = tc; // allows bookmark selection to bring up steps/docs
} }
void _MyMRIList_AfterRemove(object sender)
{
SetupMRU();
}
private void SetupButtons() private void SetupButtons()
{ {
#if (DEBUG) #if (DEBUG)
@ -260,7 +276,10 @@ namespace VEPROMS
} }
this.Text = caption.ToString(); this.Text = caption.ToString();
} }
void tv_OpenItem(object sender, vlnTreeItemInfoEventArgs args)
{
tc.OpenItem(args.MyItemInfo);
}
/// <summary> /// <summary>
/// When the treeview is clicked - a timer is set /// When the treeview is clicked - a timer is set
/// This is done because the focus is returned to the treeview after the click event /// This is done because the focus is returned to the treeview after the click event
@ -292,11 +311,11 @@ namespace VEPROMS
// Check to make sure that a node has been selected and // Check to make sure that a node has been selected and
// that the mouse is within the bounds of the node. // that the mouse is within the bounds of the node.
if (tn != null && tn.Bounds.Left < newPoint.X) if (tn != null && tn.Bounds.Left < newPoint.X)
{ {
tv.SelectedNode = tn; tv.SelectedNode = tn;
tv.Enabled = false; tv.Enabled = false;
tmrTreeView.Enabled = true; tmrTreeView.Enabled = true;
} }
} }
} }
/// <summary> /// <summary>
@ -726,6 +745,22 @@ namespace VEPROMS
} }
#endregion #endregion
#region PanelSupport #region PanelSupport
private void tc_WordSectionClose(object sender, WordSectionEventArgs args)
{
if (!args.MySectionInfo.IsStepSection) tc.CloseWordItem(args.MySectionInfo);
}
private void tc_WordSectionDeleted(object sender, WordSectionEventArgs args)
{
// is it a library document - if so and libdoc panel is visible, update lists on panel.
if ((!args.MySectionInfo.IsStepSection) && ((args.MySectionInfo.MyContent.MyEntry.MyDocument.LibTitle ?? "")!="") && (toolsPanel.Expanded))
{
if (toolsTabs.SelectedTab == tabItemLibDocs)
{
displayLibDocs.RefreshLibDocPanel(tc);
}
}
}
private void tc_PanelTabDisplay(object sender, StepPanelTabDisplayEventArgs args) private void tc_PanelTabDisplay(object sender, StepPanelTabDisplayEventArgs args)
{ {
if (args.PanelTabName == "Bookmarks") if (args.PanelTabName == "Bookmarks")
@ -777,7 +812,10 @@ namespace VEPROMS
else else
{ {
if (_CurrentItem != args.MyItemInfo) if (_CurrentItem != args.MyItemInfo)
{
if (_CurrentItem != null) _CurrentItem.Deleted -= new ItemInfoEvent(_CurrentItem_Deleted);
_CurrentItem = args.MyItemInfo; _CurrentItem = args.MyItemInfo;
}
//vlnStackTrace.ShowStack("enter tc_ItemSelectedChanged {0}", _CurrentItem); //vlnStackTrace.ShowStack("enter tc_ItemSelectedChanged {0}", _CurrentItem);
if (args.MyStepItem == null) if (args.MyStepItem == null)
{ {
@ -810,6 +848,7 @@ namespace VEPROMS
displayBookMarks.MyRTB = args.MyStepItem.MyStepRTB; displayBookMarks.MyRTB = args.MyStepItem.MyStepRTB;
displayRO.ProgressBar = bottomProgBar; displayRO.ProgressBar = bottomProgBar;
lblEditView.Text = args.MyStepItem.MyStepRTB.ViewRTB ? "View" : "Edit"; lblEditView.Text = args.MyStepItem.MyStepRTB.ViewRTB ? "View" : "Edit";
_CurrentItem.Deleted += new ItemInfoEvent(_CurrentItem_Deleted);
} }
if(tc.SelectedDisplayTabItem != null) if(tc.SelectedDisplayTabItem != null)
SelectedStepTabPanel = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel; SelectedStepTabPanel = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
@ -817,6 +856,11 @@ namespace VEPROMS
ctrlAnnotationDetails.UpdateAnnotationGrid(_CurrentItem); ctrlAnnotationDetails.UpdateAnnotationGrid(_CurrentItem);
AnnotationPanelView(); AnnotationPanelView();
} }
void _CurrentItem_Deleted(object sender)
{
//displayBookMarks.DeleteItemBookMarkPanel(_CurrentItem);
}
#endregion #endregion
#region Annotations #region Annotations
/// <summary> /// <summary>