コード例 #1
0
        static void DoFileConflictsHeader(
            MergeTreeResult conflicts,
            MergeSolvedFileConflicts solvedFileConflicts,
            MountPointWithPath mount)
        {
            int fileConflictsCount        = MergeTreeResultParser.GetFileConflictsCount(conflicts);
            int pendingFileConflictsCount = MergeTreeResultParser.GetUnsolvedFileConflictsCount(
                conflicts, mount.Id, solvedFileConflicts);

            GUIStyle pendingFileConflictsOfTotalStyle =
                pendingFileConflictsCount > 0 ?
                UnityStyles.IncomingChangesTab.RedPendingConflictsOfTotalLabel :
                UnityStyles.IncomingChangesTab.GreenPendingConflictsOfTotalLabel;

            GUILayout.Label(
                string.Format("{0}/{1}", pendingFileConflictsCount, fileConflictsCount),
                pendingFileConflictsOfTotalStyle);

            GUILayout.Label(
                MergeViewTexts.GetFileConflictsCaption(fileConflictsCount, true),
                UnityStyles.IncomingChangesTab.PendingConflictsLabel);

            GUILayout.Space(5);

            GUILayout.Label(
                MergeViewTexts.GetChangesToApplyCaption(
                    MergeTreeResultParser.GetChangesToApplySummary(conflicts)),
                UnityStyles.IncomingChangesTab.ChangesToApplySummaryLabel);
        }
コード例 #2
0
        void UpdateOverview(
            MergeTreeResult resultConflicts,
            MergeSolvedFileConflicts solvedFileConflicts,
            MountPointWithPath rootMountPoint)
        {
            if (resultConflicts == null || rootMountPoint == null)
            {
                mChangesSummary         = new MergeViewTexts.ChangesToApplySummary();
                mFileConflictCount      = 0;
                mDirectoryConflictCount = 0;
                return;
            }

            mChangesSummary = MergeTreeResultParser.
                              GetChangesToApplySummary(resultConflicts);

            mFileConflictCount = MergeTreeResultParser.GetUnsolvedFileConflictsCount(
                resultConflicts, rootMountPoint.Id, solvedFileConflicts);

            mDirectoryConflictCount = MergeTreeResultParser.GetUnsolvedDirectoryConflictsCount(
                resultConflicts);
        }