error handling on start compare
This commit is contained in:
@ -338,6 +338,7 @@ namespace CobXmlSupport
|
|||||||
saveWin.FileData = this.txtCode.Text;
|
saveWin.FileData = this.txtCode.Text;
|
||||||
saveWin.ShowDialog();
|
saveWin.ShowDialog();
|
||||||
finalFileSafe = saveWin.finalFileName;
|
finalFileSafe = saveWin.finalFileName;
|
||||||
|
btnCompare.Enabled = (finalFileSafe.Trim() != "");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ShowCode_Load(object sender, EventArgs e)
|
private void ShowCode_Load(object sender, EventArgs e)
|
||||||
@ -347,12 +348,20 @@ namespace CobXmlSupport
|
|||||||
btnSaveAktualText.Enabled = false;
|
btnSaveAktualText.Enabled = false;
|
||||||
}
|
}
|
||||||
else btnSaveAktualText.Enabled = true;
|
else btnSaveAktualText.Enabled = true;
|
||||||
|
btnCompare.Enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnCompare_Click(object sender, EventArgs e)
|
private void btnCompare_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
string existing = finalFileSafe.Substring(finalFileSafe.LastIndexOf("\\"));
|
string existing = finalFileSafe.Substring(finalFileSafe.LastIndexOf("\\"));
|
||||||
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)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Problem vid starta WinMerge :" + ex.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user