示例#1
0
        static void DoPendingConflictsAndChangesToApplyLabel(
            PendingConflictsLabelData pendingConflictsLabelData,
            string changesToApplySummaryLabelText)
        {
            EditorGUILayout.BeginHorizontal();

            GUIStyle pendingConflictsOfTotalStyle =
                pendingConflictsLabelData.HasPendingConflicts ?
                UnityStyles.IncomingChangesTab.RedPendingConflictsOfTotalLabel :
                UnityStyles.IncomingChangesTab.GreenPendingConflictsOfTotalLabel;

            GUILayout.Label(
                pendingConflictsLabelData.PendingConflictsOfTotalText,
                pendingConflictsOfTotalStyle);

            GUILayout.Label(
                pendingConflictsLabelData.PendingConflictsLabelText,
                UnityStyles.IncomingChangesTab.PendingConflictsLabel);

            GUILayout.Space(5);

            GUILayout.Label(
                changesToApplySummaryLabelText,
                UnityStyles.IncomingChangesTab.ChangesToApplySummaryLabel);

            GUILayout.FlexibleSpace();

            EditorGUILayout.EndHorizontal();
        }
示例#2
0
        static void DoIncomingChangesArea(
            PlasticGUIClient plasticClient,
            IncomingChangesTreeView incomingChangesTreeView,
            PendingConflictsLabelData pendingConflictsLabelData,
            string changesToApplySummaryLabelText,
            string messageLabelText,
            bool isMessageLabelVisible,
            bool isOperationRunning)
        {
            EditorGUILayout.BeginVertical();

            DoPendingConflictsAndChangesToApplyLabel(
                pendingConflictsLabelData,
                changesToApplySummaryLabelText);

            DoIncomingChangesTreeViewArea(
                incomingChangesTreeView,
                isOperationRunning);

            if (isMessageLabelVisible)
            {
                DoInfoMessageArea(messageLabelText);
            }

            EditorGUILayout.EndVertical();
        }
        void UpdateOverview(
            IncomingChangesTree incomingChangesTree,
            PendingConflictsLabelData conflictsLabelData)
        {
            mChangesSummary = BuildFilesSummaryData.
                              GetChangesToApplySummary(incomingChangesTree);

            mFileConflictCount = conflictsLabelData.PendingConflictsCount;
        }
示例#4
0
        void IncomingChangesViewLogic.IIncomingChangesView.UpdateData(
            IncomingChangesTree tree,
            List <ErrorMessage> errorMessages,
            string processMergesButtonText,
            PendingConflictsLabelData conflictsLabelData,
            string changesToApplySummaryText)
        {
            ShowProcessMergesButton(processMergesButtonText);

            ((IncomingChangesViewLogic.IIncomingChangesView) this).
            UpdatePendingConflictsLabel(conflictsLabelData);

            mChangesToApplySummaryLabelText = changesToApplySummaryText;

            UpdateIncomingChangesTree(mIncomingChangesTreeView, tree);

            UpdateErrorsList(mErrorsListView, errorMessages);

            mIsErrorsListVisible = errorMessages.Count > 0;
        }
示例#5
0
        static void DoIncomingChangesArea(
            IncomingChangesTreeView incomingChangesTreeView,
            PendingConflictsLabelData pendingConflictsLabelData,
            string changesToApplySummaryLabelText,
            string messageLabelText,
            bool isMessageLabelVisible,
            bool isOperationRunning,
            bool hasNothingToDownload)
        {
            EditorGUILayout.BeginVertical();

            DoPendingConflictsAndChangesToApplyLabel(
                pendingConflictsLabelData,
                changesToApplySummaryLabelText);

            DoIncomingChangesTreeViewArea(
                incomingChangesTreeView,
                isOperationRunning,
                hasNothingToDownload);

            if (isMessageLabelVisible)
            {
                string message = messageLabelText;

                if (hasNothingToDownload)
                {
                    message = string.Format(
                        "{0}. {1}.",
                        PlasticLocalization.GetString(PlasticLocalization.Name.NoIncomingChanges),
                        PlasticLocalization.GetString(PlasticLocalization.Name.WorkspaceIsUpToDate));
                }

                DoInfoMessageArea(message);
            }

            EditorGUILayout.EndVertical();
        }
示例#6
0
 void IncomingChangesViewLogic.IIncomingChangesView.UpdatePendingConflictsLabel(
     PendingConflictsLabelData data)
 {
     mPendingConflictsLabelData = data;
 }