Provides event information for events involving a vertex.
Inheritance: System.EventArgs
コード例 #1
0
 m_oNodeXLControl_VertexMouseHover
 (
     object sender,
     VertexEventArgs vertexEventArgs
 )
 {
     AddToStatus("VertexMouseHover: " + vertexEventArgs.Vertex);
 }
コード例 #2
0
 m_oNodeXLControl_VertexDoubleClick
 (
     object sender,
     VertexEventArgs vertexEventArgs
 )
 {
     AddToStatus("VertexDoubleClick: " + vertexEventArgs.Vertex);
 }
コード例 #3
0
    m_oNodeXLControl_VertexClick
    (
        object sender,
        VertexEventArgs vertexEventArgs
    )
    {
        AddToStatus("VertexClick: " + vertexEventArgs.Vertex);

        #if false

        // Retrieve the clicked vertex.

        IVertex oClickedVertex = vertexEventArgs.Vertex;

        // Get a new image for the vertex.

        oClickedVertex.SetValue( ReservedMetadataKeys.PerVertexImage,
            new System.Windows.Media.Imaging.BitmapImage(
                new Uri("C:\\Temp\\1.jpg") ) );

        // m_oNodeXLControl.ForceRedraw();

        #endif
    }
コード例 #4
0
    VertexCollection_VertexRemoved
    (
        Object oSender,
        VertexEventArgs oVertexEventArgs
    )
    {
        if ( oSender == null || !(oSender is VertexCollection) )
        {
            throw new ApplicationException(
                "VertexRemoved event provided incorrect oSender argument."
                );
        }

        m_bVertexRemoved = true;

        m_oRemovedVertex = oVertexEventArgs.Vertex;
    }
コード例 #5
0
    SetUp()
    {
        m_oVertex = new Vertex();

        m_oVertexEventArgs = new VertexEventArgs(m_oVertex);
    }
コード例 #6
0
    TestConstructorBad()
    {
        // Null argument.

        try
        {
            m_oVertexEventArgs = new VertexEventArgs(null);
        }
        catch (ArgumentNullException oArgumentNullException)
        {
            Assert.AreEqual(

                "Smrf.NodeXL.Core."
                + "VertexEventArgs.Constructor: vertex argument can't be"
                + " null.\r\n"
                + "Parameter name: vertex"
                ,
                oArgumentNullException.Message
                );

            throw oArgumentNullException;
        }
    }