Inheritance: OLVColumn
Exemplo n.º 1
0
        public void Setup(List <ClrDump> clrDumps)
        {
            ClrDumps = clrDumps;
            Icon     = Properties.Resources.subtotal_small;
            Name     = "Dump diff";
            dlvDumpDiff.SetUpTypeColumn(colType);
            colType.Text         = "Type";
            colType.AspectGetter = o => (string)o;
            ClrDump prevClrDump = null;

            foreach (var clrDump in ClrDumps.OrderBy(dump => dump.Id))
            {
                var        stats   = clrDump.GetTypeStats();
                DiffColumn diffCol = new DiffColumn(clrDump, stats, prevClrDump?.GetTypeStats());
                dlvDumpDiff.AllColumns.Add(diffCol);
                prevClrDump = clrDump;
                dlvDumpDiff.RegisterDataProvider(() => SelectedTypeInstancesAddressList(clrDump), this, $"#{clrDump.Id}");
            }
            dlvDumpDiff.RebuildColumns();
            dlvDumpDiff.UseCellFormatEvents = true;
            dlvDumpDiff.FormatCell         += OnFormatCell;
            dlvDumpDiff.CellClick          += OnCellClick;
            dlvDumpDiff.CustomSorter        = DumpDiffSort;

            dlvDumpDiff.SetRegexFilter(regexFilterControl, o => (string)o);
        }
Exemplo n.º 2
0
 public void Setup(List<ClrDump> clrDumps)
 {
     ClrDumps = clrDumps;
     Icon = Properties.Resources.subtotal_small;
     Name = $"Dump diff";
     dlvDumpDiff.SetUpTypeColumn(colType);
     colType.Text = "Type";
     colType.AspectGetter = o => (string)o;
     ClrDump prevClrDump = null;
     foreach(var clrDump in ClrDumps.OrderBy( dump => dump.Id))
     {
         var stats = clrDump.GetTypeStats();
         DiffColumn diffCol = new DiffColumn(clrDump, stats, prevClrDump?.GetTypeStats());
         dlvDumpDiff.AllColumns.Add(diffCol);
         prevClrDump = clrDump;
         dlvDumpDiff.RegisterDataProvider(() => SelectedTypeInstancesAddressList(clrDump), this, $"#{clrDump.Id}");
     }
     dlvDumpDiff.RebuildColumns();
     dlvDumpDiff.UseCellFormatEvents = true;
     dlvDumpDiff.FormatCell += OnFormatCell;
     dlvDumpDiff.CellClick += OnCellClick;
     dlvDumpDiff.CustomSorter = DumpDiffSort;
     
     dlvDumpDiff.SetRegexFilter(regexFilterControl, o => (string)o);
 }