private void OnLoaded(object sender, RoutedEventArgs e)
 {
     try
     {
         using (TeamProjectPicker tpp = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, false))
         {
             System.Windows.Forms.DialogResult result = tpp.ShowDialog();
             if (result == System.Windows.Forms.DialogResult.OK)
             {
                 var context = new AppTfsContext(tpp.SelectedTeamProjectCollection, tpp.SelectedProjects.First());
                 this.MainView.InitializeContext(context);
                 this.MainView.InitializeRepository(new TfsClientRepository(tpp.SelectedTeamProjectCollection));
             }
         }
     }
     catch (Exception ex)
     {
         MainWindow.DisplayError(ex);
     }
 }
Example #2
0
 private void OnLoaded(object sender, RoutedEventArgs e)
 {
     try
     {
         using (TeamProjectPicker tpp = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, false))
         {
             System.Windows.Forms.DialogResult result = tpp.ShowDialog();
             if (result == System.Windows.Forms.DialogResult.OK)
             {
                 var context = new AppTfsContext(tpp.SelectedTeamProjectCollection, tpp.SelectedProjects.First());
                 this.MainView.InitializeContext(context);
                 this.MainView.InitializeRepository(new TfsClientRepository(tpp.SelectedTeamProjectCollection));
             }
         }
     }
     catch (Exception ex)
     {
         MainWindow.DisplayError(ex);
     }
 }