Smrf.NodeXL.ExcelTemplate.WorksheetContextMenuManager.AddContextMenuSeparator C# (CSharp) Méthode

AddContextMenuSeparator() protected méthode

protected AddContextMenuSeparator ( CommandBar oTableContextCommandBar, System.Boolean bAdd ) : void
oTableContextCommandBar System.Windows.Forms.CommandBar
bAdd System.Boolean
Résultat void
    AddContextMenuSeparator
    (
        CommandBar oTableContextCommandBar,
        Boolean bAdd
    )
    {
        Debug.Assert(oTableContextCommandBar != null);
        AssertValid();

        // The button at the top of Excel's standard menu is Cut.

        const Int32 CutCommandID = 21;

        CommandBarButton oCutButton =
            (CommandBarButton)oTableContextCommandBar.FindControl(
                Missing.Value, CutCommandID, Missing.Value, Missing.Value,
                false);

        if (oCutButton != null)
        {
            oCutButton.BeginGroup = bAdd;
        }
    }