private void UpdateIfNeeded(FrameDataView frameDataView, int selectedId) { if (this.m_SelectedID != selectedId || !object.Equals(this.m_FrameDataView, frameDataView)) { this.m_FrameDataView = frameDataView; this.m_SelectedID = selectedId; this.m_TreeView.SetSelection(new List <int>()); int itemSamplesCount = this.m_FrameDataView.GetItemSamplesCount(selectedId); int num = this.m_MultiColumnHeader.columns.Length; List <ProfilerDetailedObjectsView.ObjectInformation> list = new List <ProfilerDetailedObjectsView.ObjectInformation>(); string[][] array = new string[num][]; int[] itemInstanceIDs = this.m_FrameDataView.GetItemInstanceIDs(selectedId); for (int i = 0; i < num; i++) { array[i] = this.m_FrameDataView.GetItemColumnDatas(selectedId, this.m_MultiColumnHeader.columns[i].profilerColumn); } for (int j = 0; j < itemSamplesCount; j++) { ProfilerDetailedObjectsView.ObjectInformation objectInformation = new ProfilerDetailedObjectsView.ObjectInformation { columnStrings = new string[num] }; objectInformation.id = selectedId; objectInformation.instanceId = ((j >= itemInstanceIDs.Length) ? 0 : itemInstanceIDs[j]); for (int k = 0; k < num; k++) { objectInformation.columnStrings[k] = ((j >= array[k].Length) ? string.Empty : array[k][j]); } list.Add(objectInformation); } this.m_TreeView.SetData(list); } }
private void CellGUI(Rect cellRect, TreeViewItem item, int column, ref TreeView.RowGUIArgs args) { ProfilerDetailedObjectsView.ObjectInformation objectInformation = this.m_ObjectsData[args.item.id]; base.CenterRectUsingSingleLineHeight(ref cellRect); TreeView.DefaultGUI.Label(cellRect, objectInformation.columnStrings[column], args.selected, args.focused); }