Bloom.NonFatalProblem.ShowToast C# (CSharp) Method

ShowToast() private static method

private static ShowToast ( string shortUserLevelMessage, Exception exception, string fullDetailedMessage ) : void
shortUserLevelMessage string
exception System.Exception
fullDetailedMessage string
return void
        private static void ShowToast(string shortUserLevelMessage, Exception exception, string fullDetailedMessage)
        {
            var formForSynchronizing = Application.OpenForms.Cast<Form>().Last();
            if (formForSynchronizing.InvokeRequired)
            {
                formForSynchronizing.BeginInvoke(new Action(() =>
                {
                    ShowToast(shortUserLevelMessage, exception, fullDetailedMessage);
                }));
                return;
            }
            var toast = new ToastNotifier();
            toast.ToastClicked +=
                (s, e) => { SIL.Reporting.ErrorReport.ReportNonFatalExceptionWithMessage(exception, fullDetailedMessage); };
            toast.Image.Image = ToastNotifier.WarningBitmap;
            toast.Show(shortUserLevelMessage, "Report", 5);
        }