Beispiel #1
0
        public void Initialize(PluginInfo info)
        {
            //Initialise our crash handler
            BlackBox blackBox = BlackBox.Get();

            //Register our client tools
            Host.Instance.ClientTools.Add(new BlackBoxClientTool());

            bool allSubmitted = true;

            foreach (BlackBoxReport report in blackBox.GetDumps())
            {
                if (report.Status == BlackBoxReportStatus.New)
                {
                    allSubmitted = false;
                    break;
                }
            }

            if (!allSubmitted)
            {
                Host.Instance.Notifiers.Add(new BlackBoxNotifier());
            }
        }
Beispiel #2
0
 private void RefreshReports()
 {
     ReportsLv.BeginUpdate();
     ReportsLv.Items.Clear();
     foreach (BlackBoxReport report in BlackBox.GetDumps())
     {
         ListViewItem item = ReportsLv.Items.Add(report.Timestamp.ToString(
                                                     "g", CultureInfo.CurrentCulture));
         if (report.StackTrace.Count != 0)
         {
             item.SubItems.Add(report.StackTrace[0].ExceptionType);
         }
         else
         {
             item.SubItems.Add(string.Empty);
         }
         item.SubItems.Add(report.Status == BlackBoxReportStatus.New ?
                           S._("Not submitted") :
                           S._("Submitted (Report ID {0})", report.ID));
         item.Tag     = report;
         item.Checked = true;
     }
     ReportsLv.EndUpdate();
 }