Esempio n. 1
0
        private void Get_TPC_Info()
        {
            long startTicks = XlHlp.DisplayInWatchWindow("Begin");

            Options_AZDO_TFS options = GetOptions();

            try
            {
                RequestHandlers.SpeedUpStart();

                //// Get the Team Project Collections

                //ReadOnlyCollection<CatalogNode> projectCollectionNodes = VNCTFS.Helper.Get_TeamProjectCollectionNodes(AzureDevOpsExplorer.Presentation.Views.Server.ConfigurationServer);

                var tpcCatalogNode = AzureDevOpsExplorer.Presentation.Views.Server.TfsTeamProjectCollection.CatalogNode;

                CreateWS_TPC_Info(tpcCatalogNode, AzureDevOpsExplorer.Presentation.Views.Server.TfsTeamProjectCollection, false, options);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RequestHandlers.SpeedUpEnd();
            }

            XlHlp.DisplayInWatchWindow("End", startTicks);
        }
Esempio n. 2
0
        private void GetTestCaseInfo(TestCaseRequest request)
        {
            long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME);

            try
            {
                RequestHandlers.SpeedUpStart();

                char[] splitChars = { ',' };

                int testCaseId = 0;

                Options_AZDO_TFS options = GetOptions();

                foreach (string testCase in request.TestID.Split(splitChars, StringSplitOptions.None))
                {
                    if (int.TryParse(testCase, out testCaseId))
                    {
                        CreateWS_TM_TestCaseInfo(testCaseId, request.TestSections, options);
                    }

                    AZDOHelper.ProcessLoopDelay(options);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RequestHandlers.SpeedUpEnd();
            }

            Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks);
        }
Esempio n. 3
0
        private void btnCodeChurn_Click(object sender, RoutedEventArgs e)
        {
            long startTicks = XlHlp.DisplayInWatchWindow("Start");

            Options_AZDO_TFS options = GetOptions();

            try
            {
                RequestHandlers.SpeedUpStart();
                //TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer("http://WhateverServerUrl");
                //IBuildServer buildServer = (IBuildServer)tfs.GetService(typeof(IBuildServer));
                //VersionControlServer VsServer = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
                //IBuildDetail build = buildServer.GetAllBuildDetails(new Uri("http://WhateverBuildUrl"));

                //List<IChangesetsummary> associatedChangesets = InformationNodeConverters.GetAssociatedChangesets(build);

                //foreach (IChangesetsummary changeSetData in associatedChangesets)
                //{
                //    Changeset changeSet = VsServer.GetChangeset(changeSetData.ChangesetId);
                //    foreach (Change change in changeSet.Changes)
                //    {
                //        bool a = change.Item.IsContentDestroyed;
                //        long b = change.Item.ContentLength;
                //    }
                //}
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RequestHandlers.SpeedUpEnd();
            }
        }
Esempio n. 4
0
        private void btnUnmergedChanges_Click(object sender, RoutedEventArgs e)
        {
            long startTicks = XlHlp.DisplayInWatchWindow("Begin");

            try
            {
                RequestHandlers.SpeedUpStart();

                MergeCandidate[] mergeCandidates = AzureDevOpsExplorer.Presentation.Views.Server.VersionControlServer.GetMergeCandidates("$/Development", "$/Release", RecursionType.Full);

                foreach (var mergeCandidate in mergeCandidates)
                {
                    if (mergeCandidate.Changeset.Owner == @"DOMAIN\ChuckNorris")
                    {
                        //This is an unmerged changeset commited by Chuck
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RequestHandlers.SpeedUpEnd();
            }

            XlHlp.DisplayInWatchWindow("End", startTicks);
        }
Esempio n. 5
0
        private void GetTeamProjectInfo(TeamProjectActionRequest request)
        {
            long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME);

            Options_AZDO_TFS options = GetOptions();

            var priorStatusBar = Globals.ThisAddIn.Application.StatusBar;

            try
            {
                Globals.ThisAddIn.Application.DisplayStatusBar = true;

                RequestHandlers.SpeedUpStart();

                if (options.TeamProjects is null)
                {
                    MessageBox.Show("No Team Project(s) selected, aborting");
                }
                else
                {
                    options.TeamProjects.Reverse();

                    foreach (string teamProjectName in options.TeamProjects)
                    {
                        try
                        {
                            Globals.ThisAddIn.Application.StatusBar = "Processing " + teamProjectName;

                            CreateWS_TP(teamProjectName, request, options);

                            Globals.ThisAddIn.Application.ActiveWorkbook.Save();

                            AZDOHelper.ProcessLoopDelay(options);
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(ex.ToString());
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                Globals.ThisAddIn.Application.StatusBar = priorStatusBar;
                RequestHandlers.SpeedUpEnd();
            }

            Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks);
        }
Esempio n. 6
0
        private void GetTeamProjectXML(TeamProjectActionRequest request)
        {
            long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME);

            Options_AZDO_TFS options = GetOptions();

            var priorStatusBar = Globals.ThisAddIn.Application.StatusBar;

            try
            {
                Globals.ThisAddIn.Application.DisplayStatusBar = true;

                RequestHandlers.SpeedUpStart();

                foreach (string teamProjectName in options.TeamProjects)
                {
                    try
                    {
                        Globals.ThisAddIn.Application.StatusBar = "Processing " + teamProjectName;

                        Project project = AzureDevOpsExplorer.Presentation.Views.Server.WorkItemStore.Projects[teamProjectName];

                        Body_WorkItemStore.Get_TP_WorkItemTypesXML(options, project);

                        //Globals.ThisAddIn.Application.ActiveWorkbook.Save();

                        AZDOHelper.ProcessLoopDelay(options);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                Globals.ThisAddIn.Application.StatusBar = priorStatusBar;
                RequestHandlers.SpeedUpEnd();
            }

            Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks);
        }
Esempio n. 7
0
        private void GetConfigurationServerInfo(wucTFSProvider_Picker serverProvider)
        {
            long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME);

            try
            {
                RequestHandlers.SpeedUpStart();

                CreateWS_ConfigurationServer_Info(GetOptions(), AzureDevOpsExplorer.Presentation.Views.Server.ConfigurationServer);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RequestHandlers.SpeedUpEnd();
            }

            Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks);
        }
Esempio n. 8
0
        private void btnSearchForFiles_Click(object sender, RoutedEventArgs e)
        {
            long startTicks = XlHlp.DisplayInWatchWindow("Begin");

            try
            {
                RequestHandlers.SpeedUpStart();

                SearchForFiles();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RequestHandlers.SpeedUpEnd();
            }

            XlHlp.DisplayInWatchWindow("End", startTicks);
        }
Esempio n. 9
0
        private void Get_TPC_Workspaces()
        {
            long startTicks = XlHlp.DisplayInWatchWindow("Begin");

            try
            {
                RequestHandlers.SpeedUpStart();

                //CreateWS_Workspaces(Server.ConfigurationServer.Uri.ToString(), teTeamProjectCollection.Text, GetOptions());
                MessageBox.Show("TBD - Not Implemented Yet");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RequestHandlers.SpeedUpEnd();
            }

            XlHlp.DisplayInWatchWindow("End", startTicks);
        }
Esempio n. 10
0
        private void GetWorkItemInfo(WorkItemActionRequest request)
        {
            long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME);

            try
            {
                RequestHandlers.SpeedUpStart();

                char[] splitChars = { ',' };

                int workItemId = 0;

                Options_AZDO_TFS options = GetOptions();

                foreach (string workItem in request.WorkItemID.Split(splitChars, StringSplitOptions.None))
                {
                    if (int.TryParse(workItem, out workItemId))
                    {
                        CreateWS_WIS_WorkItemInfo(workItemId, request, options);

                        Globals.ThisAddIn.Application.ActiveWorkbook.Save();
                    }

                    AZDOHelper.ProcessLoopDelay(options);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RequestHandlers.SpeedUpEnd();
            }

            Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks);
        }
Esempio n. 11
0
        private void Get_TPC_Members()
        {
            long startTicks = XlHlp.DisplayInWatchWindow("Begin");

            try
            {
                RequestHandlers.SpeedUpStart();

                string tpcName = AzureDevOpsExplorer.Presentation.Views.Server.VersionControlServer.TeamProjectCollection.Name;
                tpcName = tpcName.Substring(tpcName.IndexOf("\\") + 1);

                CreateWS_TPC_Members(tpcName, GetOptions());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RequestHandlers.SpeedUpEnd();
            }

            XlHlp.DisplayInWatchWindow("End", startTicks);
        }