protected void RestoreSelectedVertexes() { IVertex sv = Vertex.Get("SelectedEdges:"); if (tempSelectedVertexes != null) { GraphUtil.RemoveAllEdges(sv); GraphUtil.CopyEdges(tempSelectedVertexes, sv); } }
public Window2() { InitializeComponent(); MinusZero m = MinusZero.Instance; IVertex r = m.Root.AddVertex(null, "0"); GeneralUtil.ParseAndExcute(r, null, "{\"meta1\"{test1{test11,test12}},meta2{test2},meta3{test3}}"); for (int zzz = 0; zzz < 5; zzz++) { for (int x = 1; x <= 10; x++) { IVertex rr = r.AddVertex(null, "node " + x); for (int xx = 1; xx <= 5; xx++) { IVertex rrr = rr.AddVertex(null, "2node " + xx); for (int xxx = 1; xxx <= 3; xxx++) { rrr.AddVertex(null, "3node " + zzz); } //rrr.AddVertex(GraphUtil.DeepFindOneByValue(r, "meta" + xxx), "a"); } } } IVertex tmp = m.GetTempVertex(); GraphUtil.CopyEdges(r, tmp); GraphUtil.ReplaceEdge(this.simpleListVisualiser1.Vertex, "BaseVertex", r); GraphUtil.ReplaceEdge(this.simpleListVisualiser1.Vertex, "SelectedVertexes", tmp); }
protected void CopySelectedVertexesToTemp() { tempSelectedVertexes = MinusZero.Instance.CreateTempVertex(); GraphUtil.CopyEdges(Vertex.Get("SelectedEdges:"), tempSelectedVertexes); }