SetVertexSelected() public method

public SetVertexSelected ( IVertex vertex, System.Boolean selected, System.Boolean alsoIncidentEdges ) : void
vertex IVertex
selected System.Boolean
alsoIncidentEdges System.Boolean
return void
Ejemplo n.º 1
0
        btnSetVertexSelected_Click
        (
            object sender,
            EventArgs e
        )
        {
            try
            {
                Int32 iVertexID = Int32.Parse(txbVertexID.Text);

                IVertex oVertex;

                if (!m_oNodeXLControl.Graph.Vertices.Find(
                        iVertexID, out oVertex))
                {
                    throw new ArgumentException("No such ID.");
                }

                m_oNodeXLControl.SetVertexSelected(oVertex,
                                                   chkVertexSelected.Checked, chkAlsoIncidentEdges.Checked);
            }
            catch (Exception oException)
            {
                MessageBox.Show(oException.Message);
            }
        }