Example #1
0
        void CreateTable(ProfileAnalyzerWindow profileAnalyzerWindow, List <string> threadNames, List <string> threadUINames, ThreadSelection threadSelection)
        {
            if (m_ThreadTreeViewState == null)
            {
                m_ThreadTreeViewState = new TreeViewState();
            }

            int  sortedColumn;
            bool sortAscending;

            if (m_ThreadMulticolumnHeaderState == null)
            {
                m_ThreadMulticolumnHeaderState = ThreadTable.CreateDefaultMultiColumnHeaderState(700);
                sortedColumn  = (int)ThreadTable.MyColumns.GroupName;
                sortAscending = true;
            }
            else
            {
                // Remember last sort key
                sortedColumn  = m_ThreadMulticolumnHeaderState.sortedColumnIndex;
                sortAscending = m_ThreadMulticolumnHeaderState.columns[sortedColumn].sortedAscending;
            }

            var multiColumnHeader = new MultiColumnHeader(m_ThreadMulticolumnHeaderState);

            multiColumnHeader.SetSorting(sortedColumn, sortAscending);
            multiColumnHeader.ResizeToFit();
            m_ThreadTable = new ThreadTable(m_ThreadTreeViewState, multiColumnHeader, threadNames, threadUINames, threadSelection);
        }
        void CreateTable(ProfileAnalyzerWindow profileAnalyzerWindow, List <string> threadNames, List <string> threadUINames, ThreadSelection threadSelection)
        {
            if (m_ThreadTreeViewState == null)
            {
                m_ThreadTreeViewState = new TreeViewState();
            }

            m_ThreadMulticolumnHeaderState = ThreadTable.CreateDefaultMultiColumnHeaderState(700);

            var multiColumnHeader = new MultiColumnHeader(m_ThreadMulticolumnHeaderState);

            multiColumnHeader.SetSorting((int)ThreadTable.MyColumns.ThreadName, true);
            multiColumnHeader.ResizeToFit();
            m_ThreadTable = new ThreadTable(m_ThreadTreeViewState, multiColumnHeader, threadNames, threadUINames, threadSelection);
        }