Compare saved files with copys
This commit is contained in:
@ -92,10 +92,11 @@ namespace CobXmlSupport
|
|||||||
{
|
{
|
||||||
ShowCode FileWin = new ShowCode();
|
ShowCode FileWin = new ShowCode();
|
||||||
FileWin.Parent = null;
|
FileWin.Parent = null;
|
||||||
FileWin.Labeltext = usageName;
|
//FileWin.Labeltext = usageName;
|
||||||
|
FileWin.Labeltext = fname;
|
||||||
FileWin.CodeShower.Text = File.ReadAllText(fname);
|
FileWin.CodeShower.Text = File.ReadAllText(fname);
|
||||||
FileWin.ShowDialog();
|
FileWin.ShowDialog();
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -24,6 +24,7 @@ namespace CobXmlSupport
|
|||||||
string oldTxt;
|
string oldTxt;
|
||||||
bool bSynch;
|
bool bSynch;
|
||||||
string finalFileSafe;
|
string finalFileSafe;
|
||||||
|
string wholeFilePath;
|
||||||
|
|
||||||
public savedFile SavedFile { get; set; }
|
public savedFile SavedFile { get; set; }
|
||||||
|
|
||||||
@ -56,8 +57,12 @@ namespace CobXmlSupport
|
|||||||
|
|
||||||
public string Labeltext
|
public string Labeltext
|
||||||
{
|
{
|
||||||
get { return lblCodeType.Text; }
|
get { return wholeFilePath; }
|
||||||
set { lblCodeType.Text = value; }
|
set
|
||||||
|
{
|
||||||
|
wholeFilePath = value;
|
||||||
|
lblCodeType.Text = wholeFilePath.Substring(wholeFilePath.LastIndexOf("\\")+1); ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private GenCobCode parentWindow;
|
private GenCobCode parentWindow;
|
||||||
@ -346,16 +351,22 @@ namespace CobXmlSupport
|
|||||||
if (parentWindow == null)
|
if (parentWindow == null)
|
||||||
{
|
{
|
||||||
btnSaveAktualText.Enabled = false;
|
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)
|
private void btnCompare_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
try
|
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);
|
Process.Start("C:\\Program Files (x86)\\WinMerge\\WinMergeU.exe", finalFileSafe + " Q:\\kII20\\cpy\\" + existing);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user