B2017-243 added Cannot Paste menu items that will display a message box with more information explaining why the paste cannot be done

This commit is contained in:
John Jenko 2017-10-25 14:12:00 +00:00
parent f624bd2487
commit 8c37fd9fe4

View File

@ -1417,6 +1417,15 @@ namespace Volian.Controls.Library
if (prCanPaste) cm.MenuItems.Add("Paste Procedure Before", new EventHandler(mi_Click));
if (okToReplace && prCanPaste) cm.MenuItems.Add("Replace Existing Procedure", new EventHandler(mi_Click));
if (prCanPaste) cm.MenuItems.Add("Paste Procedure After", new EventHandler(mi_Click));
// B2017-243 added the following two Cannot Paste menu items when dealing with enhanced documents
// when then user selects these menu items a message box will appear giving more information as to why it cannot be pasted
if (!prCanPaste)
{
if (prToIsEnhanced)
cm.MenuItems.Add("CANNOT PASTE HERE, Click for more information...", new EventHandler(mi_Click));
else
cm.MenuItems.Add("CANNOT PASTE HERE. Click for more information...", new EventHandler(mi_Click));
}
}
#endregion
#region Menu_Paste_ToProcedureFromSection
@ -1741,6 +1750,16 @@ namespace Volian.Controls.Library
case "Create Continuous Action Summary":
OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null,0));
break;
// B2017-243 added the following two Cannot Paste items when dealing with enhanced documents
// when then user selects these menu items a message box will appear giving more information as to why it cannot be pasted
case "CANNOT PASTE HERE. Click for more information...":
MessageBox.Show("You have copied a document that is linked to an Enhanced Document.\n\n" +
"It can only be pasted before or after another document, within the set, that is linked to an Enhanced Document.", "Cannot Paste Here");
break;
case "CANNOT PASTE HERE, Click for more information...":
MessageBox.Show("You have copied a document that is NOT linked to an Enhanced Document.\n\n" +
"It CANNOT be pasted before or after an Enhanced Document.", "Cannot Paste Here");
break;
//case "Check Out Procedure Set":
// CheckOutDocVersion(SelectedNode as VETreeNode);
// break;