Пример #1
0
 void OnSortingChanged(MultiColumnHeader header)
 {
     if (m_FrameDataView == null || multiColumnHeader.sortedColumnIndex == -1)
     {
         return; // No column to sort for (just use the order the data are in)
     }
     m_FrameDataView.Sort(m_MultiColumnHeader.sortedProfilerColumn, m_MultiColumnHeader.sortedProfilerColumnAscending);
     Reload();
 }
Пример #2
0
        public void SetFrameDataView(FrameDataView frameDataView)
        {
            var needReload  = !Equals(m_FrameDataView, frameDataView);
            var needSorting = frameDataView != null && (frameDataView.sortColumn != m_MultiColumnHeader.sortedProfilerColumn ||
                                                        frameDataView.sortColumnAscending != m_MultiColumnHeader.sortedProfilerColumnAscending);

            if (needReload)
            {
                StoreExpandedState();
                StoreSelectedState();
            }

            m_FrameDataView = frameDataView;
            if (needSorting)
            {
                m_FrameDataView.Sort(m_MultiColumnHeader.sortedProfilerColumn, m_MultiColumnHeader.sortedProfilerColumnAscending);
            }

            if (needReload || needSorting)
            {
                Reload();
            }
        }