Ejemplo n.º 1
0
        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);
        }
        public void SortByAllocatedMemory()
        {
            TrackingInfoSortByAssociatedMemory comparer = new TrackingInfoSortByAssociatedMemory(false);

            Sort(comparer);
        }