Smrf.NodeXL.ExcelTemplate.TaskPane.RunEdgeCommand C# (CSharp) Method

RunEdgeCommand() protected method

protected RunEdgeCommand ( RunEdgeCommandEventArgs e ) : void
e RunEdgeCommandEventArgs
return void
    RunEdgeCommand
    (
        RunEdgeCommandEventArgs e
    )
    {
        AssertValid();

        // Ge the edge corresponding to the row the user right-clicked in the
        // edge worksheet.  This can be null.

        IEdge oClickedEdge = WorksheetContextMenuManagerRowIDToEdge(
            e.EdgeRowID);

        WorksheetContextMenuManager.EdgeCommand eEdgeCommand = e.EdgeCommand;

        switch (eEdgeCommand)
        {
            case WorksheetContextMenuManager.EdgeCommand.SelectAllEdges:
            case WorksheetContextMenuManager.EdgeCommand.DeselectAllEdges:

                SelectAllEdges(eEdgeCommand ==
                    WorksheetContextMenuManager.EdgeCommand.SelectAllEdges);

                break;

            case WorksheetContextMenuManager.EdgeCommand.
                SelectAdjacentVertices:

            case WorksheetContextMenuManager.EdgeCommand.
                DeselectAdjacentVertices:

                if (oClickedEdge != null)
                {
                    SelectAdjacentVertices(oClickedEdge, 
                        eEdgeCommand == WorksheetContextMenuManager.
                            EdgeCommand.SelectAdjacentVertices);
                }

                break;

            default:

                Debug.Assert(false);
                break;
        }
    }
TaskPane