private static void DisplayProblem(Exception e, string message)
{
var action = new Action(() => SIL.Reporting.ErrorReport.NotifyUserOfProblem(e, message));
var shellWindow = ShellWindow;
if (shellWindow != null)
shellWindow.Invoke(action);
else
action.Invoke();
}