Compare saved files with copys
This commit is contained in:
@ -92,7 +92,8 @@ 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();
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user