diff --git a/GitVersionTree/Forms/MainForm.cs b/GitVersionTree/Forms/MainForm.cs index c1a55af..de202a1 100644 --- a/GitVersionTree/Forms/MainForm.cs +++ b/GitVersionTree/Forms/MainForm.cs @@ -16,7 +16,7 @@ public partial class MainForm : Form { private Dictionary DecorateDictionary = new Dictionary(); private List> Nodes = new List>(); - + private string DotFilename = Directory.GetParent(Application.ExecutablePath) + @"\" + Application.ProductName + ".dot"; private string PdfFilename = Directory.GetParent(Application.ExecutablePath) + @"\" + Application.ProductName + ".pdf"; private string LogFilename = Directory.GetParent(Application.ExecutablePath) + @"\" + Application.ProductName + ".log"; @@ -108,7 +108,7 @@ private void HomepageLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEv { Process.Start("https://github.com/crc8/GitVersionTree"); } - + private void ExitButton_Click(object sender, EventArgs e) { Close(); @@ -323,7 +323,7 @@ private void Generate() DotStringBuilder.Append(" subgraph Decorate" + DecorateCount + "\r\n"); DotStringBuilder.Append(" {\r\n"); DotStringBuilder.Append(" rank=\"same\";\r\n"); - if (DecorateKeyValuePair.Value.Trim().Substring(0, 5) == "(tag:") + if (DecorateKeyValuePair.Value.Trim().StartsWith("(tag:")) { DotStringBuilder.Append(" \"" + DecorateKeyValuePair.Value.Trim() + "\" [shape=\"box\", style=\"filled\", fillcolor=\"#ffffdd\"];\r\n"); } @@ -344,18 +344,18 @@ private void Generate() DotProcess.StartInfo.CreateNoWindow = true; DotProcess.StartInfo.RedirectStandardOutput = true; DotProcess.StartInfo.FileName = GraphvizDotPathTextBox.Text; - DotProcess.StartInfo.Arguments = "\"" + @DotFilename + "\" -Tpdf -Gsize=10,10 -o\"" + @PdfFilename + "\""; + DotProcess.StartInfo.Arguments = "\"" + @DotFilename + "\" -Tpdf -o\"" + @PdfFilename + "\""; DotProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; DotProcess.Start(); DotProcess.WaitForExit(); - DotProcess.StartInfo.Arguments = "\"" + @DotFilename + "\" -Tps -o\"" + @PdfFilename.Replace(".pdf", ".ps") + "\""; - DotProcess.Start(); - DotProcess.WaitForExit(); - if (DotProcess.ExitCode == 0) - { - if (File.Exists(@PdfFilename)) - { + //DotProcess.StartInfo.Arguments = "\"" + @DotFilename + "\" -Tps -o\"" + @PdfFilename.Replace(".pdf", ".ps") + "\""; + //DotProcess.Start(); + //DotProcess.WaitForExit(); + //if (DotProcess.ExitCode == 0) + //{ + //if (File.Exists(@PdfFilename)) + //{ #if (!DEBUG) /* Process ViewPdfProcess = new Process(); @@ -365,12 +365,12 @@ private void Generate() //Close(); */ #endif - } - } - else - { - Status("Version tree generation failed ..."); - } + //} + //} + //else + //{ + //Status("Version tree generation failed ..."); + //} Status("Done! ..."); }