I'm not entirely certain what your final goal is, but if you want to keep track of different nodes and allow the user to interact with them then your going to need to set up a few data structures for each of the nodes (or circles) that you have in your panel.
So if you had something like:
class MyNode
{
Point Pos;
int Radius;
int NodeID;
List<mynode> LinkedNodes;
}</mynode>
Then you'd create instanced of this class for each node you have and draw them to your panel. You can then use the mouse events on the panel to check when the mouse is pressed and released and find which node is being selected by checking to see if the distance between the mouse position and the nodes position is less than the radius.
UPDATE: To check specifically if the line intersects two circles then your going to need to know the start and end point of the line, otherwise it's going to be rather tough to check if it intersects your circles or not (not impossible though) and to determine which nodes the circles actually represent.
So if you had a list or array of nodes then you could do something like this:
MyNode startnode = null;
MyNode endnode = null;
Point lineStartPoint;
Point lineEndPoint;
foreach(MyNode testNode in MyBigListOfNodes)
{
Vector dist_vector = Point.Subtract(lineStartPoint, testNode.Pos);
if(dist_vector.Length < testNode.Radius)
{
startnode = testNode;
break;
}
}
foreach(MyNode testNode in MyBigListOfNodes)
{
Vector dist_vector = Point.Subtract(lineEndPoint, testNode.Pos);
if(dist_vector.Length < testNode.Radius)
{
endnode = testNode;
break;
}
}
if(startnode != null && endnode != null)
{
}