Exemplo n.º 1
0
 public AnalysisView(AnalysisViewDescriptor desc, ProjectAuditorConfig config, IIssuesFilter filter)
 {
     m_Desc   = desc;
     m_Config = config;
     m_Filter = filter;
     m_Table  = null;
 }
Exemplo n.º 2
0
        private void RefreshDisplay()
        {
            if (!IsAnalysisValid())
            {
                return;
            }

            if (m_IssueTables.Count == 0)
            {
                for (int i = 0; i < (int)IssueCategory.NumCategories; ++i)
                {
                    IssueTable issueTable = CreateIssueTable((IssueCategory)i, new TreeViewState());
                    m_IssueTables.Add(issueTable);
                }
            }

            m_ActiveIssueTable.Reload();
        }
Exemplo n.º 3
0
        public void CreateTable()
        {
            if (m_Table != null)
            {
                return;
            }

            var state       = new TreeViewState();
            var columnsList = new List <MultiColumnHeaderState.Column>();
            var numColumns  = (int)IssueTable.Column.Count;

            for (var i = 0; i < numColumns; i++)
            {
                var width    = 0;
                var minWidth = 0;
                switch ((IssueTable.Column)i)
                {
                case IssueTable.Column.Description:
                    width    = 300;
                    minWidth = 100;
                    break;

                case IssueTable.Column.Priority:
                    if (m_Desc.showCritical)
                    {
                        width    = 22;
                        minWidth = 22;
                    }
                    break;

                case IssueTable.Column.Area:
                    width    = 60;
                    minWidth = 50;
                    break;

                case IssueTable.Column.Filename:
                    if (m_Desc.showFilenameColumn)
                    {
                        width    = 180;
                        minWidth = 100;
                    }

                    break;

                case IssueTable.Column.Assembly:
                    if (m_Desc.showAssemblyColumn)
                    {
                        width    = 180;
                        minWidth = 100;
                    }

                    break;
                }

                columnsList.Add(new MultiColumnHeaderState.Column
                {
                    headerContent = Styles.ColumnHeaders[i],
                    width         = width,
                    minWidth      = minWidth,
                    autoResize    = true
                });
            }

            m_Table = new IssueTable(state,
                                     new MultiColumnHeader(new MultiColumnHeaderState(columnsList.ToArray())),
                                     m_Desc.groupByDescription,
                                     m_Config,
                                     m_Filter);
        }