public ITaskProject ConnectToProject(Window window) { using (var tpp = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, false)) { var windowWrapper = new WindowWrapper(new System.Windows.Interop.WindowInteropHelper(window).Handle); var result = tpp.ShowDialog(windowWrapper); if (result == DialogResult.OK) { var tfs2010Project = new TfsProject(); tfs2010Project.projInfo = tpp.SelectedProjects[0]; tfs2010Project.workItemStoreService = tpp.SelectedTeamProjectCollection.GetService <WorkItemStore>(); // Get work item types tfs2010Project.wiTypes = tfs2010Project.workItemStoreService.Projects[tfs2010Project.projInfo.Name].WorkItemTypes; return(tfs2010Project); } } return(null); }
public ITaskProject ConnectToProject(Window window) { using (var tpp = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, false)) { var windowWrapper = new WindowWrapper(new System.Windows.Interop.WindowInteropHelper(window).Handle); var result = tpp.ShowDialog(windowWrapper); if (result == DialogResult.OK) { var tfs2010Project = new TfsProject(); tfs2010Project.projInfo = tpp.SelectedProjects[0]; tfs2010Project.workItemStoreService = tpp.SelectedTeamProjectCollection.GetService<WorkItemStore>(); // Get work item types tfs2010Project.wiTypes = tfs2010Project.workItemStoreService.Projects[tfs2010Project.projInfo.Name].WorkItemTypes; return tfs2010Project; } } return null; }