Наследование: ITaskProject
Пример #1
0
 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 tfs2015Project = new TfsProject();
             tfs2015Project.projInfo             = tpp.SelectedProjects[0];
             tfs2015Project.teamConfig           = tpp.SelectedTeamProjectCollection.GetService <TeamSettingsConfigurationService>();
             tfs2015Project.workItemStoreService = tpp.SelectedTeamProjectCollection.GetService <WorkItemStore>();
             // Get work item types
             tfs2015Project.wiTypes = tfs2015Project.workItemStoreService.Projects[tfs2015Project.projInfo.Name].WorkItemTypes;
             return(tfs2015Project);
         }
     }
     return(null);
 }
Пример #2
0
 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 tfs2015Project = new TfsProject();
       tfs2015Project.projInfo = tpp.SelectedProjects[0];
       tfs2015Project.teamConfig = tpp.SelectedTeamProjectCollection.GetService<TeamSettingsConfigurationService>();
       tfs2015Project.workItemStoreService = tpp.SelectedTeamProjectCollection.GetService<WorkItemStore>();
       // Get work item types
       tfs2015Project.wiTypes = tfs2015Project.workItemStoreService.Projects[tfs2015Project.projInfo.Name].WorkItemTypes;
       return tfs2015Project;
     }
       }
       return null;
 }