Inheritance: WorkItemQueryChildModel
 private void OpenQueryDefinition(WorkItemQueryDefinitionModel workItemQueryDefinitionModel)
 {
     WitDefaultCommandHandlerWrapper.ViewQuery(workItemQueryDefinitionModel.QueryDefinition);
 }
        public ShelveServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider,
            ITeamPilgrimVsService teamPilgrimVsService,
            ProjectCollectionServiceModel projectCollectionServiceModel, WorkspaceServiceModel workspaceServiceModel)
            : base(teamPilgrimServiceModelProvider, teamPilgrimVsService)
        {
            _projectCollectionServiceModel = projectCollectionServiceModel;
            _workspaceServiceModel = workspaceServiceModel;

            var versionControlServer = _projectCollectionServiceModel.TfsTeamProjectCollection.GetService<VersionControlServer>();
            versionControlServer.PendingChangesChanged += VersionControlServerOnPendingChangesChanged;

            _filterSolution = workspaceServiceModel.FilterSolution;
            _selectedWorkWorkItemQueryDefinition = workspaceServiceModel.SelectedWorkItemQueryDefinition;
            _comment = workspaceServiceModel.Comment;

            EvaluateCheckInCommand = new RelayCommand(EvaluateCheckIn, CanEvaluateCheckIn);
            ShowSelectWorkItemQueryCommand = new RelayCommand(ShowSelectWorkItemQuery, CanShowSelectWorkItemQuery);
            RefreshPendingChangesCommand = new RelayCommand(RefreshPendingChanges, CanRefreshPendingChanges);
            RefreshSelectedDefinitionWorkItemsCommand = new RelayCommand(RefreshSelectedDefinitionWorkItems, CanRefreshSelectedDefinitionWorkItems);
            ShelveCommand = new RelayCommand(Shelve, CanShelve);
            CancelCommand = new RelayCommand(Cancel, CanCancel);

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

            CompareWithLatestCommand = new RelayCommand<ObservableCollection<object>>(CompareWithLatest, CanCompareWithLatest);
            CompareWithWorkspaceCommand = new RelayCommand<ObservableCollection<object>>(CompareWithWorkspace, CanCompareWithWorkspace);
            UndoPendingChangeCommand = new RelayCommand<ObservableCollection<object>>(UndoPendingChange, CanUndoPendingChange);
            PendingChangePropertiesCommand = new RelayCommand<ObservableCollection<object>>(PendingChangeProperties, CanPendingChangeProperties);

            CheckinNotes = new ObservableCollection<CheckinNoteModel>();

            PendingChanges = new ObservableCollection<PendingChangeModel>();
            foreach (var pendingChangeModel in workspaceServiceModel.PendingChanges)
            {
                PendingChanges.Add(new PendingChangeModel(pendingChangeModel.Change)
                {
                    IncludeChange = pendingChangeModel.IncludeChange
                });
            }

            PendingChanges.CollectionChanged += PendingChangesOnCollectionChanged;

            WorkItems = new ObservableCollection<WorkItemModel>();
            foreach (var workItemModel in workspaceServiceModel.WorkItems)
            {
                WorkItems.Add(new WorkItemModel(workItemModel.WorkItem)
                {
                    IsSelected = workItemModel.IsSelected,
                    WorkItemCheckinAction = workItemModel.WorkItemCheckinAction
                });
            }

            WorkItems.CollectionChanged += WorkItemsOnCollectionChanged;

            SolutionIsOpen = teamPilgrimVsService.Solution.IsOpen && !string.IsNullOrEmpty(teamPilgrimVsService.Solution.FileName);
            teamPilgrimVsService.SolutionStateChanged += () =>
            {
                FilterSolution = false;
                SolutionIsOpen = teamPilgrimVsService.Solution.IsOpen && !string.IsNullOrEmpty(teamPilgrimVsService.Solution.FileName);
            };

            PopulatePreviouslySelectedWorkItemQueryModels();
            PopulateSelectedPendingChangesSummary();

            EvaluateCheckInCommand.Execute(null);
        }
 private void EditQueryDefinition(WorkItemQueryDefinitionModel workItemQueryDefinitionModel)
 {
     teamPilgrimVsService.EditQueryDefinition(_projectCollection, workItemQueryDefinitionModel.QueryDefinition.Id);
 }
 private bool CanOpenQueryDefinition(WorkItemQueryDefinitionModel workItemQueryDefinitionModel)
 {
     return true;
 }
 private bool CanEditQueryDefinition(WorkItemQueryDefinitionModel workItemQueryDefinitionModel)
 {
     return(true);
 }
 private void EditQueryDefinition(WorkItemQueryDefinitionModel workItemQueryDefinitionModel)
 {
     teamPilgrimVsService.EditQueryDefinition(_projectCollection, workItemQueryDefinitionModel.QueryDefinition.Id);
 }
 private void OpenQueryDefinition(WorkItemQueryDefinitionModel workItemQueryDefinitionModel)
 {
     WitDefaultCommandHandlerWrapper.ViewQuery(workItemQueryDefinitionModel.QueryDefinition);
 }