Beispiel #1
0
 public void Dump(CrashLog aCrashLog)
 {
     try
     {
         if (iOptionPage.AutoSend)
         {
             Send(aCrashLog.ToString(), iHelper.Product, iHelper.Version, iHelper.Title);
         }
         else
         {
             NotificationManager notificationManager = (NotificationManager)iContext.GetSystemService(Context.NotificationService);
             Notification        notification        = new Notification(iNotificationIconResource, string.Format("{0} has quit unexpectedly.", iHelper.Product));
             Intent notificationIntent = new Intent(iContext, typeof(CrashReportActivity));
             Bundle b = new Bundle();
             b.PutString(kCrashLogData, aCrashLog.ToString());
             b.PutInt(kCrashLogImage, iNotificationIconResource);
             notificationIntent.PutExtras(b);
             PendingIntent pendingIntent = PendingIntent.GetActivity(iContext, 0, notificationIntent, PendingIntentFlags.UpdateCurrent);
             notification.SetLatestEventInfo(iContext, string.Format("{0} has quit unexpectedly.", iHelper.Product), string.Format("{0} has encountered a problem and had to close.", iHelper.Product), pendingIntent);
             notificationManager.Notify((int)ENotificationType.SystemCrash, notification);
         }
     }
     catch (Exception ex)
     {
         UserLog.WriteLine("Unhandled exception in CrashDumper.Dump: " + ex);
     }
 }
        public void Dump(CrashLog aCrashLog)
        {
            iReportText = aCrashLog.ToString();

            Dispatcher.Invoke((System.Windows.Forms.MethodInvoker) delegate()
            {
                // show crash form
                textBoxDetails.Text = iReportText;
                ShowDialog();
            });
        }
 public void Dump(CrashLog aCrashLog)
 {
     try
     {
         iParent.Visibility = Visibility.Hidden;
         // include some system details in report
         iReportText = aCrashLog.ToString();
         iWaitHandle = new ManualResetEvent(false);
         iShowCrashLogDialog.Start();
         iWaitHandle.WaitOne();
     }catch (Exception ex) {
         UserLog.WriteLine("Unhandled exception in CrashLogDumper.Dump() " + ex);
     }
 }
Beispiel #4
0
        public void Dump(CrashLog aCrashLog)
        {
            // include some system details in report
            string reportText = aCrashLog.ToString();
            // show crash form
            FormCrashLogDumper form   = new FormCrashLogDumper(iTitle, iIcon, reportText);
            DialogResult       result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                // post data to Linn
                DebugReport report = new DebugReport("Crash log generated by " + iProduct + " ver " + iVersion);
                report.Post(iTitle, reportText);
            }
        }
Beispiel #5
0
        public void Dump(CrashLog aCrashLog)
        {
            // include some system details in report
            string reportText = aCrashLog.ToString();

            DebugReport report = new DebugReport("Crash log generated by " + iProduct + " ver " + iVersion);

            /*iDelegate = new Delegate(report, iTitle, reportText);
             * UIAlertView alert = new UIAlertView(iTitle, "The application " + iTitle + " quit unexpectedly", iDelegate,
             *                                  "Close", new string[] { "Report and Close" });
             * alert.Show();*/

            if (iAutoSend)
            {
                report.Post(iTitle, reportText);
            }
        }
Beispiel #6
0
        public void Dump(CrashLog aCrashLog)
        {
            int result = AppKitFramework.NSRunCriticalAlertPanel("The application " + iTitle + " quit unexpectedly",
                                                                 "Mac OS X and other applications are not affected.\n\n" +
                                                                 "Click Report to send a report to Linn",
                                                                 "Report",
                                                                 "Ignore",
                                                                 null);

            // show crash form
            if (result == 1)
            {
                // post data to Linn
                DebugReport report = new DebugReport("Crash log generated by " + iProduct + " ver " + iVersion);
                report.Post(iTitle, aCrashLog.ToString());
            }
        }
        public void Dump(CrashLog aCrashLog)
        {
            InvokeOnMainThread(delegate {
                iReportText      = aCrashLog.ToString();
                Details.Editable = true;
                Details.InsertText(new NSString(iReportText));
                Details.ScrollRangeToVisible(new NSRange(0, 0));
                Details.SetSelectedRange(new NSRange(0, 0));
                Details.Editable = false;

                // show the window modally
                Window.Center();
                Window.MakeKeyAndOrderFront(this);

                NSApplication.SharedApplication.RunModalForWindow(Window);

                Window.OrderOut(this);
            });
        }