private void BtnTableaux_Click(object sender, EventArgs e) { SemanticTableux.nextNodes.Clear(); StreamWriter sw = new StreamWriter("tableux.dot"); //Writing label and formatting sw.WriteLine("graph logic {"); sw.WriteLine(" node [ fontname = \"Arial\" shape=box ]"); // SemanticTableux st = new SemanticTableux(processObject.getProposition(), 1, null); foreach (SemanticTableux s in SemanticTableux.nextNodes) { sw.Write(s.getGraphvizString()); } //Warping up the file sw.WriteLine(""); sw.WriteLine("}"); sw.Close(); // Process dot = new Process(); dot.StartInfo.FileName = @"C:\Program Files (x86)\Graphviz2.38\bin\dot.exe"; dot.StartInfo.Arguments = "-Tpng -o tableux.png tableux.dot"; dot.Start(); dot.WaitForExit(); Process.Start("tableux.png"); }
public void DrawGraph() { if (isSplit) { SemanticTableux next = new SemanticTableux(leftProducts[0], currentNode * 2, null); SemanticTableux nextRight = new SemanticTableux(rightProducts[0], currentNode * 2 + 1, null); } else if (leftProducts.Count != 0) { SemanticTableux next = new SemanticTableux(leftProducts[0], currentNode * 2, rightProducts); } }