//构造函数
 public MetroLink(MetroNode node1, MetroNode node2, MetroLine line, int flag)
 {
     this.Node1 = node1;
         this.Node2 = node2;
         this.Line = line;
         this.Flag = flag;
 }
 //添加站点
 public bool addNode(MetroNode newNode)
 {
     try
         {
             _mNodes.Add(newNode);
         }
         catch (System.Exception ex)
         {
             return false;
         }
         return true;
 }
 //删除站点
 public bool deleteNode(MetroNode killNode)
 {
     try
         {
             _mNodes.Remove(killNode);
         }
         catch (System.Exception ex)
         {
             return false;
         }
         return true;
 }
 //构造函数
 public MetroPath(MetroNode start, MetroNode end,int total)
 {
     startNode = start;
         endNode = end;
         totalWeight = total;
 }
 //判断路径是否与规定站点直接关联
 public bool IsContainNode(MetroNode searchNode)
 {
     if (this.Node1 == searchNode || this.Node2 == searchNode)
             return true;
         return false;
 }