Beispiel #1
0
        static void IncomingChangeTreeViewItemCellGUI(
            string wkPath,
            Rect rect,
            float rowHeight,
            UnityIncomingChangesTree incomingChangesTree,
            IncomingChangesTreeView treeView,
            ChangeTreeViewItem item,
            IncomingChangesTreeColumn column,
            bool isSelected,
            bool isFocused,
            bool isCurrentConflict,
            bool isSolvedConflict)
        {
            IncomingChangeInfo incomingChange = item.ChangeInfo;

            string label = incomingChange.GetColumnText(
                IncomingChangesTreeHeaderState.GetColumnName(column));

            if (column == IncomingChangesTreeColumn.Path)
            {
                if (incomingChangesTree.HasMeta(item.ChangeInfo))
                {
                    label = string.Concat(label, UnityConstants.TREEVIEW_META_LABEL);
                }

                Texture icon = GetIcon(wkPath, incomingChange);

                GetOverlayIcon.Data overlayIconData = GetOverlayData(
                    incomingChange,
                    isSolvedConflict);

                DrawTreeViewItem.ForItemCell(
                    rect,
                    rowHeight,
                    item.depth,
                    icon,
                    overlayIconData,
                    label,
                    isSelected,
                    isFocused,
                    isCurrentConflict);

                return;
            }

            if (column == IncomingChangesTreeColumn.Size)
            {
                DefaultGUI.LabelRightAligned(rect, label, isSelected, isFocused);
                return;
            }

            DefaultGUI.Label(rect, label, isSelected, isFocused);
        }
Beispiel #2
0
        void BuildComponents(WorkspaceInfo wkInfo)
        {
            IncomingChangesTreeHeaderState incomingChangesHeaderState =
                IncomingChangesTreeHeaderState.Default;

            TreeHeaderSettings.Load(incomingChangesHeaderState,
                                    UnityConstants.DEVELOPER_INCOMING_CHANGES_TABLE_SETTINGS_NAME,
                                    (int)IncomingChangesTreeColumn.Path, true);

            mIncomingChangesTreeView = new IncomingChangesTreeView(
                wkInfo, incomingChangesHeaderState,
                new IncomingChangesViewMenu(this, this));
            mIncomingChangesTreeView.Reload();
        }
Beispiel #3
0
        internal IncomingChangesTreeView(
            WorkspaceInfo wkInfo,
            IncomingChangesTreeHeaderState headerState,
            List <string> columnNames,
            IncomingChangesViewMenu menu)
            : base(new TreeViewState())
        {
            mWkInfo      = wkInfo;
            mColumnNames = columnNames;
            mMenu        = menu;

            multiColumnHeader                 = new MultiColumnHeader(headerState);
            multiColumnHeader.canSort         = true;
            multiColumnHeader.sortingChanged += SortingChanged;

            customFoldoutYOffset          = UnityConstants.TREEVIEW_FOLDOUT_Y_OFFSET;
            rowHeight                     = UnityConstants.TREEVIEW_ROW_HEIGHT;
            showAlternatingRowBackgrounds = true;
        }
Beispiel #4
0
        internal IncomingChangesTreeView(
            WorkspaceInfo wkInfo,
            IncomingChangesTreeHeaderState headerState,
            IncomingChangesViewMenu menu)
            : base(new TreeViewState())
        {
            mWkInfo = wkInfo;
            mMenu   = menu;

            mColumnNames = new List <string>();
            mColumnNames.Add(PlasticLocalization.GetString(PlasticLocalization.Name.PathColumn));
            mColumnNames.Add(PlasticLocalization.GetString(PlasticLocalization.Name.SizeColumn));
            mColumnNames.Add(PlasticLocalization.GetString(PlasticLocalization.Name.CreatedByColumn));
            mColumnNames.Add(PlasticLocalization.GetString(PlasticLocalization.Name.DetailsColumn));
            mColumnNames.Add(PlasticLocalization.GetString(PlasticLocalization.Name.ResolutionMethodColumn));

            multiColumnHeader                 = new MultiColumnHeader(headerState);
            multiColumnHeader.canSort         = true;
            multiColumnHeader.sortingChanged += SortingChanged;

            customFoldoutYOffset          = UnityConstants.TREEVIEW_FOLDOUT_Y_OFFSET;
            rowHeight                     = UnityConstants.TREEVIEW_ROW_HEIGHT;
            showAlternatingRowBackgrounds = true;
        }