public void LogError(TraceViewerException exception)
 {
     if (exception != null)
     {
         LogAppError(exception);
     }
 }
 public void ReportErrorToUser(TraceViewerException exception)
 {
     if (exception != null)
     {
         LogError(exception);
         ReportCommonErrorToUser(exception);
     }
 }
 public static void ReportCommonErrorToUser(TraceViewerException e)
 {
     if (e != null && !string.IsNullOrEmpty(e.Message))
     {
         try
         {
             uiProvider.ShowMessageBox(e.Message, null, MessageBoxIcon.Hand, MessageBoxButtons.OK);
         }
         catch (Exception e2)
         {
             GeneralExceptionFilter(e2);
         }
     }
 }
 private void AppendExceptionToList(TraceViewerException e)
 {
     if (e != null)
     {
         string text  = string.Empty;
         string text2 = string.Empty;
         if (e is LogFileException)
         {
             text = ((LogFileException)e).FilePath;
         }
         else if (e is E2EInvalidFileException)
         {
             text2 = ((E2EInvalidFileException)e).FileOffset.ToString(CultureInfo.CurrentUICulture);
             text  = ((E2EInvalidFileException)e).FilePath;
         }
         ListViewItem listViewItem = new ListViewItem(new string[3]
         {
             e.Message,
             (!string.IsNullOrEmpty(text)) ? Path.GetFileName(text) : string.Empty,
             text2
         });
         if (e is LogFileException)
         {
             listViewItem.Group = listError.Groups[0];
         }
         else if (e is E2EInvalidFileException)
         {
             listViewItem.Group = listError.Groups[1];
         }
         else
         {
             listViewItem.Group = listError.Groups[2];
         }
         listError.Items.Add(listViewItem);
     }
 }
 public static void LogAppError(TraceViewerException e)
 {
     string text = e?.Message;
 }