WorksheetContextMenuManager_RequestVertexCommandEnable
(
Object sender,
RequestVertexCommandEnableEventArgs e
)
{
AssertValid();
// Get the vertex corresponding to the row the user right-clicked in
// the vertex worksheet. This can be null.
IVertex oClickedVertex =
WorksheetContextMenuManagerRowIDToVertex(e.VertexRowID);
Boolean bEnableSelectAllVertices, bEnableDeselectAllVertices,
bEnableSelectAdjacentVertices, bEnableDeselectAdjacentVertices,
bEnableSelectIncidentEdges, bEnableDeselectIncidentEdges,
bEnableEditVertexAttributes, bEnableSelectSubgraphs;
GetVertexCommandEnableFlags(oClickedVertex,
out bEnableSelectAllVertices,
out bEnableDeselectAllVertices,
out bEnableSelectAdjacentVertices,
out bEnableDeselectAdjacentVertices,
out bEnableSelectIncidentEdges,
out bEnableDeselectIncidentEdges,
out bEnableEditVertexAttributes,
out bEnableSelectSubgraphs
);
e.EnableSelectAllVertices = bEnableSelectAllVertices;
e.EnableDeselectAllVertices = bEnableDeselectAllVertices;
e.EnableSelectAdjacentVertices = bEnableSelectAdjacentVertices;
e.EnableDeselectAdjacentVertices = bEnableDeselectAdjacentVertices;
e.EnableSelectIncidentEdges = bEnableSelectIncidentEdges;
e.EnableDeselectIncidentEdges = bEnableDeselectIncidentEdges;
e.EnableEditVertexAttributes = bEnableEditVertexAttributes;
e.EnableSelectSubgraphs = bEnableSelectSubgraphs;
}