예제 #1
0
        public BranchParentNotFoundConflictTypeViewModel()
        {
            m_listPathsControlVM = new ListPathsControlViewModel();
            ListPathsControl control = new ListPathsControl();

            control.DataContext = m_listPathsControlVM;

            ConflictTypeDescription = Properties.Resources.BranchParentNotFoundConflictTypeDescription;

            ResolutionActionViewModel resolveAction = new ResolutionActionViewModel()
            {
                ResolutionActionDescription   = Properties.Resources.ResolveBranchParentAction,
                ResolutionActionReferenceName = new VCChangeToAddOnBranchParentNotFoundAction().ReferenceName,
                IsSelected     = true,
                UserControl    = control,
                ExecuteCommand = SetSelectedPath
            };

            ResolutionActionViewModel retryAction = new ResolutionActionViewModel()
            {
                ResolutionActionDescription   = Properties.Resources.RetryAction,
                ResolutionActionReferenceName = new VCRetryOnBranchParentNotFoundAction().ReferenceName
            };

            RegisterResolutionAction(resolveAction);
            RegisterResolutionAction(retryAction);
        }
예제 #2
0
        public VCContentConflictTypeViewModel()
        {
            m_changesetPairControlVM = new ChangesetPairControlViewModel();
            ChangesetPairControl changesetPairControl = new ChangesetPairControl();

            changesetPairControl.DataContext = m_changesetPairControlVM;

            m_localPathsControlVM = new ListPathsControlViewModel();
            ListPathsControl localPathsControl = new ListPathsControl();

            localPathsControl.DataContext = m_localPathsControlVM;

            m_otherPathsControlVM = new ListPathsControlViewModel();
            ListPathsControl otherPathsControl = new ListPathsControl();

            otherPathsControl.DataContext = m_otherPathsControlVM;

            ConflictTypeDescription = Properties.Resources.VCContentConflictTypeDescription;

            ResolutionActionViewModel takeLocalChangesAction = new ResolutionActionViewModel()
            {
                ResolutionActionDescription   = Properties.Resources.TakeLocalChangesAction,
                ResolutionActionReferenceName = new VCContentConflictTakeLocalChangeAction().ReferenceName,
                UserControl    = localPathsControl,
                ExecuteCommand = SetSelectedLocalPath,
                IsSelected     = true
            };

            ResolutionActionViewModel takeOtherChangesAction = new ResolutionActionViewModel()
            {
                ResolutionActionDescription   = Properties.Resources.TakeOtherChangesAction,
                ResolutionActionReferenceName = new VCContentConflictTakeOtherChangesAction().ReferenceName,
                UserControl    = otherPathsControl,
                ExecuteCommand = SetSelectedOtherPath
            };

            ResolutionActionViewModel userMergeChangesAction = new ResolutionActionViewModel()
            {
                ResolutionActionDescription   = Properties.Resources.UserMergeChangesAction,
                ResolutionActionReferenceName = new VCContentConflictUserMergeChangeAction().ReferenceName,
                UserControl    = changesetPairControl,
                ExecuteCommand = SetChangeSetIDs
            };

            RegisterResolutionAction(takeLocalChangesAction);
            RegisterResolutionAction(takeOtherChangesAction);
            RegisterResolutionAction(userMergeChangesAction);
        }