public void GenereteDotFileOfSnapshot(int ind) { DirectoryInfo directoryInfo = new DirectoryInfo(Directory.GetCurrentDirectory()); for (int i = 0; i < 4; i++) { directoryInfo = directoryInfo.Parent; } String dotFilePath = directoryInfo.FullName + "\\dotFiles"; if (!Directory.Exists(dotFilePath)) { Directory.CreateDirectory(dotFilePath); } //String projectPath = Directory.GetParent( Directory.GetParent(Environment.CurrentDirectory).FullName).FullName; string dotFile = dotFilePath + "\\snapshot"+ind+".dot"; using (System.IO.StreamWriter file = new System.IO.StreamWriter(dotFile, false)) { file.WriteLine("digraph snapshot {"); foreach (CEDescr e in this.AllEdges) { string name1, name2; name1 = e.VBegin.props.Name.Replace(",", "").Replace(":", "").Replace("(", "").Replace(")", "").Replace(" ", ""); name2 = e.VEnd.props.Name.Replace(",", "").Replace(":", "").Replace("(", "").Replace(")", "").Replace(" ", ""); file.WriteLine("\t" + name1 + " -> " + name2 + ";"); } file.WriteLine("labelloc = \"t\""); file.WriteLine("label = \"snapshot\""); file.WriteLine("}"); }