Possible Duplicate:
shutdown wpf while messagebox open
I currently have code like this, but the problem is that even after I show the error in a MessageBox
provided by NLog
, I want to shut down the app, so the user can fix the problem, but the app continues after they click OK in the message box.
private void Load(string fileName)
{
try
{
var environments = GetEnvironments(fileName);
}
catch (FileNotFoundException ex)
{
logger.Error(ex.StackTrace);
}
catch (Exception ex)
{
logger.Error(ex.StackTrace);
}
}