Example #1
0
 void IAdvancedTraceInfoProvider.ReloadTrace(TraceRecord trace, TraceDetailInfoControlParam param)
 {
     if (trace != null)
     {
         SuspendLayout();
         try
         {
             activeParts.Clear();
             HideAllParts();
             TraceDetailedProcessParameter traceDetailedProcessParameter = new TraceDetailedProcessParameter(trace);
             if (param != null && param.ShowBasicInfo)
             {
                 basicInfoPart.Visible = true;
                 basicInfoPart.ReloadTracePart(traceDetailedProcessParameter);
                 activeParts.AddLast(basicInfoPart);
             }
             if (TraceDetailAppDataPart.ContainsMatchProperties(traceDetailedProcessParameter))
             {
                 appDataPart.Visible = true;
                 appDataPart.ReloadTracePart(traceDetailedProcessParameter);
                 activeParts.AddLast(appDataPart);
             }
             if (TraceDetailExceptionPart.ContainsMatchProperties(traceDetailedProcessParameter))
             {
                 exceptionPart.Visible = true;
                 exceptionPart.ReloadTracePart(traceDetailedProcessParameter);
                 activeParts.AddLast(exceptionPart);
             }
             if (TraceDetailMessageInfoPart.ContainsMatchProperties(traceDetailedProcessParameter))
             {
                 messageInfoPart.Visible = true;
                 messageInfoPart.ReloadTracePart(traceDetailedProcessParameter);
                 activeParts.AddLast(messageInfoPart);
             }
             if (TraceDetailMessageLogInfoPart.ContainsMatchProperties(traceDetailedProcessParameter))
             {
                 messageLogInfoPart.Visible = true;
                 messageLogInfoPart.ReloadTracePart(traceDetailedProcessParameter);
                 activeParts.AddLast(messageLogInfoPart);
             }
             if (traceDetailedProcessParameter.PropertyCount != 0)
             {
                 listPart.Visible = true;
                 listPart.ReloadTracePart(traceDetailedProcessParameter);
                 activeParts.AddLast(listPart);
             }
             if (param != null && param.ShowDiagnosticsInfo && TraceDetailDiagnosticsPart.ContainsMatchProperties(traceDetailedProcessParameter))
             {
                 diagPart.Visible = true;
                 diagPart.ReloadTracePart(traceDetailedProcessParameter);
                 activeParts.AddLast(diagPart);
             }
             RestructLayout(null);
         }
         finally
         {
             ResumeLayout();
         }
     }
 }