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(); }
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(); }
protected virtual void OnShowUnshelveDialog(UnshelveServiceModel unshelveServiceModel) { if (ShowUnshelveDialog != null) { ShowUnshelveDialog(unshelveServiceModel); } }
protected virtual void OnShowUnshelveDialog(UnshelveServiceModel unshelveServiceModel) { if (ShowUnshelveDialog != null) ShowUnshelveDialog(unshelveServiceModel); }
private void SelectedWorkspaceModelOnShowUnshelveDialog(UnshelveServiceModel unshelveServiceModel) { var unshelveChangesDialog = new UnshelveDialog { DataContext = unshelveServiceModel }; var dialogResult = unshelveChangesDialog.ShowDialog(); if (dialogResult.HasValue && dialogResult.Value) { } }