public static void DisplayProblemToUser(string message, params object[] args)
{
var forms = Application.OpenForms;
for (int i = 0; i < forms.Count; ++i)
{
var s = forms [i] as Bloom.Shell;
if (s != null && s.InvokeRequired)
{
var d = new Shell.NotifyTheUserOfProblem(SIL.Reporting.ErrorReport.NotifyUserOfProblem);
s.Invoke(d, new object[] { message, args });
return;
}
}
SIL.Reporting.ErrorReport.NotifyUserOfProblem(message, args);
}