diff --git a/CobXmlSupport/CheckWorkItems.cs b/CobXmlSupport/CheckWorkItems.cs index 9c479d9..2779196 100644 --- a/CobXmlSupport/CheckWorkItems.cs +++ b/CobXmlSupport/CheckWorkItems.cs @@ -92,10 +92,11 @@ namespace CobXmlSupport { ShowCode FileWin = new ShowCode(); FileWin.Parent = null; - FileWin.Labeltext = usageName; + //FileWin.Labeltext = usageName; + FileWin.Labeltext = fname; FileWin.CodeShower.Text = File.ReadAllText(fname); FileWin.ShowDialog(); - + } catch (Exception ex) { diff --git a/CobXmlSupport/ShowCode.cs b/CobXmlSupport/ShowCode.cs index 0ec0ba0..cfb0480 100644 --- a/CobXmlSupport/ShowCode.cs +++ b/CobXmlSupport/ShowCode.cs @@ -24,6 +24,7 @@ namespace CobXmlSupport string oldTxt; bool bSynch; string finalFileSafe; + string wholeFilePath; public savedFile SavedFile { get; set; } @@ -56,8 +57,12 @@ namespace CobXmlSupport public string Labeltext { - get { return lblCodeType.Text; } - set { lblCodeType.Text = value; } + get { return wholeFilePath; } + set + { + wholeFilePath = value; + lblCodeType.Text = wholeFilePath.Substring(wholeFilePath.LastIndexOf("\\")+1); ; + } } private GenCobCode parentWindow; @@ -346,16 +351,22 @@ namespace CobXmlSupport if (parentWindow == null) { btnSaveAktualText.Enabled = false; + finalFileSafe = wholeFilePath; + btnCompare.Enabled = true; + } + else + { + btnSaveAktualText.Enabled = true; + btnCompare.Enabled = false; } - else btnSaveAktualText.Enabled = true; - btnCompare.Enabled = false; } private void btnCompare_Click(object sender, EventArgs e) { try { - string existing = finalFileSafe.Substring(finalFileSafe.LastIndexOf("\\")); + + string existing = finalFileSafe.Substring(finalFileSafe.LastIndexOf("\\")+1); Process.Start("C:\\Program Files (x86)\\WinMerge\\WinMergeU.exe", finalFileSafe + " Q:\\kII20\\cpy\\" + existing); } catch (Exception ex)