internal static void SetScanTraceGrid(List<IronTrace> Traces) { if (UI.ScanTraceGrid.InvokeRequired) { SetScanTraceGrid_d SSTG_d = new SetScanTraceGrid_d(SetScanTraceGrid); UI.Invoke(SSTG_d, new object[] { Traces }); } else { UI.ScanTraceGrid.Rows.Clear(); IronTrace.ScanTraceMin = 0; IronTrace.ScanTraceMax = 0; UpdateScanTraceGrid(Traces); } }
internal static void SetScanTraceGrid(List<IronTrace> Traces) { if (UI.ScanTraceGrid.InvokeRequired) { SetScanTraceGrid_d SSTG_d = new SetScanTraceGrid_d(SetScanTraceGrid); UI.Invoke(SSTG_d, new object[] { Traces }); } else { UI.ScanTraceGrid.Rows.Clear(); IronTrace.ScanTraceMin = 0; IronTrace.ScanTraceMax = 0; foreach (IronTrace Trace in Traces) { if (UI.ScanTraceGrid.Rows.Count >= IronLog.MaxRowCount) break; try { UI.ScanTraceGrid.Rows.Add(new object[] { Trace.ID, Trace.ScanID, Trace.PluginName, Trace.Section, Trace.Parameter, Trace.Title, Trace.Message }); if (Trace.ID > IronTrace.ScanTraceMax) IronTrace.ScanTraceMax = Trace.ID; if (Trace.ID < IronTrace.ScanTraceMin || IronTrace.ScanTraceMin < 1) IronTrace.ScanTraceMin = Trace.ID; } catch (Exception Exp) { IronException.Report("Error Updating Trace in ScanTraceGrid", Exp.Message, Exp.StackTrace); } } ShowCurrentScanTraceStat(); IronUI.ShowScanTraceStatus("", false); } }