private void iPG3_StatsTable_PrepareForSort(object sender, XPTable.Events.SortEventArgs e) { TrackingComparisonBase type = null; switch (e.Index) { default: case 0: type = new HeapLib.Statistics.Tracking.Base.TrackingInfoSortBySymbolName(false); break; case 1: type = new HeapLib.Statistics.Tracking.Base.TrackingInfoSortByCount(false); break; case 2: type = new HeapLib.Statistics.Tracking.Base.TrackingInfoSortByPayloadLength(false); break; case 3: type = new HeapLib.Statistics.Tracking.Base.TrackingInfoSortByAssociatedMemory(false); break; } // if (type == null) { throw new Exception("No comparer for specified column"); } // e.Comparer = new TrackingInfoComparerWrapper(type); }
private void iTable_PrepareForSort(object sender, XPTable.Events.SortEventArgs e) { if (e.Column == iCol_Length) { e.Comparer = new XPTable.Sorting.NumberComparer(iTable.TableModel, e.Index, e.Column.SortOrder); } else if (e.Column == iCol_DescriptorLength) { e.Comparer = new XPTable.Sorting.NumberComparer(iTable.TableModel, e.Index, e.Column.SortOrder); } else { e.Comparer = new XPTable.Sorting.TextComparer(iTable.TableModel, e.Index, e.Column.SortOrder); } }
private void iTable_PrepareForSort(object sender, XPTable.Events.SortEventArgs e) { if (e.Column == iCol_Count || e.Column == iCol_Total) { e.Comparer = new XPTable.Sorting.NumberComparer(iTable.TableModel, e.Index, e.Column.SortOrder); } else if (e.Column == iCol_Size) { e.Comparer = new HeapCellDistributionCustomComparerUint(iTable.TableModel, e.Index, e.Column.SortOrder); } else { e.Comparer = new HeapCellDistributionCustomComparerDouble(iTable.TableModel, e.Index, e.Column.SortOrder); } }