public BuildDefinitionsServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, TfsTeamProjectCollection collection, Project project) : base(teamPilgrimServiceModelProvider, teamPilgrimVsService) { BuildDefinitions = new ObservableCollection <BuildDefinitionModel>(); _collection = collection; _project = project; OpenBuildDefintionCommand = new RelayCommand <BuildDefinitionModel>(OpenBuildDefinition, CanOpenBuildDefinition); ViewBuildsCommand = new RelayCommand <BuildDefinitionModel>(ViewBuilds, CanViewBuilds); DeleteBuildDefinitionCommand = new RelayCommand <BuildDefinitionModel>(DeleteBuildDefinition, CanDeleteBuildDefinition); CloneBuildDefinitionCommand = new RelayCommand <BuildDefinitionModel>(CloneBuildDefinition, CanCloneBuildDefinition); QueueBuildCommand = new RelayCommand <BuildDefinitionModel>(QueueBuild, CanQueueBuild); OpenProcessFileLocationCommand = new RelayCommand <BuildDefinitionModel>(OpenProcessFileLocation, CanOpenProcessFileLocation); ManageBuildDefinitionSecurityCommand = new RelayCommand <BuildDefinitionModel>(ManageBuildDefinitionSecurity, CanManageBuildDefinitionSecurity); NewBuildDefinitionCommand = new RelayCommand(NewBuildDefinition, CanNewBuildDefinition); ManageBuildControllersCommand = new RelayCommand(ManageBuildControllers, CanManageBuildControllers); ManageBuildQualitiesCommand = new RelayCommand(ManageBuildQualities, CanManageBuildQualities); ManageBuildSecurityCommand = new RelayCommand(ManageBuildSecurity, CanManageBuildSecurity); _populateBackgroundWorker = new BackgroundWorker(); _populateBackgroundWorker.DoWork += PopulateBackgroundWorkerOnDoWork; _populateBackgroundWorker.RunWorkerAsync(); }
public BaseServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService) { this.teamPilgrimServiceModelProvider = teamPilgrimServiceModelProvider; this.teamPilgrimVsService = teamPilgrimVsService; RefreshCommand = new RelayCommand(Refresh, CanRefresh); }
public WorkItemQueryServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, TfsTeamProjectCollection projectCollection, Project project) : base(teamPilgrimServiceModelProvider, teamPilgrimVsService) { _projectCollection = projectCollection; _project = project; QueryItems = new ObservableCollection<WorkItemQueryChildModel>(); NewWorkItemCommand = new RelayCommand<string>(NewWorkItem, CanNewWorkItem); GoToWorkItemCommand = new RelayCommand(GoToWorkItem, CanGoToWorkItem); NewQueryDefinitionCommand = new RelayCommand<WorkItemQueryFolderModel>(NewQueryDefinition, CanNewQueryDefinition); NewQueryFolderCommand = new RelayCommand<WorkItemQueryFolderModel>(NewQueryFolder, CanNewQueryFolder); OpenQueryDefinitionCommand = new RelayCommand<WorkItemQueryDefinitionModel>(OpenQueryDefinition, CanOpenQueryDefinition); EditQueryDefinitionCommand = new RelayCommand<WorkItemQueryDefinitionModel>(EditQueryDefinition, CanEditQueryDefinition); DeleteQueryItemCommand = new RelayCommand<WorkItemQueryChildModel>(DeleteQueryDefinition, CanDeleteQueryDefinition); OpenSeurityDialogCommand = new RelayCommand<WorkItemQueryChildModel>(OpenSeurityDialog, CanOpenSeurityDialog); _populateBackgroundWorker = new BackgroundWorker(); _populateBackgroundWorker.DoWork +=PopulateBackgroundWorkerOnDoWork; _populateBackgroundWorker.RunWorkerAsync(); }
public BaseServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService) { this.teamPilgrimServiceModelProvider = teamPilgrimServiceModelProvider; this.teamPilgrimVsService = teamPilgrimVsService; RefreshCommand = new RelayCommand(Refresh, CanRefresh); }
public BuildDefinitionsServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, TfsTeamProjectCollection collection, Project project) : base(teamPilgrimServiceModelProvider, teamPilgrimVsService) { BuildDefinitions = new ObservableCollection<BuildDefinitionModel>(); _collection = collection; _project = project; OpenBuildDefintionCommand = new RelayCommand<BuildDefinitionModel>(OpenBuildDefinition, CanOpenBuildDefinition); ViewBuildsCommand = new RelayCommand<BuildDefinitionModel>(ViewBuilds, CanViewBuilds); DeleteBuildDefinitionCommand = new RelayCommand<BuildDefinitionModel>(DeleteBuildDefinition, CanDeleteBuildDefinition); CloneBuildDefinitionCommand = new RelayCommand<BuildDefinitionModel>(CloneBuildDefinition, CanCloneBuildDefinition); QueueBuildCommand = new RelayCommand<BuildDefinitionModel>(QueueBuild, CanQueueBuild); OpenProcessFileLocationCommand = new RelayCommand<BuildDefinitionModel>(OpenProcessFileLocation, CanOpenProcessFileLocation); ManageBuildDefinitionSecurityCommand = new RelayCommand<BuildDefinitionModel>(ManageBuildDefinitionSecurity, CanManageBuildDefinitionSecurity); NewBuildDefinitionCommand = new RelayCommand(NewBuildDefinition, CanNewBuildDefinition); ManageBuildControllersCommand = new RelayCommand(ManageBuildControllers, CanManageBuildControllers); ManageBuildQualitiesCommand = new RelayCommand(ManageBuildQualities, CanManageBuildQualities); ManageBuildSecurityCommand = new RelayCommand(ManageBuildSecurity, CanManageBuildSecurity); _populateBackgroundWorker = new BackgroundWorker(); _populateBackgroundWorker.DoWork += PopulateBackgroundWorkerOnDoWork; _populateBackgroundWorker.RunWorkerAsync(); }
public static WorkItemQueryChildModel[] GetQueryItemViewModels(this IEnumerable<QueryItem> queryHierarchy, IWorkItemQueryCommandModel workItemQueryCommandModel, ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, Project project, int depth) { return queryHierarchy.Select<QueryItem, WorkItemQueryChildModel>(item => { var queryFolder = item as QueryFolder; if (queryFolder != null) { QueryFolderTypeEnum? queryFolderType = null; if (depth == 1) { switch (queryFolder.Name) { case "My Queries": queryFolderType = QueryFolderTypeEnum.MyQueries; break; case "Team Queries": queryFolderType = QueryFolderTypeEnum.TeamQueries; break; } } var foldersChildren = queryFolder.GetQueryItemViewModels(workItemQueryCommandModel, teamPilgrimServiceModelProvider, teamPilgrimVsService, project, depth + 1); return new WorkItemQueryFolderModel(workItemQueryCommandModel, project, depth, queryFolder, foldersChildren, queryFolderType); } var queryDefinition = item as QueryDefinition; if (queryDefinition != null) { return new WorkItemQueryDefinitionModel(workItemQueryCommandModel, project, depth, queryDefinition); } throw new ArgumentException(item.GetType().ToString()); }).ToArray(); }
public WorkItemQueryServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, TfsTeamProjectCollection projectCollection, Project project) : base(teamPilgrimServiceModelProvider, teamPilgrimVsService) { _projectCollection = projectCollection; _project = project; QueryItems = new ObservableCollection <WorkItemQueryChildModel>(); NewWorkItemCommand = new RelayCommand <string>(NewWorkItem, CanNewWorkItem); GoToWorkItemCommand = new RelayCommand(GoToWorkItem, CanGoToWorkItem); NewQueryDefinitionCommand = new RelayCommand <WorkItemQueryFolderModel>(NewQueryDefinition, CanNewQueryDefinition); NewQueryFolderCommand = new RelayCommand <WorkItemQueryFolderModel>(NewQueryFolder, CanNewQueryFolder); OpenQueryDefinitionCommand = new RelayCommand <WorkItemQueryDefinitionModel>(OpenQueryDefinition, CanOpenQueryDefinition); EditQueryDefinitionCommand = new RelayCommand <WorkItemQueryDefinitionModel>(EditQueryDefinition, CanEditQueryDefinition); DeleteQueryItemCommand = new RelayCommand <WorkItemQueryChildModel>(DeleteQueryDefinition, CanDeleteQueryDefinition); OpenSeurityDialogCommand = new RelayCommand <WorkItemQueryChildModel>(OpenSeurityDialog, CanOpenSeurityDialog); _populateBackgroundWorker = new BackgroundWorker(); _populateBackgroundWorker.DoWork += PopulateBackgroundWorkerOnDoWork; _populateBackgroundWorker.RunWorkerAsync(); }
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; }
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 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; }
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 WorkspaceServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, ProjectCollectionServiceModel projectCollectionServiceModel, Workspace workspace) : base(teamPilgrimServiceModelProvider, teamPilgrimVsService) { _projectCollectionServiceModel = projectCollectionServiceModel; Workspace = workspace; var versionControlServer = _projectCollectionServiceModel.TfsTeamProjectCollection.GetVersionControlServer(); this.Logger().Debug("VersionControlServer - WebServiceLevel: {0}, SupportedFeatures: {1}", versionControlServer.WebServiceLevel, versionControlServer.SupportedFeatures); versionControlServer.PendingChangesChanged += VersionControlServerOnPendingChangesChanged; checkinNotesCacheWrapper = new CheckinNotesCacheWrapper(versionControlServer); ShelveCommand = new RelayCommand(Shelve, CanShelve); UnshelveCommand = new RelayCommand(Unshelve, CanUnshelve); CheckInCommand = new RelayCommand(CheckIn, CanCheckIn); RefreshPendingChangesCommand = new RelayCommand(RefreshPendingChanges, CanRefreshPendingChanges); RefreshSelectedDefinitionWorkItemsCommand = new RelayCommand(RefreshSelectedDefinitionWorkItems, CanRefreshSelectedDefinitionWorkItems); ShowSelectWorkItemQueryCommand = new RelayCommand(ShowSelectWorkItemQuery, CanShowSelectWorkItemQuery); EvaluateCheckInCommand = new RelayCommand(EvaluateCheckIn, CanEvaluateCheckIn); SelectPendingChangesCommand = new RelayCommand <SelectPendingChangesCommandArgument>(SelectPendingChanges, CanSelectPendingChanges); SelectWorkItemsCommand = new RelayCommand <SelectWorkItemsCommandArgument>(SelectWorkItems, CanSelectWorkItems); ViewWorkItemCommand = new RelayCommand <ObservableCollection <object> >(ViewWorkItem, CanViewWorkItem); ViewPendingChangeCommand = new RelayCommand <ObservableCollection <object> >(ViewPendingChange, CanViewPendingChange); 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>(); _backgroundFunctionPreventDataUpdate = true; PendingChanges.CollectionChanged += PendingChangesOnCollectionChanged; _populatePendingChangedBackgroundWorker = new BackgroundWorker(); _populatePendingChangedBackgroundWorker.DoWork += PopulatePendingChangedBackgroundWorkerOnDoWork; _populatePendingChangedBackgroundWorker.RunWorkerAsync(); SolutionIsOpen = teamPilgrimVsService.Solution.IsOpen && !string.IsNullOrEmpty(teamPilgrimVsService.Solution.FileName); teamPilgrimVsService.SolutionStateChanged += () => { FilterSolution = false; SolutionIsOpen = teamPilgrimVsService.Solution.IsOpen && !string.IsNullOrEmpty(teamPilgrimVsService.Solution.FileName); }; WorkItems = new ObservableCollection <WorkItemModel>(); WorkItems.CollectionChanged += WorkItemsOnCollectionChanged; PopulatePreviouslySelectedWorkItemQueryModels(); _backgroundFunctionPreventDataUpdate = false; }
public WorkspaceServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, ProjectCollectionServiceModel projectCollectionServiceModel, Workspace workspace) : base(teamPilgrimServiceModelProvider, teamPilgrimVsService) { _projectCollectionServiceModel = projectCollectionServiceModel; Workspace = workspace; var versionControlServer = _projectCollectionServiceModel.TfsTeamProjectCollection.GetVersionControlServer(); this.Logger().Debug("VersionControlServer - WebServiceLevel: {0}, SupportedFeatures: {1}", versionControlServer.WebServiceLevel, versionControlServer.SupportedFeatures); versionControlServer.PendingChangesChanged += VersionControlServerOnPendingChangesChanged; checkinNotesCacheWrapper = new CheckinNotesCacheWrapper(versionControlServer); ShelveCommand = new RelayCommand(Shelve, CanShelve); UnshelveCommand = new RelayCommand(Unshelve, CanUnshelve); CheckInCommand = new RelayCommand(CheckIn, CanCheckIn); RefreshPendingChangesCommand = new RelayCommand(RefreshPendingChanges, CanRefreshPendingChanges); RefreshSelectedDefinitionWorkItemsCommand = new RelayCommand(RefreshSelectedDefinitionWorkItems, CanRefreshSelectedDefinitionWorkItems); ShowSelectWorkItemQueryCommand = new RelayCommand(ShowSelectWorkItemQuery, CanShowSelectWorkItemQuery); EvaluateCheckInCommand = new RelayCommand(EvaluateCheckIn, CanEvaluateCheckIn); SelectPendingChangesCommand = new RelayCommand<SelectPendingChangesCommandArgument>(SelectPendingChanges, CanSelectPendingChanges); SelectWorkItemsCommand = new RelayCommand<SelectWorkItemsCommandArgument>(SelectWorkItems, CanSelectWorkItems); ViewWorkItemCommand = new RelayCommand<ObservableCollection<object>>(ViewWorkItem, CanViewWorkItem); ViewPendingChangeCommand = new RelayCommand<ObservableCollection<object>>(ViewPendingChange, CanViewPendingChange); 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>(); _backgroundFunctionPreventDataUpdate = true; PendingChanges.CollectionChanged += PendingChangesOnCollectionChanged; _populatePendingChangedBackgroundWorker = new BackgroundWorker(); _populatePendingChangedBackgroundWorker.DoWork += PopulatePendingChangedBackgroundWorkerOnDoWork; _populatePendingChangedBackgroundWorker.RunWorkerAsync(); SolutionIsOpen = teamPilgrimVsService.Solution.IsOpen && !string.IsNullOrEmpty(teamPilgrimVsService.Solution.FileName); teamPilgrimVsService.SolutionStateChanged += () => { FilterSolution = false; SolutionIsOpen = teamPilgrimVsService.Solution.IsOpen && !string.IsNullOrEmpty(teamPilgrimVsService.Solution.FileName); }; WorkItems = new ObservableCollection<WorkItemModel>(); WorkItems.CollectionChanged += WorkItemsOnCollectionChanged; PopulatePreviouslySelectedWorkItemQueryModels(); _backgroundFunctionPreventDataUpdate = false; }
public TeamPilgrimServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService) : base(teamPilgrimServiceModelProvider, teamPilgrimVsService) { ProjectCollectionModels = new ObservableCollection <ProjectCollectionServiceModel>(); WorkspaceInfoModels = new ObservableCollection <WorkspaceInfoModel>(); ProjectCollectionModels.CollectionChanged += ProjectCollectionModelsOnCollectionChanged; WorkspaceInfoModels.CollectionChanged += WorkspaceInfoModelsOnCollectionChanged; teamPilgrimVsService.TeamFoundationHost.ContextChanged += TeamFoundationHostOnContextChanged; teamPilgrimVsService.TeamFoundationHost.ServerConnecting += delegate(object sender, ServerConnectingEventArgs args) { Connecting = true; ConnectingServer = args.TeamProjectCollection != null ? args.TeamProjectCollection.Name : null; }; teamPilgrimVsService.TeamFoundationHost.ServerConnected += delegate(object sender, ServerConnectedEventArgs args) { Connecting = false; ConnectingServer = args.TeamProjectCollection != null ? args.TeamProjectCollection.Name : null; ConnectedError = args.Error; ConnectedStatus = args.Status; }; RefreshCommand = new RelayCommand(Refresh, CanRefresh); TfsConnectCommand = new RelayCommand(TfsConnect, CanTfsConnect); ShowResolveConflicttManagerCommand = new RelayCommand(ShowResolveConflicttManager, CanShowResolveConflicttManager); _populateBackgroundWorker = new BackgroundWorker { WorkerSupportsCancellation = true }; _populateBackgroundWorker.DoWork += PopulateBackgroundWorkerOnDoWork; var activeProjectContext = teamPilgrimVsService.ActiveProjectContext; if (activeProjectContext != null && activeProjectContext.DomainUri != null) { _populateBackgroundWorker.RunWorkerAsync(activeProjectContext.DomainUri); } }
public TeamPilgrimServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService) : base(teamPilgrimServiceModelProvider, teamPilgrimVsService) { ProjectCollectionModels = new ObservableCollection<ProjectCollectionServiceModel>(); WorkspaceInfoModels = new ObservableCollection<WorkspaceInfoModel>(); ProjectCollectionModels.CollectionChanged += ProjectCollectionModelsOnCollectionChanged; WorkspaceInfoModels.CollectionChanged += WorkspaceInfoModelsOnCollectionChanged; teamPilgrimVsService.TeamFoundationHost.ContextChanged += TeamFoundationHostOnContextChanged; teamPilgrimVsService.TeamFoundationHost.ServerConnecting += delegate(object sender, ServerConnectingEventArgs args) { Connecting = true; ConnectingServer = args.TeamProjectCollection != null ? args.TeamProjectCollection.Name : null; }; teamPilgrimVsService.TeamFoundationHost.ServerConnected += delegate(object sender, ServerConnectedEventArgs args) { Connecting = false; ConnectingServer = args.TeamProjectCollection != null ? args.TeamProjectCollection.Name : null; ConnectedError = args.Error; ConnectedStatus = args.Status; }; RefreshCommand = new RelayCommand(Refresh, CanRefresh); TfsConnectCommand = new RelayCommand(TfsConnect, CanTfsConnect); ShowResolveConflicttManagerCommand = new RelayCommand(ShowResolveConflicttManager, CanShowResolveConflicttManager); _populateBackgroundWorker = new BackgroundWorker { WorkerSupportsCancellation = true }; _populateBackgroundWorker.DoWork += PopulateBackgroundWorkerOnDoWork; var activeProjectContext = teamPilgrimVsService.ActiveProjectContext; if (activeProjectContext != null && activeProjectContext.DomainUri != null) { _populateBackgroundWorker.RunWorkerAsync(activeProjectContext.DomainUri); } }
public UnshelveServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, ProjectCollectionServiceModel projectCollectionServiceModel, WorkspaceServiceModel workspaceServiceModel) : base(teamPilgrimServiceModelProvider, teamPilgrimVsService) { ProjectCollectionServiceModel = projectCollectionServiceModel; WorkspaceServiceModel = workspaceServiceModel; ShelvesetOwner = projectCollectionServiceModel.TfsTeamProjectCollection.AuthorizedIdentity.UniqueName; FindShelvesetsCommand = new RelayCommand <string>(FindShelvesets, CanFindShelvesets); CancelCommand = new RelayCommand(Cancel, CanCancel); ViewPendingSetCommand = new RelayCommand <ShelvesetModel>(ViewPendingSet, CanViewPendingSet); UnshelveCommand = new RelayCommand <ObservableCollection <object> >(Unshelve, CanUnshelve); DeleteCommand = new RelayCommand <ObservableCollection <object> >(Delete, CanDelete); DetailsCommand = new RelayCommand <ObservableCollection <object> >(Details, CanDetails); FindShelvesetsCommand.Execute(null); }
public UnshelveServiceModel(ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, ProjectCollectionServiceModel projectCollectionServiceModel, WorkspaceServiceModel workspaceServiceModel) : base(teamPilgrimServiceModelProvider, teamPilgrimVsService) { ProjectCollectionServiceModel = projectCollectionServiceModel; WorkspaceServiceModel = workspaceServiceModel; ShelvesetOwner = projectCollectionServiceModel.TfsTeamProjectCollection.AuthorizedIdentity.UniqueName; FindShelvesetsCommand = new RelayCommand<string>(FindShelvesets, CanFindShelvesets); CancelCommand = new RelayCommand(Cancel, CanCancel); ViewPendingSetCommand = new RelayCommand<ShelvesetModel>(ViewPendingSet, CanViewPendingSet); UnshelveCommand = new RelayCommand<ObservableCollection<object>>(Unshelve, CanUnshelve); DeleteCommand = new RelayCommand<ObservableCollection<object>>(Delete, CanDelete); DetailsCommand = new RelayCommand<ObservableCollection<object>>(Details, CanDetails); FindShelvesetsCommand.Execute(null); }
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); }
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); }
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); }
public static WorkItemQueryChildModel[] GetQueryItemViewModels(this IEnumerable <QueryItem> queryHierarchy, IWorkItemQueryCommandModel workItemQueryCommandModel, ITeamPilgrimServiceModelProvider teamPilgrimServiceModelProvider, ITeamPilgrimVsService teamPilgrimVsService, Project project, int depth) { return(queryHierarchy.Select <QueryItem, WorkItemQueryChildModel>(item => { var queryFolder = item as QueryFolder; if (queryFolder != null) { QueryFolderTypeEnum?queryFolderType = null; if (depth == 1) { switch (queryFolder.Name) { case "My Queries": queryFolderType = QueryFolderTypeEnum.MyQueries; break; case "Team Queries": queryFolderType = QueryFolderTypeEnum.TeamQueries; break; } } var foldersChildren = queryFolder.GetQueryItemViewModels(workItemQueryCommandModel, teamPilgrimServiceModelProvider, teamPilgrimVsService, project, depth + 1); return new WorkItemQueryFolderModel(workItemQueryCommandModel, project, depth, queryFolder, foldersChildren, queryFolderType); } var queryDefinition = item as QueryDefinition; if (queryDefinition != null) { return new WorkItemQueryDefinitionModel(workItemQueryCommandModel, project, depth, queryDefinition); } throw new ArgumentException(item.GetType().ToString()); }).ToArray()); }
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); }