From 6a47db9b8dfdf66a329467e10af095cbd25a42b8 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 25 Mar 2010 11:16:47 +0000 Subject: [PATCH] --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index d022f776..75c10c6c 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -128,6 +128,8 @@ namespace VEPROMS tv.OpenItem += new vlnTreeViewItemInfoEvent(tv_OpenItem); tv.DeleteItemInfo += new vlnTreeViewItemInfoDeleteEvent(tv_DeleteItemInfo); tv.InsertItemInfo += new vlnTreeViewItemInfoInsertEvent(tv_InsertItemInfo); + tv.PasteItemInfo += new vlnTreeViewItemInfoPasteEvent(tv_PasteItemInfo); + tc.ItemPaste += new StepPanelItemPastedEvent(tc_ItemPasted); _CommentTitleBckColor = epAnnotations.TitleStyle.BackColor1.Color; if (!btnAnnoDetailsPushPin.Checked) epAnnotations.Expanded = false; @@ -149,7 +151,10 @@ namespace VEPROMS //si.RemoveItem(); //return true; } - + private bool tv_PasteItemInfo(object sender, vlnTreeItemInfoPasteEventArgs args) + { + return tc.PasteStepItem(args.MyItemInfo, args.CopyStartID, args.PasteType, (int)args.Type); + } private void frmVEPROMS_FormClosing(object sender, FormClosingEventArgs e) { // Save the location and size of the VE-PROMS appication for this user @@ -795,7 +800,17 @@ namespace VEPROMS } } } - + private void tc_ItemPasted(object sender, vlnTreeItemInfoPasteEventArgs args) + { + // all this needs to do is refresh the libdoc display - if it is visible + // and the current item is word section, i.e. it may be a lib doc & would + // require refresh of the lib doc panel. + if (toolsTabs.SelectedTab == tabItemLibDocs && args.MyItemInfo.IsSection) + { + SectionInfo si = args.MyItemInfo as SectionInfo; + if (si != null && (si.MyContent.MyEntry.MyDocument.LibTitle ?? "") != "") displayLibDocs.RefreshLibDocPanel(tc); + } + } private void tc_PanelTabDisplay(object sender, StepPanelTabDisplayEventArgs args) { if (args.PanelTabName == "Bookmarks")