Upped revision number to 1.8
C2020-033: 2021 UPGRADE Handling of incoming transitions on delete or review
This commit is contained in:
@@ -36,6 +36,7 @@ namespace Volian.Controls.Library
|
||||
public delegate void WordSectionDeletedEvent(object sender, WordSectionEventArgs args);
|
||||
public delegate void vlnTreeViewPdfEvent(object sender, vlnTreeViewPdfArgs args);
|
||||
public delegate string vlnTreeViewGetChangeIdEvent(object sender, vlnTreeItemInfoEventArgs args);
|
||||
public delegate ItemInfo vlnTreeViewSearchIncTransEvent(object sender, vlnTreeItemInfoEventArgs args);
|
||||
public partial class vlnTreeSectionInfoEventArgs
|
||||
{
|
||||
private bool _IsDeleting = false;
|
||||
@@ -443,13 +444,13 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (NodeMove != null) NodeMove(sender, args);
|
||||
}
|
||||
public event vlnTreeViewClipboardStatusEvent ClipboardStatus;
|
||||
private ItemInfo OnClipboardStatus(object sender, vlnTreeEventArgs args)
|
||||
{
|
||||
ItemInfo rv = null;
|
||||
if (ClipboardStatus != null) rv = ClipboardStatus(sender, args);
|
||||
return rv;
|
||||
}
|
||||
public event vlnTreeViewClipboardStatusEvent ClipboardStatus;
|
||||
private ItemInfo OnClipboardStatus(object sender, vlnTreeEventArgs args)
|
||||
{
|
||||
ItemInfo rv = null;
|
||||
if (ClipboardStatus != null) rv = ClipboardStatus(sender, args);
|
||||
return rv;
|
||||
}
|
||||
public event vlnTreeViewEvent NodeCopy;
|
||||
private void OnNodeCopy(object sender, vlnTreeEventArgs args)
|
||||
{
|
||||
@@ -467,6 +468,13 @@ namespace Volian.Controls.Library
|
||||
if (NodePSI != null) return NodePSI(sender, args);
|
||||
return DialogResult.Cancel;
|
||||
}
|
||||
// C2020-033: Support the menu item to bring up Search/Incoming Transitions panel
|
||||
public event vlnTreeViewSearchIncTransEvent SearchIncTrans;
|
||||
private ItemInfo OnSearchIncTransIn(object sender, vlnTreeItemInfoEventArgs args)
|
||||
{
|
||||
if (SearchIncTrans != null) return SearchIncTrans(sender, args);
|
||||
return args.MyItemInfo;
|
||||
}
|
||||
public event vlnTreeViewSIEvent NodeSI;
|
||||
private DialogResult OnNodeSI(object sender, vlnTreeEventArgs args)
|
||||
{
|
||||
@@ -1003,12 +1011,19 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
#endregion
|
||||
//_MyLog.WarnFormat("Context Menu 6 - {0}", GC.GetTotalMemory(true));
|
||||
|
||||
#region Menu_ExternalTransitions
|
||||
// C2020-033: Support the menu item to bring up Search/Incoming Transitions panel
|
||||
ItemInfo iix = tn.VEObject as ItemInfo;
|
||||
if (iix != null)
|
||||
{
|
||||
cm.MenuItems.Add("Incoming Transitions", new EventHandler(mi_Click));
|
||||
}
|
||||
#endregion
|
||||
#region Menu_Properties
|
||||
// Add Properties to the menu unless at the very 'top' node or on a grouping (partinfo)
|
||||
// node (RNOs, Steps, Cautions, Notes) or at the step level.
|
||||
// B2020-105 Allow Set Administrators to rename folder's (sets of procedures) to which they have been given access.
|
||||
if( tn.VEObject is FolderInfo) ok = (ui.IsAdministrator() || ui.IsSetAdministrator(tn.VEObject as FolderInfo));
|
||||
if ( tn.VEObject is FolderInfo) ok = (ui.IsAdministrator() || ui.IsSetAdministrator(tn.VEObject as FolderInfo));
|
||||
else ok = (tn.VEObject is DocVersionInfo) ? (ui.IsAdministrator() || ui.IsSetAdministrator(tn.VEObject as DocVersionInfo))
|
||||
: (ui.IsAdministrator() || (tn.VEObject is ItemInfo) && (ui.IsSetAdministrator((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion)
|
||||
|| ui.IsWriter((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion)));
|
||||
@@ -1782,6 +1797,11 @@ namespace Volian.Controls.Library
|
||||
OnNodeSelect(this, new vlnTreeEventArgs(SelectedNode));
|
||||
}
|
||||
break;
|
||||
case "Incoming Transitions": // C2020-033: Support the menu item to bring up Search/Incoming Transitions panel
|
||||
VETreeNode tnx = SelectedNode as VETreeNode;
|
||||
ItemInfo iii = tnx.VEObject as ItemInfo;
|
||||
if (iii != null) OnSearchIncTransIn(this, new vlnTreeItemInfoEventArgs(iii));
|
||||
break;
|
||||
case "Properties..."://Show the properties for the selected node
|
||||
SetLastValues((VETreeNode)SelectedNode);
|
||||
SetupNodeProperties();
|
||||
@@ -3257,8 +3277,18 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
OnProcessing(false,"Delete Failed");
|
||||
OnProcessingComplete(dtStart,"Delete Failed");
|
||||
ItemInfo iii = ii.HandleSqlExceptionOnDelete(ex);
|
||||
if(iii != null) OnOpenItem(this, new vlnTreeItemInfoEventArgs(iii));
|
||||
// C2020-033: Support delete to bring up Search/Incoming Transitions panel
|
||||
if (ex.Message.Contains("has External Transitions"))
|
||||
{
|
||||
ItemInfo iis = ItemInfo.Get(ii.ItemID);
|
||||
OnSearchIncTransIn(this, new vlnTreeItemInfoEventArgs(iis));
|
||||
iis = ii.HandleSqlExceptionOnDelete(ex);
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemInfo iii = ii.HandleSqlExceptionOnDelete(ex);
|
||||
if (iii != null) OnOpenItem(this, new vlnTreeItemInfoEventArgs(iii));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user