Inheritance: BaseServiceModel
        public ProjectServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, TeamPilgrimServiceModel teamPilgrimServiceModel, TfsTeamProjectCollection tfsTeamProjectCollection, Project project)
            : base(teamPilgrimServiceModelProvider, teamPilgrimVsService)
        {
            TeamPilgrimServiceModel = teamPilgrimServiceModel;
            TfsTeamProjectCollection = tfsTeamProjectCollection;
            Project = project;

            ShowProjectAlertsCommand = new RelayCommand(ShowProjectAlerts, CanShowProjectAlerts);
            OpenSourceControlCommand = new RelayCommand(OpenSourceControl, CanOpenSourceControl);
            OpenPortalSettingsCommand = new RelayCommand(OpenPortalSettings, CanOpenPortalSettings);
            OpenSourceControlSettingsCommand = new RelayCommand(OpenSourceControlSettings, CanOpenSourceControlSettings);
            OpenAreasAndIterationsCommand = new RelayCommand(OpenAreasAndIterations, CanOpenAreasAndIterations);
            ShowSecuritySettingsCommand = new RelayCommand(ShowSecuritySettings, CanShowSecuritySettings);
            OpenGroupMembershipCommand = new RelayCommand(OpenGroupMembership, CanOpenGroupMembership);

            BuildDefinitionsServiceModel = new BuildDefinitionsServiceModel(teamPilgrimServiceModelProvider, teamPilgrimVsService, tfsTeamProjectCollection, project);

            WorkItemQueryServiceModel = new WorkItemQueryServiceModel(teamPilgrimServiceModelProvider, teamPilgrimVsService, tfsTeamProjectCollection, project);

            ChildObjects = new ObservableCollection<BaseModel>
                {
                    WorkItemQueryServiceModel,
                    BuildDefinitionsServiceModel,
                    new SourceControlModel()
                };

            IsActive = teamPilgrimVsService.ActiveProjectContext.ProjectName == Project.Name;
        }
示例#2
0
        public ProjectServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, TeamPilgrimServiceModel teamPilgrimServiceModel, TfsTeamProjectCollection tfsTeamProjectCollection, Project project)
            : base(teamPilgrimServiceModelProvider, teamPilgrimVsService)
        {
            TeamPilgrimServiceModel  = teamPilgrimServiceModel;
            TfsTeamProjectCollection = tfsTeamProjectCollection;
            Project = project;

            ShowProjectAlertsCommand         = new RelayCommand(ShowProjectAlerts, CanShowProjectAlerts);
            OpenSourceControlCommand         = new RelayCommand(OpenSourceControl, CanOpenSourceControl);
            OpenPortalSettingsCommand        = new RelayCommand(OpenPortalSettings, CanOpenPortalSettings);
            OpenSourceControlSettingsCommand = new RelayCommand(OpenSourceControlSettings, CanOpenSourceControlSettings);
            OpenAreasAndIterationsCommand    = new RelayCommand(OpenAreasAndIterations, CanOpenAreasAndIterations);
            ShowSecuritySettingsCommand      = new RelayCommand(ShowSecuritySettings, CanShowSecuritySettings);
            OpenGroupMembershipCommand       = new RelayCommand(OpenGroupMembership, CanOpenGroupMembership);

            BuildDefinitionsServiceModel = new BuildDefinitionsServiceModel(teamPilgrimServiceModelProvider, teamPilgrimVsService, tfsTeamProjectCollection, project);

            WorkItemQueryServiceModel = new WorkItemQueryServiceModel(teamPilgrimServiceModelProvider, teamPilgrimVsService, tfsTeamProjectCollection, project);

            ChildObjects = new ObservableCollection <BaseModel>
            {
                WorkItemQueryServiceModel,
                BuildDefinitionsServiceModel,
                new SourceControlModel()
            };

            IsActive = teamPilgrimVsService.ActiveProjectContext.ProjectName == Project.Name;
        }
        private void AttachShowPendingChangesItemEvent(TeamPilgrimServiceModel teamPilgrimServiceModel)
        {
            if (teamPilgrimServiceModel.SelectedWorkspaceModel == null) return;

            teamPilgrimServiceModel.SelectedWorkspaceModel.ShowPendingChangesItem += SelectedWorkspaceModelOnShowPendingChangesItem;
            teamPilgrimServiceModel.SelectedWorkspaceModel.ShowShelveDialog += SelectedWorkspaceModelOnShowShelveDialog;
            teamPilgrimServiceModel.SelectedWorkspaceModel.ShowUnshelveDialog += SelectedWorkspaceModelOnShowUnshelveDialog;
        }
        public ProjectCollectionServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, TeamPilgrimServiceModel teamPilgrimServiceModel, TfsTeamProjectCollection pilgrimProjectCollection)
            : base(teamPilgrimServiceModelProvider, teamPilgrimVsService)
        {
            ProjectModels = new ObservableCollection<ProjectServiceModel>();

            TfsTeamProjectCollection = pilgrimProjectCollection;
            TeamPilgrimServiceModel = teamPilgrimServiceModel;

            DisconnectCommand = new RelayCommand(Disconnect, CanDisconnect);
            NewTeamProjectCommand = new RelayCommand(NewTeamProject, CanNewTeamProject);
            OpenGroupMembershipCommand = new RelayCommand(OpenGroupMembership, CanOpenGroupMembership);
            ShowProcessTemplateManagerCommand = new RelayCommand(ShowProcessTemplateManager, CanShowProcessTemplateManager);
            ShowSecuritySettingsCommand = new RelayCommand(ShowSecuritySettings, CanShowSecuritySettings);
            OpenSourceControlSettingsCommand = new RelayCommand(OpenSourceControlSettings, CanOpenSourceControlSettings);

            SetActiveProjectCommand = new RelayCommand<ProjectServiceModel>(SetActiveProject, CanSetActiveProject);

            _populateBackgroundWorker = new BackgroundWorker
                {
                    WorkerReportsProgress = true
                };
            _populateBackgroundWorker.DoWork += PopulateBackgroundWorkerOnDoWork;
            _populateBackgroundWorker.RunWorkerAsync(true);
        }
示例#5
0
        public ProjectCollectionServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, TeamPilgrimServiceModel teamPilgrimServiceModel, TfsTeamProjectCollection pilgrimProjectCollection)
            : base(teamPilgrimServiceModelProvider, teamPilgrimVsService)
        {
            ProjectModels = new ObservableCollection <ProjectServiceModel>();

            TfsTeamProjectCollection = pilgrimProjectCollection;
            TeamPilgrimServiceModel  = teamPilgrimServiceModel;

            DisconnectCommand                 = new RelayCommand(Disconnect, CanDisconnect);
            NewTeamProjectCommand             = new RelayCommand(NewTeamProject, CanNewTeamProject);
            OpenGroupMembershipCommand        = new RelayCommand(OpenGroupMembership, CanOpenGroupMembership);
            ShowProcessTemplateManagerCommand = new RelayCommand(ShowProcessTemplateManager, CanShowProcessTemplateManager);
            ShowSecuritySettingsCommand       = new RelayCommand(ShowSecuritySettings, CanShowSecuritySettings);
            OpenSourceControlSettingsCommand  = new RelayCommand(OpenSourceControlSettings, CanOpenSourceControlSettings);

            SetActiveProjectCommand = new RelayCommand <ProjectServiceModel>(SetActiveProject, CanSetActiveProject);

            _populateBackgroundWorker = new BackgroundWorker
            {
                WorkerReportsProgress = true
            };
            _populateBackgroundWorker.DoWork += PopulateBackgroundWorkerOnDoWork;
            _populateBackgroundWorker.RunWorkerAsync(true);
        }