Exemplo n.º 1
0
        private void targetLabel_Click(object sender, EventArgs e)
        {
            if (lastExceptions == null || lastExceptions.Count == 0)
            {
                return;
            }
            PlvsUtils.showErrors(null, lastExceptions);

            lastExceptions        = null;
            targetLabel.BackColor = SystemColors.Control;
            statusBar.BackColor   = SystemColors.Control;
            targetLabel.Text      = "";
            targetLabel.IsLink    = false;
            targetLabel.Image     = null;
            targetLabel.TextAlign = ContentAlignment.MiddleRight;
        }
Exemplo n.º 2
0
        private void findBuildWorker(IEnumerable <BambooServer> servers, string buildKey)
        {
            List <BambooBuild> foundBuilds = new List <BambooBuild>();
            List <Exception>   errors      = new List <Exception>();

            foreach (BambooServer server in servers)
            {
                try {
                    status.setInfo("Searching for build " + buildKey + " on server \"" + server.Name + "\"");
                    BambooBuild build = BambooServerFacade.Instance.getBuildByKey(server, buildKey);
                    foundBuilds.Add(build);
                } catch (Exception e) {
                    errors.Add(e);
                }
            }
            this.safeInvoke(new MethodInvoker(delegate {
                if (foundBuilds.Count > 0)
                {
                    status.setInfo("");
                    foreach (BambooBuild build in foundBuilds)
                    {
                        BuildDetailsWindow.Instance.openBuild(build);
                    }
                }
                else if (errors.Count > 0)
                {
                    PlvsUtils.showErrors("Build key " + buildKey + " not found", errors);
                    status.setError("Build key " + buildKey + " not found", errors);
                }
                else if (foundBuilds.Count == 0)
                {
                    PlvsUtils.showError("Build key " + buildKey + " not found", null);
                    status.setInfo("Build key " + buildKey + " not found");
                }
                DialogResult = DialogResult.OK;
                Close();
            }));
        }