Inheritance: BaseServiceModel
コード例 #1
0
        public UnshelveDetailsServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, ProjectCollectionServiceModel projectCollectionServiceModel, WorkspaceServiceModel workspaceServiceModel, UnshelveServiceModel unshelveServiceModel, Shelveset shelveset)
            : base(teamPilgrimServiceModelProvider, teamPilgrimVsService)
        {
            ProjectCollectionServiceModel = projectCollectionServiceModel;
            WorkspaceServiceModel = workspaceServiceModel;
            UnshelveServiceModel = unshelveServiceModel;
            Shelveset = shelveset;

            PendingChanges = new ObservableCollection<PendingChangeModel>();

            CancelCommand = new RelayCommand(Cancel, CanCancel);
            UnshelveCommand = new RelayCommand(Unshelve, CanUnshelve);

            SelectPendingChangesCommand = new RelayCommand<SelectPendingChangesCommandArgument>(SelectPendingChanges, CanSelectPendingChanges);
            SelectWorkItemsCommand = new RelayCommand<SelectWorkItemsCommandArgument>(SelectWorkItems, CanSelectWorkItems);

            PendingSet[] pendingSets;
            if (teamPilgrimServiceModelProvider.TryWorkspaceQueryShelvedChanges(WorkspaceServiceModel.Workspace, out pendingSets, shelveset.Name, shelveset.OwnerName, null))
            {
                PendingSet = pendingSets.First();

                foreach (var pendingChange in PendingSet.PendingChanges)
                {
                    PendingChanges.Add(new PendingChangeModel(pendingChange) { IncludeChange = true });
                }
            }

            PopulateSelectedPendingChangesSummary();
        }
コード例 #2
0
        public UnshelveDetailsServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, ProjectCollectionServiceModel projectCollectionServiceModel, WorkspaceServiceModel workspaceServiceModel, UnshelveServiceModel unshelveServiceModel, Shelveset shelveset)
            : base(teamPilgrimServiceModelProvider, teamPilgrimVsService)
        {
            ProjectCollectionServiceModel = projectCollectionServiceModel;
            WorkspaceServiceModel         = workspaceServiceModel;
            UnshelveServiceModel          = unshelveServiceModel;
            Shelveset = shelveset;

            PendingChanges = new ObservableCollection <PendingChangeModel>();

            CancelCommand   = new RelayCommand(Cancel, CanCancel);
            UnshelveCommand = new RelayCommand(Unshelve, CanUnshelve);

            SelectPendingChangesCommand = new RelayCommand <SelectPendingChangesCommandArgument>(SelectPendingChanges, CanSelectPendingChanges);
            SelectWorkItemsCommand      = new RelayCommand <SelectWorkItemsCommandArgument>(SelectWorkItems, CanSelectWorkItems);

            PendingSet[] pendingSets;
            if (teamPilgrimServiceModelProvider.TryWorkspaceQueryShelvedChanges(WorkspaceServiceModel.Workspace, out pendingSets, shelveset.Name, shelveset.OwnerName, null))
            {
                PendingSet = pendingSets.First();

                foreach (var pendingChange in PendingSet.PendingChanges)
                {
                    PendingChanges.Add(new PendingChangeModel(pendingChange)
                    {
                        IncludeChange = true
                    });
                }
            }

            PopulateSelectedPendingChangesSummary();
        }
コード例 #3
0
 protected virtual void OnShowUnshelveDialog(UnshelveServiceModel unshelveServiceModel)
 {
     if (ShowUnshelveDialog != null)
     {
         ShowUnshelveDialog(unshelveServiceModel);
     }
 }
コード例 #4
0
 protected virtual void OnShowUnshelveDialog(UnshelveServiceModel unshelveServiceModel)
 {
     if (ShowUnshelveDialog != null)
         ShowUnshelveDialog(unshelveServiceModel);
 }
コード例 #5
0
        private void SelectedWorkspaceModelOnShowUnshelveDialog(UnshelveServiceModel unshelveServiceModel)
        {
            var unshelveChangesDialog = new UnshelveDialog
                {
                    DataContext = unshelveServiceModel
                };

                var dialogResult = unshelveChangesDialog.ShowDialog();
                if (dialogResult.HasValue && dialogResult.Value)
                {

                }
        }