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

WorksheetContextMenuManager() public méthode

Initializes a new instance of the class.
public WorksheetContextMenuManager ( Microsoft workbook, Microsoft edgeWorksheet, Microsoft edgeTable, Microsoft vertexWorksheet, Microsoft vertexTable, Microsoft groupWorksheet, Microsoft groupTable ) : System
workbook Microsoft /// Excel workbook. ///
edgeWorksheet Microsoft /// The edge worksheet in the Excel workbook. ///
edgeTable Microsoft /// The edge table on the edge worksheet. ///
vertexWorksheet Microsoft /// The vertex worksheet in the Excel workbook. ///
vertexTable Microsoft /// The vertex table on the vertex worksheet. ///
groupWorksheet Microsoft /// The group worksheet in the Excel workbook. ///
groupTable Microsoft /// The group table on the group worksheet. ///
Résultat System
    public WorksheetContextMenuManager
    (
        Microsoft.Office.Tools.Excel.WorkbookBase workbook,
        Microsoft.Office.Tools.Excel.WorksheetBase edgeWorksheet,
        Microsoft.Office.Tools.Excel.ListObject edgeTable,
        Microsoft.Office.Tools.Excel.WorksheetBase vertexWorksheet,
        Microsoft.Office.Tools.Excel.ListObject vertexTable,
        Microsoft.Office.Tools.Excel.WorksheetBase groupWorksheet,
        Microsoft.Office.Tools.Excel.ListObject groupTable
    )
    {
        Debug.Assert(workbook != null);
        Debug.Assert(edgeWorksheet != null);
        Debug.Assert(edgeTable != null);
        Debug.Assert(vertexWorksheet != null);
        Debug.Assert(vertexTable != null);
        Debug.Assert(groupWorksheet != null);
        Debug.Assert(groupTable != null);

        m_oWorkbook = workbook;
        m_oEdgeTable = edgeTable;
        m_oVertexTable = vertexTable;
        m_oGroupTable = groupTable;

        // Handle the events involved in adding, handling, and removing custom
        // menu items.

        workbook.Deactivate += new Microsoft.Office.Interop.
            Excel.WorkbookEvents_DeactivateEventHandler(
                this.Workbook_Deactivate);

        edgeWorksheet.Deactivate += new Microsoft.Office.Interop.
            Excel.DocEvents_DeactivateEventHandler(this.Worksheet_Deactivate);

        vertexWorksheet.Deactivate += new Microsoft.Office.Interop.
            Excel.DocEvents_DeactivateEventHandler(this.Worksheet_Deactivate);

        groupWorksheet.Deactivate += new Microsoft.Office.Interop.
            Excel.DocEvents_DeactivateEventHandler(this.Worksheet_Deactivate);

        edgeTable.BeforeRightClick += new Microsoft.Office.Interop.Excel.
            DocEvents_BeforeRightClickEventHandler(EdgeTable_BeforeRightClick);

        vertexTable.BeforeRightClick += new Microsoft.Office.Interop.Excel.
            DocEvents_BeforeRightClickEventHandler(
                VertexTable_BeforeRightClick);

        groupTable.BeforeRightClick += new Microsoft.Office.Interop.Excel.
            DocEvents_BeforeRightClickEventHandler(
                GroupTable_BeforeRightClick);
    }