Пример #1
0
        private static bool ShowDialog(EventSubmittingEventArgs e)
        {
            var  dialog = new CrashReportDialog(e.Client, e.Event);
            bool?result = dialog.ShowDialog();

            return(result.HasValue && result.Value);
        }
Пример #2
0
        private bool OnSubmittingEvent(Event ev, ContextData pluginContextData)
        {
            var args = new EventSubmittingEventArgs(this, ev, pluginContextData);

            OnSubmittingEvent(args);
            return(!args.Cancel);
        }
Пример #3
0
        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);
        }
Пример #6
0
        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;
        }
Пример #7
0
        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);
            });

        }
Пример #8
0
        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);
                }
            }
        }
Пример #10
0
        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;
 }
Пример #15
0
 private void OnSubmittingExceptionlessEvent(object sender, EventSubmittingEventArgs e)
 {
     foreach (var form in Application.OpenForms.Cast<Form>())
     {
         form.TopMost = false;
     }
 }