protected override void CreateChildControls()
        {
            var config = (TfsConfigurer)this.GetExtensionConfigurer();

            this.txtArtifactName = new ValidatingTextBox { DefaultText = "Same as project name" };
            this.txtTeamProject = new TeamProjectPicker(config);
            this.txtBuildDefinition = new BuildDefinitionPicker(config);
            this.txtTeamProject.SelectedIndexChanged += (s, e) => { this.txtBuildDefinition.TeamProject = this.txtTeamProject.SelectedValue; };
            this.ddlBuildNumber = new DropDownList
            {
                Items =
                {
                    new ListItem("allow selection at build time", string.Empty),
                    new ListItem("last succeeded build", "success"),
                    new ListItem("last completed build", "last")
                }
            };
            this.txtBuildNumberPattern = new ValidatingTextBox { Text = "_(?<num>[^_]+)$" };

            this.Controls.Add(
                new SlimFormField("Artifact name:", this.txtArtifactName),
                new SlimFormField("Team project:", this.txtTeamProject),
                new SlimFormField("Build definition:", txtBuildDefinition),
                new SlimFormField("Build number:", this.ddlBuildNumber),
                new SlimFormField("Capture pattern:", this.txtBuildNumberPattern)
                {
                    HelpText = "When importing a build, you can opt to use the TFS build number; however, because TFS build numbers "
                    + "can be 1,000 characters (or more), up to 10 characters must be extracted to fit the BuildMaster build number "
                    + "using a Regex capture group named \"num\". The default TFS Build Number Format is $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r); "
                    + " and thus the pattern _(?<num>[^_]+)$ will extract the date and revision."
                }
            );
        }
Example #2
0
        protected override void CreateChildControls()
        {
            var config = (TfsConfigurer)this.GetExtensionConfigurer();

            this.txtArtifactName = new ValidatingTextBox {
                DefaultText = "Same as project name"
            };
            this.txtTeamProject     = new TeamProjectPicker(config);
            this.txtBuildDefinition = new BuildDefinitionPicker(config);
            this.txtTeamProject.SelectedIndexChanged += (s, e) => { this.txtBuildDefinition.TeamProject = this.txtTeamProject.SelectedValue; };
            this.ddlBuildNumber = new DropDownList
            {
                Items =
                {
                    new ListItem("allow selection at build time", string.Empty),
                    new ListItem("last succeeded build",          "success"),
                    new ListItem("last completed build",          "last")
                }
            };
            this.txtBuildNumberPattern = new ValidatingTextBox {
                Text = "_(?<num>[^_]+)$"
            };
            this.chkCreateBuildNumberVariable = new CheckBox()
            {
                Text = "Store the TFS build number as $TfsBuildNumber", Checked = true
            };

            this.Controls.Add(
                new SlimFormField("Artifact name:", this.txtArtifactName),
                new SlimFormField("Team project:", this.txtTeamProject),
                new SlimFormField("Build definition:", txtBuildDefinition),
                new SlimFormField("Build number:",
                                  new Div(this.ddlBuildNumber),
                                  new Div(this.chkCreateBuildNumberVariable)
                                  ),
                new SlimFormField("Capture pattern:", this.txtBuildNumberPattern)
            {
                HelpText = "When importing a build, you can opt to use the TFS build number; however, because TFS build numbers "
                           + "can be 1,000 characters (or more), up to 10 characters must be extracted to fit the BuildMaster build number "
                           + "using a Regex capture group named \"num\". The default TFS Build Number Format is $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r); "
                           + " and thus the pattern _(?<num>[^_]+)$ will extract the date and revision."
            }
                );
        }