Beispiel #1
0
        void AddMergeActions(
            GenericMenu menu,
            IncomingChangesMenuOperations operations)
        {
            if (operations.HasFlag(IncomingChangesMenuOperations.MergeContributors))
            {
                menu.AddItem(mMergeSelectedFilesMenuItemContent, false,
                             MergeSelectedFilesMenuItem_Click);
            }
            else
            {
                menu.AddDisabledItem(mMergeSelectedFilesMenuItemContent);
            }

            if (operations.HasFlag(IncomingChangesMenuOperations.MergeKeepingSourceChanges))
            {
                menu.AddItem(mMergeKeepingSourceChangesMenuItemContent, false,
                             MergeKeepingSourceChangesMenuItem_Click);
            }
            else
            {
                menu.AddDisabledItem(mMergeKeepingSourceChangesMenuItemContent);
            }

            if (operations.HasFlag(IncomingChangesMenuOperations.MergeKeepingWorkspaceChanges))
            {
                menu.AddItem(mMergeKeepingWorkspaceChangesMenuItemContent, false,
                             MergeKeepingWorkspaceChangesMenuItem_Click);
            }
            else
            {
                menu.AddDisabledItem(mMergeKeepingWorkspaceChangesMenuItemContent);
            }
        }
Beispiel #2
0
        void AddMetaActions(GenericMenu menu, IncomingChangesMenuOperations operations)
        {
            if (operations.HasFlag(IncomingChangesMenuOperations.DiffYoursWithIncoming))
            {
                menu.AddItem(mDiffMetaYoursWithIncomingMenuItemContent, false,
                             DiffMetaYoursWithIncomingMenuItem_Click);
            }
            else
            {
                menu.AddDisabledItem(mDiffMetaYoursWithIncomingMenuItemContent);
            }

            if (operations.HasFlag(IncomingChangesMenuOperations.DiffIncomingChanges))
            {
                menu.AddItem(mDiffMetaIncomingChangesMenuItemContent, false,
                             DiffMetaIncomingChangesMenuItem_Click);
            }
            else
            {
                menu.AddDisabledItem(mDiffMetaIncomingChangesMenuItemContent);
            }
        }