public Show ( string message, string callToAction, int seconds ) : void | ||
message | string | |
callToAction | string | Text of the hyperlink |
seconds | int | How long to show before it goes back down |
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); }