//************************************************************************* // Constructor: RunEdgeCommandEventArgs() // /// <summary> /// Initializes a new instance of the <see /// cref="RunEdgeCommandEventArgs" /> class. /// </summary> /// /// <param name="edgeRowID"> /// Row ID of the edge that was right-clicked in the edge table in the edge /// worksheet, or <see cref="WorksheetContextMenuManager.NoRowID" /> if /// an edge wasn't right-clicked. This is a row ID that is stored in the /// worksheet, NOT an IEdge.ID value. /// </param> /// /// <param name="edgeCommand"> /// Command to run. /// </param> //************************************************************************* public RunEdgeCommandEventArgs( Int32 edgeRowID, WorksheetContextMenuManager.EdgeCommand edgeCommand ) { m_iEdgeRowID = edgeRowID; m_eEdgeCommand = edgeCommand; AssertValid(); }
//************************************************************************* // Constructor: RunVertexCommandEventArgs() // /// <summary> /// Initializes a new instance of the <see /// cref="RunVertexCommandEventArgs" /> class. /// </summary> /// /// <param name="vertexRowID"> /// Row ID of the vertex that was right-clicked in the vertex table in the /// vertex worksheet, or <see cref="WorksheetContextMenuManager.NoRowID" /> /// if a vertex wasn't right-clicked. This is a row ID that is stored in /// the worksheet, NOT an IEdge.ID value. /// </param> /// /// <param name="vertexCommand"> /// Command to run. /// </param> //************************************************************************* public RunVertexCommandEventArgs( Int32 vertexRowID, WorksheetContextMenuManager.VertexCommand vertexCommand ) { m_iVertexRowID = vertexRowID; m_eVertexCommand = vertexCommand; AssertValid(); }
//************************************************************************* // Method: Workbook_Startup() // /// <summary> /// Handles the Startup event on the workbook. /// </summary> /// /// <param name="sender"> /// Standard event argument. /// </param> /// /// <param name="e"> /// Standard event argument. /// </param> //************************************************************************* private void ThisWorkbook_Startup( object sender, System.EventArgs e ) { m_bTaskPaneCreated = false; m_bCloseExcelWhenWorkbookCloses = false; // If this is an older NodeXL workbook, update the worksheet, table, // and column names if neccessary. NodeXLWorkbookUpdater.UpdateNames(this.InnerObject); Sheet1 oSheet1 = Globals.Sheet1; Sheet2 oSheet2 = Globals.Sheet2; Sheet5 oSheet5 = Globals.Sheet5; m_oWorksheetContextMenuManager = new WorksheetContextMenuManager( this, oSheet1, oSheet1.Edges, oSheet2, oSheet2.Vertices, oSheet5, oSheet5.Groups); // In message boxes, show the name of this document customization // instead of the default, which is the name of the Excel application. FormUtil.ApplicationName = ApplicationUtil.ApplicationName; this.New += new Microsoft.Office.Tools.Excel.WorkbookEvents_NewEventHandler( ThisWorkbook_New); this.ActivateEvent += new Microsoft.Office.Interop.Excel.WorkbookEvents_ActivateEventHandler( ThisWorkbook_ActivateEvent); this.SheetActivate += new WorkbookEvents_SheetActivateEventHandler( ThisWorkbook_SheetActivate); // Show the NodeXL graph by default. this.GraphVisibility = true; AssertValid(); }