/// <summary> /// 加入多個頂點並以,作為區隔 /// </summary> /// <param name="values"></param> public void addVertexs(string values) { foreach (string value in values.Split(',')) { Vertex vertex = new Vertex(value.Trim()); vertexs.Add(vertex); } }
/// <summary> /// 加入一個頂點 /// </summary> /// <param name="value"></param> public void addVertex(string value) { Vertex vertex = new Vertex(value.Trim()); vertexs.Add(vertex); }
/// <summary> /// 製作copyVertexlist複本 /// </summary> /// <param name="vertexsList"></param> /// <returns></returns> private List<Vertex> copyVertexList(List<Vertex> vertexsList) { List<Vertex> copyVertexsList = new List<Vertex>(); foreach (Vertex vertex in vertexsList) { Vertex copyVertex = new Vertex(); copyVertex.isSearch = vertex.isSearch; copyVertex.value = vertex.value; copyVertexsList.Add(copyVertex); } return copyVertexsList; }