protected override void OnPaint(PaintEventArgs e) { for (int i = 0; i < Controls.Count; i++) { LinkLineNode node = Controls[i] as LinkLineNode; if (node != null) { node.DrawLine(e.Graphics); } } }