Compare saved files with copys

This commit is contained in:
2015-09-16 11:37:38 +02:00
parent a34676d971
commit 8deea75b47
2 changed files with 19 additions and 7 deletions

View File

@ -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)