/// <summary> /// 绘制地铁线路图。 /// </summary> /// <param name="g">绘图图面。</param> /// <param name="graph">地铁线路图。</param> private void PaintGraph(Graphics g, MetroGraph graph) { //绘制地铁路径 foreach (var link in graph.Links.Where(c => c.Flag >= 0)) { PaintLink(g, link); } //绘制地铁站点 foreach (var node in graph.Nodes) { PaintNode(g, node); } }