string theDotEngineUsed = "sfdp"; Dictionary<string, string> allDotEngine = new Dictionary<string, string>(); this.allDotEngine.Add("sfdp", Path.Combine(Path.GetDirectoryName(Application.ExecutablePath).ToString(), @"sfdp.exe")); this.allDotEngine.Add("dot", Path.Combine(Path.GetDirectoryName(Application.ExecutablePath).ToString(), @"dot.exe")); this.allDotEngine.Add("neato", Path.Combine(Path.GetDirectoryName(Application.ExecutablePath).ToString(), @"neato.exe")); this.allDotEngine.Add("twopi", Path.Combine(Path.GetDirectoryName(Application.ExecutablePath).ToString(), @"twopi.exe")); string pathDotGraph = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath).ToString(), @"OUTPUTS\graph.dot"); string pathDotGraphPlain = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath).ToString(), @"OUTPUTS\graph.plain");
Process henryToolProcess = new Process(); henryToolProcess.StartInfo.FileName = this.allDotEngine[this.theDotEngineUsed]; henryToolProcess.StartInfo.Arguments = "-Tplain -o"" + MainForm.pathDotGraphPlain + "" -K" + this.theDotEngineUsed + " " + MainForm.pathDotGraph; henryToolProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; henryToolProcess.Start(); henryToolProcess.WaitForExit();
Sinon, j'ai fait des essais de mon coté: avec quickgraph, j'arrive a générer un fichier .dot représentatif de mon arbre.
Par contre, je ne sais pas comment demander quickgraph d'utiliser ce fichier (je souhaite éviter de devoir lancer Graphviz.exe a coté. Graphviz peut sortir: jpeg, svg, pdf.... et de text!!!! ('plain' : Tapez le texte de l'url ici.).
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question