private static bool ShowDialog(EventSubmittingEventArgs e) { var dialog = new CrashReportDialog(e.Client, e.Event); bool?result = dialog.ShowDialog(); return(result.HasValue && result.Value); }
private bool OnSubmittingEvent(Event ev, ContextData pluginContextData) { var args = new EventSubmittingEventArgs(this, ev, pluginContextData); OnSubmittingEvent(args); return(!args.Cancel); }
private bool OnSubmittingEvent(Event ev) { var args = new EventSubmittingEventArgs(ev); OnSubmittingEvent(args); return(!args.Cancel); }
private static void OnSubmittingEvent(object sender, EventSubmittingEventArgs e) { // ev.ExceptionlessClientInfo.Platform = ".NET Windows"; if (!e.IsUnhandledError) return; var dialog = new CrashReportForm(e.Client, e.Event); e.Cancel = dialog.ShowDialog() != DialogResult.OK; }
private static void OnSubmittingEvent(object sender, EventSubmittingEventArgs e) { //error.ExceptionlessClientInfo.Platform = ".NET WPF"; if (!e.IsUnhandledError) return; if (Application.Current != null && !Application.Current.Dispatcher.CheckAccess()) e.Cancel = !(bool)Application.Current.Dispatcher.Invoke(new Func<EventSubmittingEventArgs, bool>(ShowDialog), DispatcherPriority.Send, e); else e.Cancel = !ShowDialog(e); }
private static void OnSubmittingEvent(object sender, EventSubmittingEventArgs e) { // ev.ExceptionlessClientInfo.Platform = ".NET Windows"; if (!e.IsUnhandledError) { return; } var dialog = new CrashReportForm(e.Client, e.Event); e.Cancel = dialog.ShowDialog() != DialogResult.OK; }
private async void ExceptionlessSubmittingEvent(object sender, EventSubmittingEventArgs e) { await Application.Current.Dispatcher.Invoke(async () => { if (!e.IsUnhandledError) return; e.Cancel = true; await OpenFlyout(new Error(ViewModel, e.Event)); CloseApp(true); }); }
private async void ExceptionlessSubmittingEvent(object sender, EventSubmittingEventArgs e) { if (e.IsUnhandledError) { e.Cancel = true; await Application.Current.Dispatcher.Invoke(async () => { modelHelpers.CloseAllFlyouts(); await modelHelpers.OpenFlyout(new Error(modelHelpers, e.Event)); modelHelpers.CloseApp(true); }); } }
/// <summary> /// Raises the <see cref="SubmittingEvent" /> event. /// </summary> /// <param name="e">The <see cref="EventSubmittingEventArgs" /> instance containing the event data.</param> protected internal void OnSubmittingEvent(EventSubmittingEventArgs e) { if (SubmittingEvent == null) return; var handlers = SubmittingEvent.GetInvocationList(); foreach (var handler in handlers) { try { handler.DynamicInvoke(this, e); if (e.Cancel) return; } catch (Exception ex) { _log.Value.FormattedError(typeof(ExceptionlessClient), ex, "Error while invoking SubmittingEvent handler: {0}", ex.Message); } } }
private static void OnSubmittingEvent(object sender, EventSubmittingEventArgs e) { //error.ExceptionlessClientInfo.Platform = ".NET WPF"; if (!e.IsUnhandledError) { return; } if (Application.Current != null && !Application.Current.Dispatcher.CheckAccess()) { e.Cancel = !(bool)Application.Current.Dispatcher.Invoke(new Func <EventSubmittingEventArgs, bool>(ShowDialog), DispatcherPriority.Send, e); } else { e.Cancel = !ShowDialog(e); } }
/// <summary> /// Raises the <see cref="SubmittingEvent" /> event. /// </summary> /// <param name="e">The <see cref="EventSubmittingEventArgs" /> instance containing the event data.</param> protected void OnSubmittingEvent(EventSubmittingEventArgs e) { if (SubmittingEvent == null) return; var handlers = SubmittingEvent.GetInvocationList(); foreach (var handler in handlers) { try { handler.DynamicInvoke(this, e); if (e.Cancel) return; } catch (Exception ex) { _log.Value.FormattedError(typeof(ExceptionlessClient), ex, "Error while invoking SubmittingEvent handler: {0}", ex.Message); } } }
private bool OnSubmittingEvent(Event ev, ContextData pluginContextData) { var args = new EventSubmittingEventArgs(this, ev, pluginContextData); OnSubmittingEvent(args); return !args.Cancel; }
private static bool ShowDialog(EventSubmittingEventArgs e) { var dialog = new CrashReportDialog(e.Client, e.Event); bool? result = dialog.ShowDialog(); return result.HasValue && result.Value; }
protected internal bool OnSubmittingEvent(Event ev, ContextData pluginContextData) { var args = new EventSubmittingEventArgs(this, ev, pluginContextData); OnSubmittingEvent(args); return !args.Cancel; }
private void OnSubmittingExceptionlessEvent(object sender, EventSubmittingEventArgs e) { foreach (var form in Application.OpenForms.Cast<Form>()) { form.TopMost = false; } }