Exemple #1
0
        void CellGUI(Rect cellRect, TestListTableItem item, MyColumns column, ref RowGUIArgs args)
        {
            // Center cell rect vertically (makes it easier to place controls, icons etc in the cells)
            CenterRectUsingSingleLineHeight(ref cellRect);

            switch (column)
            {
            case MyColumns.Name:
            {
                args.rowRect = cellRect;
                base.RowGUI(args);
            }
            break;

            case MyColumns.SampleCount:
                EditorGUI.LabelField(cellRect, string.Format("{0}", item.test.SampleGroups.Count));
                break;

            case MyColumns.Deviation:
                EditorGUI.LabelField(cellRect, string.Format("{0:f2}", item.deviation));
                break;

            case MyColumns.StandardDeviation:
                EditorGUI.LabelField(cellRect, string.Format("{0:f2}", item.standardDeviation));
                break;

            case MyColumns.Median:
                EditorGUI.LabelField(cellRect, string.Format("{0:f2}", item.median));
                break;
            }
        }
Exemple #2
0
        protected override TreeViewItem BuildRoot()
        {
            int idForhiddenRoot    = -1;
            int depthForHiddenRoot = -1;
            TestListTableItem root = new TestListTableItem(idForhiddenRoot, depthForHiddenRoot, "root", null);

            var results = m_testReportWindow.GetResults();

            if (results != null)
            {
                int index = 0;
                foreach (var result in results.Results)
                {
                    var item = new TestListTableItem(index, 0, result.Name, result);
                    root.AddChild(item);

                    // Maintain index to map to main markers
                    index += 1;
                }
            }

            return(root);
        }