コード例 #1
0
        internal SortAndHighlightSelector(CallTreeForm.SortingBehaviour sort, CallTreeForm.SortingBehaviour highlight)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            int i, numCounters = Statistics.GetNumberOfCounters();

            sortCounter.Items.Add("in order of execution");
            for (i = 0; i < numCounters; i++)
            {
                sortCounter.Items.Add("by " + Statistics.GetCounterName(i).ToLower());
            }
            sortCounter.SelectedIndex = 1 + sort.counterId;
            sortOrder.SelectedIndex   = (1 + sort.sortingOrder) / 2;

            for (i = 0; i < numCounters; i++)
            {
                highlightCounter.Items.Add(Statistics.GetCounterName(i).ToLower());
            }
            highlightCounter.SelectedIndex = highlight.counterId;
            highlightOrder.SelectedIndex   = (1 + highlight.sortingOrder) / 2;
        }
コード例 #2
0
        internal void GetSortResults(CallTreeForm.SortingBehaviour s,
                                     CallTreeForm.SortingBehaviour h)
        {
            s.counterId    = sortCounter.SelectedIndex - 1;
            s.sortingOrder = sortOrder.SelectedIndex * 2 - 1;

            h.counterId    = highlightCounter.SelectedIndex;
            h.sortingOrder = highlightOrder.SelectedIndex * 2 - 1;
        }