Example #1
0
        static void ErrorListViewItemCellGUI(
            Rect rect,
            float rowHeight,
            WorkspaceInfo wkInfo,
            HashSet <ErrorMessage> checkedErrors,
            ErrorListViewItem item,
            Action onCheckedErrorChanged,
            UpdateReportListColumn column,
            bool isSelected,
            bool isFocused)
        {
            ErrorMessage errorMessage = item.ErrorMessage;

            string label = GetColumnText(
                wkInfo, errorMessage,
                UpdateReportListHeaderState.GetHeaderContent(column));

            bool wasChecked = checkedErrors.Contains(errorMessage);

            bool isChecked = DrawTreeViewItem.ForCheckableItemCell(
                rect, rowHeight, 0, null, null, label,
                isSelected, isFocused, false, wasChecked);

            if (wasChecked != isChecked)
            {
                UpdateCheckState(
                    checkedErrors, errorMessage, isChecked);

                onCheckedErrorChanged();
            }
        }
Example #2
0
        void BuildComponents(WorkspaceInfo wkInfo)
        {
            UpdateReportListHeaderState updateReportListHeaderState = UpdateReportListHeaderState.Default;

            TreeHeaderSettings.Load(updateReportListHeaderState,
                                    UnityConstants.GLUON_UPDATE_REPORT_TABLE_SETTINGS_NAME,
                                    UnityConstants.UNSORT_COLUMN_ID);

            mUpdateReportListView = new UpdateReportListView(
                wkInfo, updateReportListHeaderState,
                OnCheckedErrorChanged);
            mUpdateReportListView.Reload();
        }
Example #3
0
        internal UpdateReportListView(
            WorkspaceInfo wkInfo,
            UpdateReportListHeaderState headerState,
            Action onCheckedErrorChanged)
            : base(new TreeViewState())
        {
            mWkInfo = wkInfo;
            mOnCheckedErrorChanged = onCheckedErrorChanged;

            multiColumnHeader         = new MultiColumnHeader(headerState);
            multiColumnHeader.canSort = false;

            rowHeight = UnityConstants.TREEVIEW_ROW_HEIGHT;
            showAlternatingRowBackgrounds = true;
        }