Esempio n. 1
0
        protected override void CreateChildControls()
        {
            this.chkUseStandardGitClient = new CheckBox
            {
                Text = "Use Standard Git Client"
            };

            this.txtGitExecutablePath = new SourceControlFileFolderPicker
            {
                ServerId = this.EditorContext.ServerId,
                Required = false,
            };

            var ctlExePathField = new StandardFormField("Git Executable Path:", this.txtGitExecutablePath);

            this.Controls.Add(
                new FormFieldGroup(
                    "Git Client",
                    "This extension includes a lightweight Git client for Windows. To use an alternate Git client, check the box and provide the path of the other client.",
                    false,
                    new StandardFormField(string.Empty, this.chkUseStandardGitClient),
                    ctlExePathField
                    )
                );

            this.Controls.BindVisibility(this.chkUseStandardGitClient, ctlExePathField);
        }
        protected override void CreateChildControls()
        {
            this.chkUseStandardGitClient = new CheckBox
            {
                Text = "Use Standard Git Client"
            };

            this.txtGitExecutablePath = new SourceControlFileFolderPicker
            {
                ServerId = this.EditorContext.ServerId,
                Required = false,
            };

            var ctlExePathField = new SlimFormField("Git executable path:", this.txtGitExecutablePath);

            this.Controls.Add(
                 new SlimFormField("Git client:", this.chkUseStandardGitClient)
                 {
                     HelpText = "This extension includes a lightweight Git client for Windows. To use an alternate Git client, check the box and provide the path of the other client."
                 },
                 ctlExePathField
            );

            this.Controls.BindVisibility(this.chkUseStandardGitClient, ctlExePathField);
        }
        protected override void CreateChildControls()
        {
            this.chkUseCustomProfileXml = new CheckBox() { Text = "Use custom publish settings..." };
            var ctlProjectPublishProfileXmlContainer = new Div() { ID = "ctlProjectPublishProfileXmlContainer" };

            this.txtProjectPath = new SourceControlFileFolderPicker();
            this.txtProjectPublishProfileName = new ValidatingTextBox();
            this.txtProjectPublishProfileXml = new ValidatingTextBox() { TextMode = TextBoxMode.MultiLine, Rows = 7 };
            ctlProjectPublishProfileXmlContainer.Controls.Add(new Div("Enter custom publish profile XML:"), this.txtProjectPublishProfileXml);

            this.txtProjectBuildConfiguration = new ValidatingTextBox() { Required = true };
            this.txtVisualStudioVersion = new ValidatingTextBox() { DefaultText = "12.0" };
            this.txtAdditionalArguments = new ValidatingTextBox();
            this.txtUserName = new ValidatingTextBox() { DefaultText = "Inherit credentials from extension configuration" };
            this.txtPassword = new PasswordTextBox();

            this.Controls.Add(
                new SlimFormField("Project/Solution file:", this.txtProjectPath),
                new SlimFormField("Publish profile:", new Div("Profile Name:"), this.txtProjectPublishProfileName, this.chkUseCustomProfileXml, ctlProjectPublishProfileXmlContainer),
                new SlimFormField("Build configuration:", this.txtProjectBuildConfiguration),
                new SlimFormField("Visual Studio version:", this.txtVisualStudioVersion)
                {
                    HelpText = "Visual Studio must be installed in order to publish directly from the command line. Choose " 
                    + "the version of Visual Studio that is installed on the selected server in order for Web Deploy to use the "
                    + "appropriate build targets for the installed version. The default is 12.0 (Visual Studio 2013)."
                },
                new SlimFormField("Credentials:", new Div(new Div("Username:"******"Password:"******"Additional MSBuild arguments:", this.txtAdditionalArguments)
            );

            this.Controls.BindVisibility(chkUseCustomProfileXml, ctlProjectPublishProfileXmlContainer);
        }
        protected override void CreateChildControls()
        {
            this.txtProjectBuildConfiguration = new ValidatingTextBox
            {
                ID = "txtProjectBuildConfiguration",
                AutoCompleteValues = new[] { "Debug", "Release" },
                Required = true,
                Text = "Release"
            };

            this.txtProjectPath = new SourceControlFileFolderPicker
            {
                ID = "txtProjectPath",
                Required = true
            };

            this.txtAdditionalArguments = new ValidatingTextBox
            {
                ID = "txtAdditionalArguments",
                DefaultText = "(none)"
            };

            this.Controls.Add(
                new SlimFormField("Project file:", this.txtProjectPath),
                new SlimFormField("Configuration:", this.txtProjectBuildConfiguration),
                new SlimFormField("Additional arguments:", this.txtAdditionalArguments)
            );
        }
Esempio n. 5
0
 protected override void CreateChildControls()
 {
     base.CreateChildControls();
     this.txtDirectoryName = new ValidatingTextBox()
     {
         Width = 300
     };
     this.txtProperties = new ValidatingTextBox()
     {
         Width = 300, TextMode = TextBoxMode.MultiLine
     };
     ffpArtifactFile = new SourceControlFileFolderPicker()
     {
         ServerId = 1
     };
     this.Controls.Add(new FormFieldGroup("Directory", "Directory Information", false,
                                          new StandardFormField("Directory Name:", txtDirectoryName)
                                          )
                       );
     this.Controls.Add(new FormFieldGroup("Artifact", "Artifact information", false,
                                          new StandardFormField("Artifact File Disk Location:", ffpArtifactFile)
                                          )
                       );
     this.Controls.Add(new FormFieldGroup("Properties",
                                          "Additional properties for artifacts. Enter each as a name=value pair on a line", true,
                                          new StandardFormField("Properties:", txtProperties)
                                          )
                       );
 }
Esempio n. 6
0
        private void CreateSelectDeploymentPathControls()
        {
            var ctlTargetDeploymentPath = new SourceControlFileFolderPicker()
            {
                DisplayMode = SourceControlBrowser.DisplayModes.Folders,
                ServerId    = 1,
                Width       = 350,
                Text        = @"C:\TfsTestDeploys\"
            };


            this.wizardSteps.SelectDeploymentPath.Controls.Add(
                new SlimFormField("Deployment target:", ctlTargetDeploymentPath)
            {
                HelpText = "Select a directory where the artifact will be deployed. You can change the server/path in which this gets deployed to later."
            }
                );

            this.WizardStepChange += (s, e) =>
            {
                if (e.CurrentStep != this.wizardSteps.SelectDeploymentPath)
                {
                    return;
                }

                this.TargetDeploymentPath = ctlTargetDeploymentPath.Text;
            };
        }
        protected override void CreateChildControls()
        {
            this.chkUseStandardGitClient = new CheckBox
            {
                Text = "Use Standard Git Client"
            };

            this.txtGitExecutablePath = new SourceControlFileFolderPicker
            {
                ServerId = this.EditorContext.ServerId,
                Required = false
            };

            this.txtOrganizationName = new ValidatingTextBox {
                Required = false, DefaultText = "Optional", Width = 300
            };
            this.txtUserName = new ValidatingTextBox {
                Required = true, Width = 300
            };
            this.txtPassword = new PasswordTextBox {
                Required = true, Width = 300
            };

            var ctlExePathField = new StandardFormField("Git Executable Path:", this.txtGitExecutablePath);

            this.Controls.Add(
                new FormFieldGroup(
                    "Organization",
                    "Optionally provide the organization name which owns the repositories.",
                    false,
                    new StandardFormField(
                        "Organization:",
                        this.txtOrganizationName
                        )
                    ),
                new FormFieldGroup(
                    "Authentication",
                    "Provide the user name and password of a GitHub user which has access to the desired repositories.",
                    false,
                    new StandardFormField(
                        "User Name:",
                        this.txtUserName
                        ),
                    new StandardFormField(
                        "Password:"******"Git Client",
                    "This extension includes a lightweight Git client for Windows. To use an alternate Git client, check the box and provide the path of the other client.",
                    false,
                    new StandardFormField(string.Empty, this.chkUseStandardGitClient),
                    ctlExePathField
                    )
                );

            this.Controls.BindVisibility(this.chkUseStandardGitClient, ctlExePathField);
        }
Esempio n. 8
0
        protected override void CreateChildControls()
        {
            Tables.Deployables_Extended deployable = null;
            if (this.DeployableId > 0)
            {
                deployable = DB.Applications_GetDeployable(this.DeployableId).FirstOrDefault();
            }

            this.txtExePath = new SourceControlFileFolderPicker
            {
                DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles,
                ServerId    = this.ServerId,
                DefaultText = "default for selected configuration"
            };

            this.txtGroupName = new ValidatingTextBox
            {
                Text     = deployable != null ? deployable.Deployable_Name : string.Empty,
                Required = true
            };

            this.txtTestFile = new ValidatingTextBox
            {
                Required = true
            };

            this.txtAdditionalArguments = new ValidatingTextBox
            {
                DefaultText = "none"
            };

            this.txtCustomXmlOutputPath = new ValidatingTextBox
            {
                DefaultText = "managed by BuildMaster"
            };

            this.chkTreatInconclusiveTestsAsFailure = new CheckBox
            {
                Text    = "Treat inconclusive tests as failures",
                Checked = true
            };

            this.Controls.Add(
                new SlimFormField("Unit test group:", this.txtGroupName),
                new SlimFormField("NUnit-console.exe path:", this.txtExePath)
            {
                HelpText = "The path to (and including) nunit-console.exe if using a different version of NUnit than the one specified "
                           + "in the NUnit extension configuration."
            },
                new SlimFormField("Test file:", this.txtTestFile)
            {
                HelpText = "This should normally be a .dll or project file."
            },
                new SlimFormField("XML output path:", this.txtCustomXmlOutputPath),
                new SlimFormField("Additional NUnit arguments:", this.txtAdditionalArguments),
                new SlimFormField("Options:", this.chkTreatInconclusiveTestsAsFailure)
                );
        }
        public AzureConfigurerEditor()
        {
            this.sdkPath = new SourceControlFileFolderPicker();
            this.sdkPath.ID = "sdkPath";
            this.sdkPath.DisplayMode = SourceControlBrowser.DisplayModes.Folders;

            this.txtSubscriptionID = new ValidatingTextBox() { Width = 300 };
            this.txtCertificateName = new ValidatingTextBox() { Width = 300 };
        }
Esempio n. 10
0
 public AzureActionWithConfigBaseEditor()
 {
     this.txtConfigText = new TextBox()
     {
         TextMode = TextBoxMode.MultiLine, Width = 300, Rows = 4
     };
     this.ffpConfigFilePath = new SourceControlFileFolderPicker()
     {
         Width = 300, ServerId = 1
     };
 }
        protected override void CreateChildControls()
        {
            this.ctlScriptPath = new SourceControlFileFolderPicker { Required = true };

            this.txtArguments = new ValidatingTextBox();

            this.Controls.Add(
                new SlimFormField("Script file path:", this.ctlScriptPath),
                new SlimFormField("CScript arguments:", this.txtArguments)
            );
        }
        protected override void CreateChildControls()
        {
            this.chkUseStandardGitClient = new CheckBox
            {
                Text = "Use Standard Git Client"
            };

            this.txtGitExecutablePath = new SourceControlFileFolderPicker
            {
                ServerId = this.EditorContext.ServerId,
                Required = false
            };

            this.txtOrganizationName = new ValidatingTextBox { Required = false, DefaultText = "Optional", Width = 300 };
            this.txtUserName = new ValidatingTextBox { Required = true, Width = 300 };
            this.txtPassword = new PasswordTextBox { Required = true, Width = 300 };

            var ctlExePathField = new StandardFormField("Git Executable Path:", this.txtGitExecutablePath);

            this.Controls.Add(
                new FormFieldGroup(
                    "Organization",
                    "Optionally provide the organization name which owns the repositories.",
                    false,
                    new StandardFormField(
                        "Organization:",
                        this.txtOrganizationName
                    )
                ),
                new FormFieldGroup(
                    "Authentication",
                    "Provide the user name and password of a GitHub user which has access to the desired repositories.",
                    false,
                    new StandardFormField(
                        "User Name:",
                        this.txtUserName
                    ),
                    new StandardFormField(
                        "Password:"******"Git Client",
                    "This extension includes a lightweight Git client for Windows. To use an alternate Git client, check the box and provide the path of the other client.",
                    false,
                    new StandardFormField(string.Empty, this.chkUseStandardGitClient),
                    ctlExePathField
                )
            );

            this.Controls.BindVisibility(this.chkUseStandardGitClient, ctlExePathField);
        }
Esempio n. 13
0
        protected override void CreateChildControls()
        {
            this._txtFakeExecutablePath = new SourceControlFileFolderPicker
            {
                ServerId = this.ServerId,
                Required = true
            };

            this._txtWorkingDirectory = new SourceControlFileFolderPicker
            {
                ServerId    = this.ServerId,
                DefaultText = "default"
            };

            this._txtFakeFile = new ValidatingTextBox {
                Width = 300
            };

            this._txtTasks = new ValidatingTextBox {
                Width = 300
            };

            this._txtVariableValues = new ValidatingTextBox
            {
                TextMode = TextBoxMode.MultiLine,
                Rows     = 5,
                Width    = 300
            };

            this.Controls.Add(
                new FormFieldGroup("Fake Executable Path",
                                   "The path to the Fake executable.",
                                   false,
                                   new StandardFormField("Fake Executable Path:", this._txtFakeExecutablePath),
                                   new StandardFormField("Working Directory:", this._txtWorkingDirectory)
                                   ),
                new FormFieldGroup("Fake File",
                                   "The optional Fake File to use, relative to the working directory.",
                                   false,
                                   new StandardFormField("Fake File:", this._txtFakeFile)
                                   ),
                new FormFieldGroup("Tasks",
                                   "Enter the tasks to run, separated by spaces.",
                                   false,
                                   new StandardFormField("Build Properties:", this._txtTasks)
                                   ),
                new FormFieldGroup("Environment Variables",
                                   "You may optionally specify additional environment variables and values for this execution, separated by newlines. For example:<br />opt1=value1<br />opt2=value2",
                                   true,
                                   new StandardFormField("Environment Variables:", this._txtVariableValues)
                                   )
                );
        }
Esempio n. 14
0
        public AzureConfigurerEditor()
        {
            this.sdkPath             = new SourceControlFileFolderPicker();
            this.sdkPath.ID          = "sdkPath";
            this.sdkPath.DisplayMode = SourceControlBrowser.DisplayModes.Folders;

            this.txtSubscriptionID = new ValidatingTextBox()
            {
                Width = 300
            };
            this.txtCertificateName = new ValidatingTextBox()
            {
                Width = 300
            };
        }
        protected override void CreateChildControls()
        {
            this.txtSubject = new ValidatingTextBox { Required = true };
            this.txtTimestampServer = new ValidatingTextBox { DefaultText = "(none)" };
            this.txtContentDescription = new ValidatingTextBox { DefaultText = "(none)", };
            this.txtContentUrl = new ValidatingTextBox { DefaultText = "(none)" };
            this.ctlSignExe = new SourceControlFileFolderPicker { DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles };

            this.Controls.Add(
                new SlimFormField("File to sign:", this.ctlSignExe),
                new SlimFormField("Certificate subject:", this.txtSubject),
                new SlimFormField("Timestamp server URL:", this.txtTimestampServer),
                new SlimFormField("Description:", this.txtContentDescription),
                new SlimFormField("Information URL:", this.txtContentUrl)
            );
        }
 protected override void CreateChildControls()
 {
     base.CreateChildControls();
     txtLabel = new ValidatingTextBox()
     {
         Width = 300
     };
     chkStartDeployment = new CheckBox()
     {
         Width = 300
     };
     txtStorageAccountName = new ValidatingTextBox()
     {
         Width = 300, Required = true
     };
     txtStorageAccessKey = new ValidatingTextBox()
     {
         Width = 300, Required = true
     };
     ffpPackageFile = new SourceControlFileFolderPicker()
     {
         ServerId = 1
     };
     txtPackageFileStorageLocation = new ValidatingTextBox()
     {
         Width = 300
     };
     chkDeleteFromStorage = new CheckBox()
     {
         Width = 300
     };
     this.Controls.Add(new FormFieldGroup("Deploy Package Configuration",
                                          "Options for the Deploy Cloud Service package action", true,
                                          new StandardFormField("Label:", txtLabel),
                                          new StandardFormField("Start Deployment:", chkStartDeployment),
                                          new StandardFormField("Blob Storage Account Name:", txtStorageAccountName),
                                          new StandardFormField("Blob Storage Access Key:", txtStorageAccessKey),
                                          new StandardFormField("Package File Disk Location:", ffpPackageFile),
                                          new StandardFormField("Package File Blob Location:", txtPackageFileStorageLocation),
                                          new StandardFormField("Delete staged package from Blob Storage when complete", chkDeleteFromStorage)
                                          )
                       );
 }
Esempio n. 17
0
        protected override void CreateChildControls()
        {
            this.txtExePath = new SourceControlFileFolderPicker
            {
                DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles,
                ServerId    = this.EditorContext.ServerId,
                Required    = true
            };

            this.txtTagUser = new ValidatingTextBox {
                DefaultText = "Local repository default"
            };

            this.Controls.Add(
                new SlimFormField("Username for tags:", this.txtTagUser),
                new SlimFormField("Hg command path:", this.txtExePath)
            {
                HelpText = "The executable path for hg (hg.exe on Windows)."
            }
                );
        }
Esempio n. 18
0
        public AzureConfigurerEditor()
        {
            //ddlServer = new DropDownList();
            //ddlServer.ID = "ddlServer";
            //ddlServer.AutoPostBack = true;
            //ddlServer.SelectedIndexChanged += delegate(object sender, EventArgs e)
            //{
            //    sdkPath.Text = null;
            //};

            //vreq_ddlServer = new StyledRequiredFieldValidator();
            //vreq_ddlServer.ID = "vreq_ddlServer";
            //vreq_ddlServer.InitialValue = "0";

            sdkPath = new SourceControlFileFolderPicker();
            sdkPath.ID = "sdkPath";
            sdkPath.DisplayMode = SourceControlBrowser.DisplayModes.Folders;

            txtSubscriptionID = new ValidatingTextBox() { Width = 300 };
            txtCertificateName = new ValidatingTextBox() { Width = 300 };
        }
        protected override void CreateChildControls()
        {
            this.txtSubject = new ValidatingTextBox { Required = true, Width = 300 };
            this.txtTimestampServer = new ValidatingTextBox { DefaultText = "(none)", Width = 300 };
            this.txtContentDescription = new ValidatingTextBox { DefaultText = "(none)", Width = 300 };
            this.txtContentUrl = new ValidatingTextBox { DefaultText = "(none)", Width = 300 };
            this.ctlSignExe = new SourceControlFileFolderPicker
            {
                ServerId = this.ServerId,
                DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles
            };

            this.Controls.Add(
                new FormFieldGroup(
                    "Target",
                    "Specify the executable file to sign.",
                    false,
                    new StandardFormField("File to Sign:", this.ctlSignExe)
                ),
                new FormFieldGroup(
                    "Subject",
                    "The subject name (or a substring of the subject name) of the signing certificate.",
                    false,
                    new StandardFormField("Subject Name:", this.txtSubject)
                ),
                new FormFieldGroup(
                    "Timestamp Server URL",
                    "The URL of the timestamp server used when signing the executable. If not specified, no timestamp is used.",
                    false,
                    new StandardFormField("Timestamp Server URL:", this.txtTimestampServer)
                ),
                new FormFieldGroup(
                    "Additional Metadata",
                    "Optionally provide additional information to add to the signature.",
                    true,
                    new StandardFormField("Description of Signed Content:", this.txtContentDescription),
                    new StandardFormField("URL with More Information:", this.txtContentUrl)
                )
            );
        }
 protected override void CreateChildControls()
 {
     base.CreateChildControls();
     this.txtItemName = new ValidatingTextBox()
     {
         Width = 300
     };
     this.txtProperties = new ValidatingTextBox()
     {
         Width = 300, TextMode = TextBoxMode.MultiLine
     };
     this.ffpFileName = new SourceControlFileFolderPicker()
     {
         ServerId = 1
     };
     this.Controls.Add(new FormFieldGroup("Artifact", "Artifact Information", true,
                                          new StandardFormField("Item Name:", txtItemName),
                                          new StandardFormField("Properties:", txtProperties),
                                          new StandardFormField("Output File:", ffpFileName)
                                          )
                       );
 }
        protected override void CreateChildControls()
        {
            this.libPath = new SourceControlFileFolderPicker() { Required = true, DisplayMode = SourceControlBrowser.DisplayModes.Folders, ServerId = this.ServerId };
            this.searchMask = new ValidatingTextBox() { Required = true, Text = "*.csproj", TextMode = TextBoxMode.MultiLine,  Rows = 4, Columns = 30, Width = 300 };
            this.recursive = new CheckBox() { Text = "Recursive" };

            this.Controls.Add(
                new FormFieldGroup(
                    "Library",
                    "The library directory which contains referenced assemblies.",
                    false,
                    new StandardFormField(string.Empty, this.libPath)
                    ),
                new FormFieldGroup(
                    "Project Files",
                    "Determines which project files are converted.",
                    true,
                    new StandardFormField("File Masks:", this.searchMask),
                    new StandardFormField(string.Empty, this.recursive)
                    )
                );
        }
 protected override void CreateChildControls()
 {
     base.CreateChildControls();
     txtLabel = new ValidatingTextBox() {Width = 300};
     chkStartDeployment = new CheckBox() { Width = 300 };
     txtStorageAccountName = new ValidatingTextBox() { Width = 300, Required = true };
     txtStorageAccessKey = new ValidatingTextBox() {Width = 300, Required = true};
     ffpPackageFile = new SourceControlFileFolderPicker() { ServerId = 1 };
     txtPackageFileStorageLocation = new ValidatingTextBox() { Width = 300 };
     chkDeleteFromStorage = new CheckBox() { Width = 300 };
     this.Controls.Add(new FormFieldGroup("Deploy Package Configuration",
         "Options for the Deploy Cloud Service package action",true,
         new StandardFormField("Label:",txtLabel),
         new StandardFormField("Start Deployment:",chkStartDeployment),
         new StandardFormField("Blob Storage Account Name:",txtStorageAccountName),
         new StandardFormField("Blob Storage Access Key:",txtStorageAccessKey),
         new StandardFormField("Package File Disk Location:",ffpPackageFile),
         new StandardFormField("Package File Blob Location:",txtPackageFileStorageLocation),
         new StandardFormField("Delete staged package from Blob Storage when complete",chkDeleteFromStorage)
         )
     );
 }
        protected override void CreateChildControls()
        {
            this.txtApiUrl = new ValidatingTextBox() { DefaultText = GitHub.GitHubComUrl };

            this.chkUseStandardGitClient = new CheckBox
            {
                Text = "Use Standard Git Client"
            };

            this.txtGitExecutablePath = new SourceControlFileFolderPicker
            {
                ServerId = this.EditorContext.ServerId,
                Required = false
            };

            this.txtOrganizationName = new ValidatingTextBox { Required = false, DefaultText = "Optional" };
            this.txtUserName = new ValidatingTextBox { Required = true };
            this.txtPassword = new PasswordTextBox { Required = true };

            var ctlExePathField = new SlimFormField("Git executable path:", this.txtGitExecutablePath);

            this.Controls.Add(
                new SlimFormField("API base URL:", this.txtApiUrl)
                {
                    HelpText = "This provider connects to github.com by default. If connecting to GitHub Enterprise on a local network, specify the hostname of the API here."
                },
                new SlimFormField("Organization name:", this.txtOrganizationName),
                new SlimFormField("GitHub username:"******"GitHub password:"******"Git client:", this.chkUseStandardGitClient)
                {
                    HelpText = "This extension includes a lightweight Git client for Windows. To use an alternate Git client, check the box and provide the path of the other client."
                },
                ctlExePathField
            );

            this.Controls.BindVisibility(this.chkUseStandardGitClient, ctlExePathField);
        }
        protected override void CreateChildControls()
        {
            this.txtProjectFilePath = new SourceControlFileFolderPicker
            {
                ID = "txtProjectFilePath",
                Required = true
            };

            this.txtMSBuildTarget = new ValidatingTextBox
            {
                ID = "txtMSBuildTarget",
                Required = true
            };

            this.txtAdditionalProperties = new ValidatingTextBox
            {
                ID = "txtAdditionalProperties",
                TextMode = TextBoxMode.MultiLine,
                DefaultText = "(none)",
                Rows = 5
            };

            this.txtAdditionalArguments = new ValidatingTextBox
            {
                ID = "txtAdditionalArguments",
                DefaultText = "(none)"
            };

            this.Controls.Add(
                new SlimFormField("MSBuild file:", this.txtProjectFilePath),
                new SlimFormField("MSBuild target:", this.txtMSBuildTarget),
                new SlimFormField("MSBuild properties:", this.txtAdditionalProperties)
                {
                    HelpText = HelpText.FromHtml("Additional properties, separated by newlines. Example:<br />WarningLevel=2<br />Optimize=false")
                },
                new SlimFormField("Additional arguments:", this.txtAdditionalArguments)
            );
        }
        protected override void CreateChildControls()
        {
            //Inedo.Web.Controls.

            this.txtApplicationName = new ValidatingTextBox { Required = true, Width = 300 };
            this.txtProviderUrl = new ValidatingTextBox { Required = true, Width = 300 };
            this.txtCertificatePath = new SourceControlFileFolderPicker { ServerId = this.ServerId };
            this.txtCertificatePassword = new PasswordTextBox { Width = 250 };
            this.txtCertificateHash = new ValidatingTextBox { Width = 300 };
            this.txtVersion = new ValidatingTextBox { Required = true, Width = 300 };
            this.txtMinVersion = new ValidatingTextBox { Required = false, Width = 300 };
            this.chkMapFileExtensions = new CheckBox { Text = "Rename files to .deploy" };
            this.chkInstallApplication = new CheckBox { Text = "Install application onto local machine" };
            this.chkCreateDesktopIcon = new CheckBox { Text = "Create desktop icon" };
            this.chkStartupCheckForUpdate = new CheckBox { Text = "Check for update at startup" };
            this.txtEntryPointFile = new ValidatingTextBox { Width = 300 };
            this.txtFilesExcludedFromManifest = new ValidatingTextBox { Width = 300, TextMode = TextBoxMode.MultiLine };
            this.txtIconFile = new ValidatingTextBox { Required = false, Width = 300 };
            this.txtAppCodeBaseDirectory = new ValidatingTextBox { Width = 300 };
            this.chkTrustUrlParameters = new CheckBox { Text = "Trust URL Parameters" };

            this.txtFileAssociationDefaultIcon1 = new ValidatingTextBox { Width = 300 };
            this.txtFileAssociationDescription1 = new ValidatingTextBox { Width = 300 };
            this.txtFileAssociationExtension1 = new ValidatingTextBox { Width = 300 };
            this.txtFileAssociationProgId1 = new ValidatingTextBox { Width = 300 };

            this.txtFileAssociationDefaultIcon2 = new ValidatingTextBox { Width = 300 };
            this.txtFileAssociationDescription2 = new ValidatingTextBox { Width = 300 };
            this.txtFileAssociationExtension2 = new ValidatingTextBox { Width = 300 };
            this.txtFileAssociationProgId2 = new ValidatingTextBox { Width = 300 };

            this.Controls.Add(
                new FormFieldGroup(
                    "Application Settings",
                    "Configuration for the application. Note that the version number and minimum version number "
                    + "must be of the form 0.0.0.0. The minimum version can be used to force an update preventing the user from skipping it."
                    + " The provider URL should be where the application is deployed to (e.g. http://example.com/MyApp/)",
                    false,
                    new StandardFormField(
                        "Application Name:",
                        this.txtApplicationName),
                    new StandardFormField(
                        "Version Number:",
                        this.txtVersion),
                        new StandardFormField(
                        "Minimum Version Number:",
                        this.txtMinVersion),
                    new StandardFormField(
                        "Provider URL:",
                        this.txtProviderUrl),
                    new StandardFormField("Icon File:", this.txtIconFile),
                    new StandardFormField("Application Code Base Directory:", this.txtAppCodeBaseDirectory),
                    new StandardFormField(
                        "Entry Point File:",
                        this.txtEntryPointFile),
                    new StandardFormField("Files to exclude from manifest:",
                        this.txtFilesExcludedFromManifest),
                    new StandardFormField(String.Empty, this.chkTrustUrlParameters),
                    new StandardFormField("File Association 1:",
                        new StandardFormField("Default Icon:", this.txtFileAssociationDefaultIcon1),
                        new StandardFormField("Description:", this.txtFileAssociationDescription1),
                        new StandardFormField("Extension:", this.txtFileAssociationExtension1),
                        new StandardFormField("Prog Id:", this.txtFileAssociationProgId1)),
                    new StandardFormField("File Association 2:",
                        new StandardFormField("Default Icon:", this.txtFileAssociationDefaultIcon2),
                        new StandardFormField("Description:", this.txtFileAssociationDescription2),
                        new StandardFormField("Extension:", this.txtFileAssociationExtension2),
                        new StandardFormField("Prog Id:", this.txtFileAssociationProgId2))
                    ),
                new FormFieldGroup(
                    "File Extension Mapping",
                    "Determines whether files in the deployment will have a .deploy extension. "
                    + "ClickOnce will strip this extension off these files as soon as it downloads them "
                    + "from the Web server. This parameter allows all the files within a ClickOnce deployment "
                    + "to be downloaded from a Web server that blocks transmission of files ending in \"unsafe\" "
                    + "extensions such as .exe. ",
                    false,
                    new StandardFormField(string.Empty, this.chkMapFileExtensions)),
                new FormFieldGroup(
                    "Installation Settings",
                    "Indicates whether or not the ClickOnce application should install onto the local machine, "
                    + "or whether it should run from the Web. Installing an application gives that application a "
                    + "presence in the Windows Start menu.",
                    false,
                    new StandardFormField(string.Empty, this.chkInstallApplication),
                    new StandardFormField(string.Empty, this.chkCreateDesktopIcon),
                    new StandardFormField(string.Empty, this.chkStartupCheckForUpdate)),
                new FormFieldGroup(
                    "Certificate Settings",
                    "ClickOnce applications must be signed with an X509 certificate, "
                    + "which may be stored on disk or in the local cert store. "
                    + "<br /><br />Note that either a Certificate Path or Certificate Hash "
                    + "must be selected, but not both",
                    true,
                    new StandardFormField(
                        "Certificate Path:",
                        this.txtCertificatePath),
                    new StandardFormField(
                        "Certificate Hash:",
                        this.txtCertificateHash),
                    new StandardFormField(
                        "Certificate Password:",
                        this.txtCertificatePassword)));
        }
 public AzureActionWithConfigBaseEditor()
 {
     this.txtConfigText = new TextBox() { TextMode = TextBoxMode.MultiLine, Width = 300, Rows = 4 };
     this.ffpConfigFilePath = new SourceControlFileFolderPicker() { Width = 300, ServerId = 1 };
 }
Esempio n. 27
0
 protected override void CreateChildControls()
 {
     this.ffpServiceDefinition = new SourceControlFileFolderPicker()
     {
         ID = "serviceDefinition", DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles, ServerId = 1
     };
     this.txtWebRoleName = new ValidatingTextBox()
     {
         Width = 300
     };
     this.ffpWebRoleBinDir = new SourceControlFileFolderPicker()
     {
         ID = "ffpWebRoleBinDir", DisplayMode = SourceControlBrowser.DisplayModes.Folders, ServerId = 1
     };
     this.txtWebRoleAssemblyName = new ValidatingTextBox()
     {
         Width = 300
     };
     this.txtWebRoleSiteRoleName = new ValidatingTextBox()
     {
         Width = 300
     };
     this.txtWebRoleSiteVirtualPath = new ValidatingTextBox()
     {
         Width = 300
     };
     this.txtWebRoleSitePhysicaPath = new ValidatingTextBox()
     {
         Width = 300
     };
     this.txtWorkerRoleName = new ValidatingTextBox()
     {
         Width = 300
     };
     this.ffpWorkerRoleBinDir = new SourceControlFileFolderPicker()
     {
         ID = "ffpWorkerRoleBinDir", DisplayMode = SourceControlBrowser.DisplayModes.Folders, ServerId = 1
     };
     this.txtWorkerRoleAssemblyName = new ValidatingTextBox()
     {
         Width = 300
     };
     this.txtRolePropertiesFileRoleName = new ValidatingTextBox()
     {
         Width = 300
     };
     this.ffpPropertiesFile = new SourceControlFileFolderPicker()
     {
         ID = "ffpPropertiesFile", DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles, ServerId = 1
     };
     this.chkUseCTPPackageFormat = new CheckBox()
     {
         Width = 300, Text = "Use CTP Package Format", Checked = true
     };
     this.ffpOutput = new SourceControlFileFolderPicker()
     {
         ID = "ffpOutput", DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles, ServerId = 1
     };
     this.chkCopyOnly = new CheckBox()
     {
         Width = 300, Text = "Copy Only"
     };
     this.txtAdditionalArguments = new ValidatingTextBox()
     {
         Width = 300
     };
     this.Controls.Add(
         new FormFieldGroup("Service Definition",
                            "Provide the path to the default service definition file (ServiceDefinition.csdef) or the explicit file name.",
                            false,
                            new StandardFormField("Path:", this.ffpServiceDefinition)
                            ),
         new FormFieldGroup("Web Role",
                            "Specify the name of the web role, the path to the \\bin directory of the web application output, and optionally, the " +
                            "file name of the assembly that contains the web role. If there is no web role for this project, leave these " +
                            "fields blank. If more than 1 web role exists, use the additional arguments section with the format: <br /><br />" +
                            HttpUtility.HtmlEncode("/role:<rolename>;[<role-directory>];[<role-entrypoint-DLL>]"),
                            false,
                            new StandardFormField("Role Name:", this.txtWebRoleName),
                            new StandardFormField("Bin Directory:", this.ffpWebRoleBinDir),
                            new StandardFormField("Assembly Name:", this.txtWebRoleAssemblyName)
                            ),
         new FormFieldGroup("Site",
                            "Specify a site name for the web role, and a virtual to physical path mapping. If more than 1 mapping is required, " +
                            "use the additional arguments section with the format: <br /><br />" +
                            HttpUtility.HtmlEncode("/sites:<rolename>;<virtual-path1>;<physical-path1>;..."),
                            false,
                            new StandardFormField("Role Name:", this.txtWebRoleSiteRoleName),
                            new StandardFormField("Virtual Path:", this.txtWebRoleSiteVirtualPath),
                            new StandardFormField("Physical Path:", this.txtWebRoleSitePhysicaPath)
                            ),
         new FormFieldGroup("Worker Role",
                            "Specify the name of the worker role, the path to the \\bin directory of the project output, and the assembly " +
                            "that contains the entry point for the worker role. If there is no worker role for this project, leave these " +
                            "fields blank. If more than 1 worker role exists, use the additional arguments section with the format: <br /><br />" +
                            HttpUtility.HtmlEncode("/role:<rolename>;[<role-directory>];[<role-entrypoint-DLL>]"),
                            false,
                            new StandardFormField("Role Name:", this.txtWorkerRoleName),
                            new StandardFormField("Bin Directory:", this.ffpWorkerRoleBinDir),
                            new StandardFormField("Assembly Name:", this.txtWorkerRoleAssemblyName)
                            ),
         new FormFieldGroup("Role Properties",
                            "Role properties file information.",
                            false,
                            new StandardFormField("Role Name:", this.txtRolePropertiesFileRoleName),
                            new StandardFormField("Path:", ffpPropertiesFile)
                            ),
         new FormFieldGroup("Options",
                            "Specify whether the new package format should be used, and whether to create a directory layout for the role " +
                            "binaries in order to run the service locally. To create a .cspkg, leave Copy Only unchecked.",
                            false,
                            new StandardFormField("", this.chkUseCTPPackageFormat),
                            new StandardFormField("", this.chkCopyOnly)
                            ),
         new FormFieldGroup("Additional Arguments",
                            "Specify any additional arguments to pass to cspack.exe.",
                            false,
                            new StandardFormField("Additional Arguments:", this.txtAdditionalArguments)
                            ),
         new FormFieldGroup("Output",
                            "Specify the file name of the package output (if Copy Only is unchecked), or the output directory for the role binaries.",
                            true,
                            new StandardFormField("Path:", this.ffpOutput)
                            )
         );
 }
        private void CreateSelectDeploymentPathControls()
        {
            var ctlTargetDeploymentPath = new SourceControlFileFolderPicker()
            {
                DisplayMode = SourceControlBrowser.DisplayModes.Folders,
                ServerId = 1,
                Width = 350,
                Text = @"C:\TfsTestDeploys\"
            };

            this.wizardSteps.SelectDeploymentPath.Controls.Add(
                new FormFieldGroup(
                    "Deployment Target",
                    "Select a directory where the artifact will be deployed. You can change the server/path in which this gets deployed to later.",
                    true,
                    new StandardFormField("Target Directory:", ctlTargetDeploymentPath)
                )
            );

            this.WizardStepChange += (s, e) =>
            {
                if (e.CurrentStep != this.wizardSteps.SelectDeploymentPath)
                    return;

                this.TargetDeploymentPath = ctlTargetDeploymentPath.Text;
            };
        }
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            this.txtOrganizationName = new ValidatingTextBox()
            {
                Required = true,
                Width = 300
            };
            this.txtOrganizationName.ServerValidate += (s, e) =>
            {
                var applications = StoredProcs.Applications_GetApplications(null).Execute();
                if (applications.Any(app => app.Application_Name.Equals(this.txtOrganizationName.Text.Replace(" ", "") + "Extension", StringComparison.OrdinalIgnoreCase)))
                    e.IsValid = false;
            };

            var ddlProvider = new DropDownList { AutoPostBack = true };
            ddlProvider.Items.Add(new ListItem("", "0"));
            var providerItems = StoredProcs.Providers_GetProviders(
                    Domains.ProviderTypes.SourceControl,
                    null,
                    null
                ).Execute()
                .Select(p => new ListItem(p.Provider_Name, p.Provider_Id.ToString()))
                .ToArray();
            ddlProvider.Items.AddRange(providerItems);
            ddlProvider.Visible = providerItems.Any();

            var ctlNoProviders = new InfoBox()
            {
                BoxType = InfoBox.InfoBoxTypes.Error,
                Controls = { new LiteralControl("There are no source control providers set up in BuildMaster. Visit the <a href=\"/Administration/Providers/Overview.aspx?providerTypeCode=S\">Source Control Providers page</a> to add one.") },
                Visible = !providerItems.Any()
            };

            var ctlMoreThanOneProject = new InfoBox()
            {
                BoxType = InfoBox.InfoBoxTypes.Error,
                Controls = { new LiteralControl("There was more than one project in this solution. This application recipe only supports single-project solutions. Please go back to the previous step and select an extension solution with only one project.") },
                Visible = false
            };
            var ctlOneProject = new InfoBox()
            {
                BoxType = InfoBox.InfoBoxTypes.Success,
                Controls = { new LiteralControl("There solution contains a single project. You may advance to the summary step.") }
            };

            var ctlSolutionPath = new SourceControlFileFolderPicker() { DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles };

            var ffSolutionPath = new StandardFormField("Path of solution:", ctlSolutionPath) { Visible = false };

            ddlProvider.SelectedIndexChanged += (s, e) =>
            {
                ctlSolutionPath.SourceControlProviderId = int.Parse(ddlProvider.SelectedValue);
                this.ProviderId = ctlSolutionPath.SourceControlProviderId;
                ffSolutionPath.Visible = ctlSolutionPath.SourceControlProviderId > 0;
            };

            this.wizardSteps.SelectOrganizationName.Controls.Add(
                new FormFieldGroup(
                    "Organization Name",
                    "This should be your company or division name, e.g. \"Initech\". <br /><br />This is used to generate the sample code and also create the application name.",
                    true,
                    new StandardFormField(
                        "Organization Name:",
                        txtOrganizationName
                    )
                )
            );

            txtOrganizationName.Load += (S,E) => this.wizardSteps.DownloadInstructions.OrganizationName = txtOrganizationName.Text;

            this.wizardSteps.SelectProviderAndSolution.Controls.Add(
                new FormFieldGroup(
                    "Source Control",
                    "Select the Source Control Provider and the path to the extension's solution file.",
                    true,
                    new StandardFormField(
                        "Source Control Provider:",
                        ddlProvider,
                        ctlNoProviders
                    ),
                    ffSolutionPath
                )
            );
            this.WizardStepChange += (s, e) =>
            {
                if (e.CurrentStep != this.wizardSteps.SelectProviderAndSolution)
                    return;
                using (var scm = Util.Providers.CreateProviderFromId<SourceControlProviderBase>(ctlSolutionPath.SourceControlProviderId))
                {
                    var fileBytes = scm.GetFileContents(ctlSolutionPath.Text);
                    if (ctlSolutionPath.Text.EndsWith(".sln", StringComparison.OrdinalIgnoreCase))
                    {
                        var solution = Solution.Load(new MemoryStream(fileBytes));

                        if (solution.Projects.Count > 1)
                        {
                            ctlMoreThanOneProject.Visible = true;
                            ctlOneProject.Visible = false;
                        }

                        this.SolutionPath = new ProjectInfo(scm.DirectorySeparator, ctlSolutionPath.Text).ScmDirectoryName;
                        this.Project = new ProjectInfo(scm.DirectorySeparator, new ProjectInfo(scm.DirectorySeparator, ctlSolutionPath.Text).ProjectFileName);
                    }
                }
            };

            this.wizardSteps.OneProjectVerification.Controls.Add(
                new FormFieldGroup(
                    "One Project Verification",
                    "This step ensures that there is only one project in the selected solution.",
                    true,
                    new StandardFormField(
                        "",
                        ctlMoreThanOneProject,
                        ctlOneProject
                    )
                )
            );

            this.wizardSteps.Confirmation.Controls.Add(
                new FormFieldGroup(
                    "Summary",
                    "This is a summary of the details of the application that will be created. The application's deployment plan may be modified after creation if necessary.",
                    true,
                    new StandardFormField(
                        "",
                        new Summary(this)
                    )
                )
            );
        }
        protected override void CreateChildControls()
        {
            this.txtExePath = new SourceControlFileFolderPicker
            {
                Required = true,
                DefaultText = @"ex: C:\Program Files\Example\MyExampleService.exe"
            };

            this.txtArguments = new ValidatingTextBox { DefaultText = "none" };

            this.txtServiceName = new ValidatingTextBox { Required = true };

            this.txtDisplayName = new ValidatingTextBox { Required = true };

            this.txtDescription = new ValidatingTextBox { DefaultText = "none" };

            this.txtUserAccount = new ValidatingTextBox { DefaultText = "NT AUTHORITY\\LocalSystem" };

            this.txtPassword = new PasswordTextBox();

            this.chkRecreate = new CheckBox
            {
                Text = "Reinstall if a service with the same name is already installed"
            };

            var ctlRecreateContainer = new Div(this.chkRecreate) { ID = "ctlRecreateContainer" };

            this.chkErrorIfAlreadyInstalled = new CheckBox
            {
                ID = "chkErrorIfAlreadyInstalled",
                Text = "Log error if service with same name is already installed"
            };

            this.Controls.Add(
                new SlimFormField("Service executable:", this.txtExePath),
                new SlimFormField("Executable arguments:", this.txtArguments),
                new SlimFormField("Service name:", this.txtServiceName),
                new SlimFormField("Service display name:", this.txtDisplayName),
                new SlimFormField("Service description:", this.txtDescription),
                new SlimFormField("User account:", this.txtUserAccount)
                {
                    HelpText = HelpText.FromHtml("Supply a user account which the service will run as. <i>NT AUTHORITY\\LocalSystem</i> is used if an account is not supplied. " +
                        "To use Network Service, enter <i>NT AUTHORITY\\NetworkService</i>.<br/><br/>" +
                        "If a built in service account is used, leave the password field blank.")
                },
                new SlimFormField("User account password:"******"Options:",
                    new Div(this.chkErrorIfAlreadyInstalled),
                    ctlRecreateContainer
                ),
                new RenderJQueryDocReadyDelegator(
                    w =>
                    {
                        w.Write(
                            "$('#{0}').change(function(){{if($(this).attr('checked')) $('#{1}').hide(); else $('#{1}').show();}});",
                            this.chkErrorIfAlreadyInstalled.ClientID,
                            ctlRecreateContainer.ClientID
                        );

                        w.Write("$('#{0}').change();", this.chkErrorIfAlreadyInstalled.ClientID);
                    }
                )
            );
        }
        protected override void CreateChildControls()
        {
            this.ddlVersion = new DropDownList()
            {
                Items =
                {
                    new ListItem("(auto detect)", ""),
                    new ListItem("2.0", "2.0.50727"),
                    new ListItem("3.5", "3.5"),
                    new ListItem("4.0", "4.0.30319")
                }
            };

            this.ddlProjectBuildConfiguration = new DropDownList()
            {
                Items =
                {
                    new ListItem("Debug", "Debug"),
                    new ListItem("Release", "Release"),
                    new ListItem("Other", "Other")
                }
            };

            this.txtOtherConfig = new TextBox() { Width = 150 };

            this.ddlProjectBuildTargetPlatform = new DropDownList()
            {
                Items =
                {
                    new ListItem("(Default)", string.Empty),
                    new ListItem("Any CPU", "AnyCPU"),
                    new ListItem("x86", "x86"),
                    new ListItem("x64", "x64"),
                    new ListItem("Other", "Other")
                }
            };

            this.txtOtherPlatform = new TextBox() { Width = 150 };

            this.txtProjectPath = new TextBox() { Width = 325 };

            this.chkWebProject = new CheckBox()
            {
                Text = "This is a Web Application project."
            };

            this.ddlBuildOutputDir = new DropDownList()
            {
                Items =
                {
                    new ListItem("Specify output directory...", "target"),
                    new ListItem("Per project \\bin\\{config} directories", "bin"),
                }
            };

            this.txtTargetDir = new SourceControlFileFolderPicker()
            {
                ServerId = this.ServerId,
                DefaultText = "default",
                Width = 270
            };

            this.txtAdditionalProperties = new TextBox
            {
                Width = 300,
                TextMode = TextBoxMode.MultiLine,
                Rows = 5
            };

            this.Controls.Add(
                new FormFieldGroup(".NET Framework Version",
                    "The version of the .NET Framework to use when building this project.",
                    false,
                    new StandardFormField("Version:", this.ddlVersion)
                )
            );

            this.divConfig = new HtmlGenericControl("div") { ID = "divConfig" };
            this.divConfig.Style.Value = "display:none;";

            this.divConfig.Controls.Add(this.txtOtherConfig);

            this.divPlatform = new HtmlGenericControl("div") { ID = "divPlatform" };
            this.divPlatform.Style.Value = "display:none;";

            this.divPlatform.Controls.Add(this.txtOtherPlatform);

            this.divTargetDir = new HtmlGenericControl("div") { ID = "divTargetDir" };
            this.divTargetDir.Style.Value = "display:none;";

            this.divTargetDir.Controls.Add(this.txtTargetDir);

            this.Controls.Add(
                new FormFieldGroup("Project Build Configuration",
                    "The build configuration and platform for your project (usually either Debug or Release).",
                    false,
                    new StandardFormField("Project Build Configuration:", this.ddlProjectBuildConfiguration, this.divConfig),
                    new StandardFormField("Target Platform:", this.ddlProjectBuildTargetPlatform, this.divPlatform)
                ),
                new FormFieldGroup("Project or Solution File Path",
                    "The path to an msbuild project file or solution file, typically: .csproj, .vbproj, .vcxproj, or .sln. <br /><br />This path may be absolute or relative to the default directory.",
                    false,
                    new StandardFormField("Source Path:", this.txtProjectPath, new LiteralControl("<br />"), this.chkWebProject)
                ),
                new FormFieldGroup("Build Output Directory",
                    "The directory of the build output. The \\bin\\{config} option is recommended when building a solution file. If \"This is a Web Application project\" is selected, an output directory must be specified.",
                    false,
                    new StandardFormField("Build Output Directory:", this.ddlBuildOutputDir, this.divTargetDir)
                ),
                new FormFieldGroup("MSBuild Properties",
                    "Additional properties, separated by newlines.  Example:<br />WarningLevel=2<br />Optimize=false",
                    true,
                    new StandardFormField("MSBuild Properties:", this.txtAdditionalProperties)
                )
            );
        }
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            this.txtApplicationName = new ValidatingTextBox
            {
                Required = true,
                Width = 300,
                ValidationExpression = "[0-9a-zA-Z]+"
            };
            try
            {
                txtApplicationName.Text = (Environment.UserDomainName ?? "").ToLowerInvariant() + "Extension";
                if (!string.IsNullOrEmpty(txtApplicationName.Text))
                    txtApplicationName.Text = txtApplicationName.Text[0].ToString().ToUpperInvariant() + txtApplicationName.Text.Substring(1);
            }
            catch {}

            this.txtApplicationName.ServerValidate +=
                (s, e) =>
                {
                    var applications = StoredProcs.Applications_GetApplications(null).Execute();
                    if (applications.Any(app => app.Application_Name.Equals(this.txtApplicationName.Text, StringComparison.OrdinalIgnoreCase)))
                        e.IsValid = false;
                };

            bool hasProviders = StoredProcs.Providers_GetProviders(Domains.ProviderTypes.SourceControl).Execute().Any();
            var ddlProvider = new ActionProviderPicker
            {
                AllowNameEntry = false,
                ProviderTypeCode = Domains.ProviderTypes.SourceControl,
                Visible = hasProviders
            };

            var ctlNoProviders = new InfoBox
            {
                BoxType = InfoBox.InfoBoxTypes.Error,
                Controls = { new LiteralControl("There are no source control providers set up in BuildMaster. Visit the <a href=\"/Administration/Providers/Overview.aspx?providerTypeCode=S\">Source Control Providers page</a> to add one.") },
                Visible = !hasProviders
            };

            var ctlMoreThanOneProject = new InfoBox
            {
                BoxType = InfoBox.InfoBoxTypes.Error,
                Controls = { new LiteralControl("There was more than one project in this solution. This application recipe only supports single-project solutions. Please go back to the previous step and select an extension solution with only one project.") },
                Visible = false
            };

            var ctlOneProject = new InfoBox
            {
                BoxType = InfoBox.InfoBoxTypes.Success,
                Controls = { new LiteralControl("There solution contains a single project. You may advance to the summary step.") }
            };

            var ctlSolutionPath = new SourceControlFileFolderPicker
            {
                DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles,
                BindToActionSourceControlProvider = true,
                Width = 300
            };

            var ffSolutionPath = new StandardFormField("Path of solution file (.sln):", ctlSolutionPath);

            this.wizardSteps.SelectOrganizationName.Controls.Add(
                new FormFieldGroup(
                    "Application Name",
                    "For custom extensions, the name should be <em>InitechExtension</em>, where \"Initech\" is your company's name. There's no need to have more than one custom extension per organization<br /><br />" 
                    + "For cloning BuildMaster extensions, use the exact name of the extension, for example <em>WindowsSdk</em><br /><br />.",
                    false,
                    new StandardFormField(
                        "Application Name (alpha-numeric only):",
                        txtApplicationName
                    )
                )
            );

            txtApplicationName.Load += (s, e) => this.wizardSteps.DownloadInstructions.ApplicationName = txtApplicationName.Text;

            this.wizardSteps.SelectProviderAndSolution.Controls.Add(
                new FormFieldGroup(
                    "Source Control",
                    "Select the Source Control Provider and the path to the extension's solution file.",
                    true,
                    new StandardFormField(
                        "Source Control Provider:",
                        ddlProvider,
                        ctlNoProviders,
                        new Div(
                            new ActionServerPicker { ID = "bm-action-server-id" }
                        ) { Style = "display: none;" }
                    ),
                    ffSolutionPath
                )
            );
            this.WizardStepChange +=
                (s, e) =>
                {
                    if (e.CurrentStep != this.wizardSteps.SelectProviderAndSolution)
                        return;

                    this.ProviderId = (int)ddlProvider.ProviderId;

                    using (var proxy = Util.Proxy.CreateProviderProxy(this.ProviderId))
                    {
                        var scm = proxy.TryGetService<SourceControlProviderBase>();
                        byte[] fileBytes = scm.GetFileContents(ctlSolutionPath.Text);

                        if (ctlSolutionPath.Text.EndsWith(".sln", StringComparison.OrdinalIgnoreCase))
                        {
                            var solution = Solution.Load(new MemoryStream(fileBytes));

                            if (solution.Projects.Count > 1)
                            {
                                ctlMoreThanOneProject.Visible = true;
                                ctlOneProject.Visible = false;
                            }

                            this.SolutionPath = new ProjectInfo(scm.DirectorySeparator, ctlSolutionPath.Text).ScmDirectoryName;
                            this.Project = new ProjectInfo(scm.DirectorySeparator, new ProjectInfo(scm.DirectorySeparator, ctlSolutionPath.Text).ProjectFileName);
                        }
                    }
                };

            this.wizardSteps.OneProjectVerification.Controls.Add(
                new FormFieldGroup(
                    "One Project Verification",
                    "This step ensures that there is only one project in the selected solution.",
                    true,
                    new StandardFormField(
                        "",
                        ctlMoreThanOneProject,
                        ctlOneProject
                    )
                )
            );

            this.wizardSteps.Confirmation.Controls.Add(
                new FormFieldGroup(
                    "Summary",
                    "This is a summary of the details of the application that will be created. The application's deployment plan may be modified after creation if necessary.",
                    true,
                    new StandardFormField(
                        "",
                        new Summary(this)
                    )
                )
            );
        }
        protected override void CreateChildControls()
        {
            var hasProviders = StoredProcs.Providers_GetProviders(Domains.ProviderTypes.SourceControl).Execute().Any();

            var ddlProvider = new ActionProviderPicker
            {
                AllowNameEntry = false,
                Visible = hasProviders,
                ProviderTypeCode = Domains.ProviderTypes.SourceControl
            };

            var ctlNoProviders = new InfoBox
            {
                BoxType = InfoBox.InfoBoxTypes.Error,
                Controls = { new LiteralControl("There are no source control providers set up in BuildMaster. Visit the <a href=\"/Administration/Providers/Overview.aspx?providerTypeCode=S\">Source Control Providers page</a> to add one.") },
                Visible = !hasProviders
            };

            var ctlProjectPath = new SourceControlFileFolderPicker
            {
                DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles,
                BindToActionSourceControlProvider = true,
                Width = 300
            };

            var ffProjectPath = new StandardFormField("Path of solution or project (.sln, .csproj, etc):", ctlProjectPath);

            var ctlProjectsInSolution = new CheckBoxList();

            var ctlOneProject = new InfoBox
            {
                BoxType = InfoBox.InfoBoxTypes.Success,
                Controls = { new LiteralControl("You have selected a project file, you may click Next to select a configuration file.") },
                Visible = false
            };

            var ctlConfigFiles = new CheckBoxList();

            var ctlNoConfigFiles = new InfoBox
            {
                BoxType = InfoBox.InfoBoxTypes.Warning,
                Controls = { new LiteralControl("There are no files with .config extension in any of the selected projects, therefore configuration files for this project/solution will have to be created manually.") },
                Visible = false
            };

            var ffgTargets = new FormFieldGroup(
                "Deployment Targets",
                "Select the location to deploy project outputs.",
                true
            );

            this.Load +=
                (s, e) =>
                {
                    for (int i = 0; i < this.Projects.Length; i++)
                    {
                        ffgTargets.FormFields.Add(
                            new StandardFormField(
                                this.Projects[i].Name + ":",
                                new SourceControlFileFolderPicker
                                {
                                    ID = "ctlDeployTarget" + i,
                                    DisplayMode = SourceControlBrowser.DisplayModes.Folders
                                }
                            )
                        );
                    }
                };

            this.wizardSteps.SelectProviderAndFile.Controls.Add(
                new FormFieldGroup(
                    "Source Control",
                    "Select the Source Control Provider and the path of a project or solution.",
                    true,
                    new StandardFormField(
                        "Source Control Provider:",
                        ddlProvider,
                        ctlNoProviders,
                        new Div(
                            new ActionServerPicker { ID = "bm-action-server-id" }
                        ) { ClientIDMode = ClientIDMode.Static, Style = "display: none;" }
                    ),
                    ffProjectPath
                )
            );
            this.WizardStepChange += (s, e) =>
            {
                if (e.CurrentStep != this.wizardSteps.SelectProviderAndFile)
                    return;

                this.ProviderId = (int)ddlProvider.ProviderId;

                using (var proxy = Util.Proxy.CreateProviderProxy((int)ddlProvider.ProviderId))
                {
                    var scm = proxy.TryGetService<SourceControlProviderBase>();
                    var fileBytes = (byte[])scm.GetFileContents(ctlProjectPath.Text);

                    if (ctlProjectPath.Text.EndsWith(".sln", StringComparison.OrdinalIgnoreCase))
                    {
                        var solution = Solution.Load(new MemoryStream(fileBytes, false));
                        ctlProjectsInSolution.Items.AddRange(
                            solution.Projects
                                .OrderBy(p => p.Name)
                                .Select(p => new ListItem(p.Name, p.ProjectPath))
                        );

                        this.SolutionPath = new ProjectInfo(scm.DirectorySeparator, ctlProjectPath.Text).ScmDirectoryName;
                    }
                    else
                    {
                        this.SolutionPath = new ProjectInfo(scm.DirectorySeparator, ctlProjectPath.Text).ScmDirectoryName;
                        this.Projects = new[] { new ProjectInfo(scm.DirectorySeparator, new ProjectInfo(scm.DirectorySeparator, ctlProjectPath.Text).ProjectFileName) };
                        ctlOneProject.Visible = true;
                    }
                }
            };

            this.wizardSteps.SelectProjectsInSolution.Controls.Add(
                new FormFieldGroup(
                    "Projects",
                    "Select the projects in the solution that you would like to create deployables for.",
                    true,
                    new StandardFormField(
                        "",
                        ctlProjectsInSolution,
                        ctlOneProject
                    )
                )
            );
            this.WizardStepChange += (s, e) =>
            {
                if (e.CurrentStep != this.wizardSteps.SelectProjectsInSolution)
                    return;

                using (var proxy = Util.Proxy.CreateProviderProxy((int)ddlProvider.ProviderId))
                {
                    var scm = proxy.TryGetService<SourceControlProviderBase>();
                    char dirSeparator = scm.DirectorySeparator;

                    if (ctlProjectPath.Text.EndsWith(".sln", StringComparison.OrdinalIgnoreCase))
                    {
                        this.Projects = ctlProjectsInSolution.Items
                            .Cast<ListItem>()
                            .Where(i => i.Selected)
                            .Select(i => new ProjectInfo(dirSeparator, i.Value.Replace('\\', dirSeparator)))
                            .ToArray();
                    }

                    ParseProjects(ctlConfigFiles, ctlNoConfigFiles, scm);
                }
            };

            this.wizardSteps.SelectConfigFiles.Controls.Add(
                new FormFieldGroup(
                    "Configuration Files",
                    "Select any configuration files that you would like BuildMaster to manage.",
                    true,
                    new StandardFormField(
                        "",
                        ctlConfigFiles,
                        ctlNoConfigFiles
                    )
                )
            );
            this.WizardStepChange += (s, e) =>
            {
                if (e.CurrentStep != this.wizardSteps.SelectConfigFiles)
                    return;
                var dict = this.Projects.ToDictionary(p => p.ScmPath);
                var configFiles = ctlConfigFiles.Items
                    .Cast<ListItem>()
                    .Where(i => i.Selected)
                    .Select(i => new { Path = i.Value.Split('|')[0], Name = i.Value.Split('|')[1] })
                    .GroupBy(c => c.Path);

                foreach (var cfg in configFiles)
                    dict[cfg.Key].ConfigFiles.AddRange(cfg.Select(c => c.Name));
            };

            this.wizardSteps.SelectDeploymentPaths.Controls.Add(ffgTargets);
            this.WizardStepChange += (s, e) =>
            {
                if (e.CurrentStep != this.wizardSteps.SelectDeploymentPaths)
                    return;
                var controls = this.wizardSteps.SelectDeploymentPaths.Controls
                            .Find<SourceControlFileFolderPicker>()
                            .Where(c => c.ID.StartsWith("ctlDeployTarget"));

                foreach (var control in controls)
                    this.Projects[int.Parse(control.ID.Substring("ctlDeployTarget".Length))].DeploymentTarget = control.Text;
            };

            this.wizardSteps.Confirmation.Controls.Add(
                new FormFieldGroup(
                    "Overview",
                    "Confirm that the actions listed here are correct, then click the Execute Recipe button.",
                    true,
                    new StandardFormField(
                        "",
                        new RecipeOverview(this)
                    )
                )
            );

            base.CreateChildControls();
        }
 protected override void CreateChildControls()
 {
     this.txtIncludeCSSFile = new ValidatingTextBox()
     {
         Width = 300, TextMode = TextBoxMode.MultiLine, Rows = 3
     };
     this.txtExcludeCSSPattern = new ValidatingTextBox()
     {
         Width = 300, TextMode = TextBoxMode.MultiLine, Rows = 3
     };
     this.chkCSSRecursive = new CheckBox()
     {
         Width = 300
     };
     this.ffpOutputCSSFile = new SourceControlFileFolderPicker()
     {
         ID = "ffpOutputCSSFile", DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles, ServerId = 1
     };
     this.chkRemoveCSSComments = new CheckBox()
     {
         Width = 300
     };
     this.ddlCSSCompressionType = new DropDownList()
     {
         Width = 300
     };
     this.ddlCSSCompressionType.Items.Add(new ListItem("Standard", "standard"));
     this.ddlCSSCompressionType.Items.Add(new ListItem("None", "none"));
     this.txtCSSLineBreakPosition = new ValidatingTextBox()
     {
         Width = 300
     };
     this.chkCSSDeleteOriginal = new CheckBox()
     {
         Width = 300
     };
     this.txtIncludeJSFile = new ValidatingTextBox()
     {
         Width = 300, TextMode = TextBoxMode.MultiLine, Rows = 3
     };
     this.chkJSRecursive = new CheckBox()
     {
         Width = 300
     };
     this.txtExcludeJSPattern = new ValidatingTextBox()
     {
         Width = 300, TextMode = TextBoxMode.MultiLine, Rows = 3
     };
     this.chkJSDeleteOriginal = new CheckBox()
     {
         Width = 300
     };
     this.ffpOutputJSFile = new SourceControlFileFolderPicker()
     {
         ID = "ffpOutputJSFile", DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles, ServerId = 1
     };
     this.ddlJSCompressionType = new DropDownList()
     {
         Width = 300
     };
     this.ddlJSCompressionType.Items.Add(new ListItem("Standard", "standard"));
     this.ddlJSCompressionType.Items.Add(new ListItem("None", "none"));
     this.chkObfuscateJS = new CheckBox()
     {
         Width = 300
     };
     this.chkJSPreserveSemicolons = new CheckBox()
     {
         Width = 300
     };
     this.chkJSDisableOptimizations = new CheckBox()
     {
         Width = 300
     };
     this.txtJSEncodingType = new ValidatingTextBox()
     {
         Width = 300
     };
     this.txtJSLineBreakPosition = new ValidatingTextBox()
     {
         Width = 300
     };
     this.chkJSIgnoreEval = new CheckBox()
     {
         Width = 300
     };
     this.chkJSRemoveComments = new CheckBox()
     {
         Width = 300
     };
     this.chkPreserveCSSSubdirectories = new CheckBox()
     {
         Width = 300
     };
     this.chkPreserveJSSubdirectories = new CheckBox()
     {
         Width = 300
     };
     this.chkVerbose = new CheckBox()
     {
         Width = 300
     };
     this.chkCompressCSSInPlace = new CheckBox()
     {
         Width = 300
     };
     this.chkCompressJSInPlace = new CheckBox()
     {
         Width = 300
     };
     this.Controls.Add(
         new FormFieldGroup("CSS Options", "Sets the CSS compression options. Preserving the subdirectories will result in one combined CSS file per subdirectory.", false,
                            new StandardFormField("CSS Files To Compress:", this.txtIncludeCSSFile),
                            new StandardFormField("Recursive:", this.chkCSSRecursive),
                            new StandardFormField("Delete original files:", this.chkCSSDeleteOriginal),
                            new StandardFormField("Filename pattern to exclude (one per line):", this.txtExcludeCSSPattern),
                            new StandardFormField("Remove comments:", this.chkRemoveCSSComments),
                            new StandardFormField("Compression type:", this.ddlCSSCompressionType),
                            new StandardFormField("Line break position:", this.txtCSSLineBreakPosition),
                            new StandardFormField("Preserve subdirectories", this.chkPreserveCSSSubdirectories),
                            new StandardFormField("Compress CSS files in place (overwrite original with same name):", chkCompressCSSInPlace),
                            new StandardFormField("Output:", this.ffpOutputCSSFile)
                            ),
         new FormFieldGroup("JavaScript Options", "Sets the JavaScript compression options. Preserving the subdirectories will result in one combined CSS file per subdirectory.", false,
                            new StandardFormField("JS Files To Compress:", this.txtIncludeJSFile),
                            new StandardFormField("Recursive:", this.chkJSRecursive),
                            new StandardFormField("Delete original files:", this.chkJSDeleteOriginal),
                            new StandardFormField("Filename pattern to exclude (one per line):", this.txtExcludeJSPattern),
                            new StandardFormField("Compression type:", this.ddlJSCompressionType),
                            new StandardFormField("Obfuscate:", this.chkObfuscateJS),
                            new StandardFormField("Preserve semicolons:", this.chkJSPreserveSemicolons),
                            new StandardFormField("Disable Optimizations:", this.chkJSDisableOptimizations),
                            new StandardFormField("Ignore Evals:", this.chkJSIgnoreEval),
                            new StandardFormField("Remove Comments:", this.chkJSRemoveComments),
                            new StandardFormField("Line break position:", this.txtJSLineBreakPosition),
                            new StandardFormField("Encoding:", this.txtJSEncodingType),
                            new StandardFormField("Preserve subdirectories", this.chkPreserveJSSubdirectories),
                            new StandardFormField("Compress JS files in place (overwrite original with same name):", chkCompressJSInPlace),
                            new StandardFormField("Output:", this.ffpOutputJSFile)
                            ),
         new FormFieldGroup("General Options", "General settings for the action.", true,
                            new StandardFormField("Verbose logging:", this.chkVerbose)
                            )
         );
 }
Esempio n. 35
0
 protected override void CreateChildControls()
 {
     this.ffpServiceDefinition = new SourceControlFileFolderPicker() { ID = "serviceDefinition", DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles, ServerId = 1 };
     this.txtWebRoleName = new ValidatingTextBox() { Width = 300 };
     this.ffpWebRoleBinDir = new SourceControlFileFolderPicker() { ID = "ffpWebRoleBinDir", DisplayMode = SourceControlBrowser.DisplayModes.Folders, ServerId = 1 };
     this.txtWebRoleAssemblyName = new ValidatingTextBox() { Width = 300 };
     this.txtWebRoleSiteRoleName = new ValidatingTextBox() { Width = 300 };
     this.txtWebRoleSiteVirtualPath = new ValidatingTextBox() { Width = 300 };
     this.txtWebRoleSitePhysicaPath = new ValidatingTextBox() { Width = 300 };
     this.txtWorkerRoleName = new ValidatingTextBox() { Width = 300 };
     this.ffpWorkerRoleBinDir = new SourceControlFileFolderPicker() { ID = "ffpWorkerRoleBinDir", DisplayMode = SourceControlBrowser.DisplayModes.Folders, ServerId = 1 };
     this.txtWorkerRoleAssemblyName = new ValidatingTextBox() { Width = 300 };
     this.txtRolePropertiesFileRoleName = new ValidatingTextBox() { Width = 300 };
     this.ffpPropertiesFile = new SourceControlFileFolderPicker() { ID = "ffpPropertiesFile", DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles, ServerId = 1 };
     this.chkUseCTPPackageFormat = new CheckBox() { Width = 300, Text = "Use CTP Package Format", Checked = true };
     this.ffpOutput = new SourceControlFileFolderPicker() { ID = "ffpOutput", DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles, ServerId = 1 };
     this.chkCopyOnly = new CheckBox() { Width = 300, Text = "Copy Only" };
     this.txtAdditionalArguments = new ValidatingTextBox() { Width = 300 };
     this.Controls.Add(
         new FormFieldGroup("Service Definition",
             "Provide the path to the default service definition file (ServiceDefinition.csdef) or the explicit file name.",
             false,
             new StandardFormField("Path:", this.ffpServiceDefinition)
         ),
         new FormFieldGroup("Web Role",
             "Specify the name of the web role, the path to the \\bin directory of the web application output, and optionally, the " +
             "file name of the assembly that contains the web role. If there is no web role for this project, leave these " +
             "fields blank. If more than 1 web role exists, use the additional arguments section with the format: <br /><br />" +
             HttpUtility.HtmlEncode("/role:<rolename>;[<role-directory>];[<role-entrypoint-DLL>]"),
             false,
             new StandardFormField("Role Name:", this.txtWebRoleName),
             new StandardFormField("Bin Directory:", this.ffpWebRoleBinDir),
             new StandardFormField("Assembly Name:",this.txtWebRoleAssemblyName)
         ),
         new FormFieldGroup("Site",
             "Specify a site name for the web role, and a virtual to physical path mapping. If more than 1 mapping is required, " +
             "use the additional arguments section with the format: <br /><br />" +
             HttpUtility.HtmlEncode("/sites:<rolename>;<virtual-path1>;<physical-path1>;..."),
             false,
             new StandardFormField("Role Name:", this.txtWebRoleSiteRoleName),
             new StandardFormField("Virtual Path:", this.txtWebRoleSiteVirtualPath),
             new StandardFormField("Physical Path:",this.txtWebRoleSitePhysicaPath)
         ),
         new FormFieldGroup("Worker Role",
             "Specify the name of the worker role, the path to the \\bin directory of the project output, and the assembly " +
             "that contains the entry point for the worker role. If there is no worker role for this project, leave these " +
             "fields blank. If more than 1 worker role exists, use the additional arguments section with the format: <br /><br />" +
             HttpUtility.HtmlEncode("/role:<rolename>;[<role-directory>];[<role-entrypoint-DLL>]"),
             false,
             new StandardFormField("Role Name:", this.txtWorkerRoleName),
             new StandardFormField("Bin Directory:",this.ffpWorkerRoleBinDir),
             new StandardFormField("Assembly Name:",this.txtWorkerRoleAssemblyName)
         ),
         new FormFieldGroup("Role Properties",
             "Role properties file information.",
             false,
             new StandardFormField("Role Name:",this.txtRolePropertiesFileRoleName),
             new StandardFormField("Path:",ffpPropertiesFile)
         ),
         new FormFieldGroup("Options",
             "Specify whether the new package format should be used, and whether to create a directory layout for the role " +
             "binaries in order to run the service locally. To create a .cspkg, leave Copy Only unchecked.",
             false,
             new StandardFormField("",this.chkUseCTPPackageFormat),
             new StandardFormField("",this.chkCopyOnly)
         ),
         new FormFieldGroup("Additional Arguments",
             "Specify any additional arguments to pass to cspack.exe.",
             false,
             new StandardFormField("Additional Arguments:", this.txtAdditionalArguments)
         ),
         new FormFieldGroup("Output",
             "Specify the file name of the package output (if Copy Only is unchecked), or the output directory for the role binaries.",
             true,
             new StandardFormField("Path:",this.ffpOutput)
         )
     );
 }
        protected override void CreateChildControls()
        {
            this.txtProjectBuildConfiguration = new ValidatingTextBox
            {
                ID = "txtProjectBuildConfiguration",
                AutoCompleteValues = new[] { "Debug", "Release" },
                Required = true,
                Text = "Release"
            };

            this.txtProjectBuildTargetPlatform = new ValidatingTextBox
            {
                ID = "txtProjectBuildTargetPlatform",
                AutoCompleteValues = new[] { "AnyCPU", "Any CPU", "x86", "x64", "Win32" },
                DefaultText = "(default)"
            };

            this.txtProjectPath = new SourceControlFileFolderPicker
            {
                ID = "txtProjectPath",
                DisplayMode = SourceControlBrowser.DisplayModes.FoldersAndFiles
            };

            this.chkWebProject = new CheckBox
            {
                ID = "chkWebProject",
                Text = "This is a Web Application project"
            };

            this.ddlBuildOutputDir = new DropDownList
            {
                ID = "ddlBuildOutputDir",
                Items =
                {
                    new ListItem("Specify output directory...", "target"),
                    new ListItem("Per project \\bin\\{config} directories", "bin"),
                }
            };

            this.txtTargetDir = new SourceControlFileFolderPicker
            {
                DefaultText = "$CurrentDirectory"
            };

            this.txtAdditionalProperties = new ValidatingTextBox
            {
                TextMode = TextBoxMode.MultiLine,
                DefaultText = "(none)",
                Rows = 5
            };

            var divTargetDir = new Div(
                this.txtTargetDir
            ) { ID = "divTargetDir" };

            this.divWebProject = new Div(
                this.chkWebProject,
                new Div(
                    new StatusImg { Status = StatusType.Warning, Style = "width: 16px; height: 16px; display: block; float: left;" },
                    "This option will be removed in a future version of the extension. Use the Build ASP.NET Project action instead."
                ) { Style = "font-size: 9px; margin-left: 20px;" }
            ) { IsIdRequired = false, Visible = false, Style = "margin-top: 10px;" };

            this.txtAdditionalArguments = new ValidatingTextBox
            {
                ID = "txtAdditionalArguments",
                DefaultText = "(none)"
            };

            this.Controls.Add(
                new SlimFormField("Project/solution file:", this.txtProjectPath, this.divWebProject),
                new SlimFormField("Configuration:", this.txtProjectBuildConfiguration),
                new SlimFormField("Platform:", this.txtProjectBuildTargetPlatform),
                new SlimFormField("Output directory:", this.ddlBuildOutputDir, divTargetDir)
                {
                    HelpText = "The directory of the build output. The \\bin\\{config} option is recommended when building a solution file."
                },
                new SlimFormField("MSBuild properties:", this.txtAdditionalProperties)
                {
                    HelpText = HelpText.FromHtml("Additional properties, separated by newlines. Example:<br />WarningLevel=2<br />Optimize=false")
                },
                new SlimFormField("Additional arguments:", this.txtAdditionalArguments),
                new RenderJQueryDocReadyDelegator(
                    w =>
                    {
                        w.Write("$('#{0}').change(function(){{if($(this).val()=='target')$('#{1}').show();else $('#{1}').hide();}});", this.ddlBuildOutputDir.ClientID, divTargetDir.ClientID);
                        w.Write("$('#{0}').change();", this.ddlBuildOutputDir.ClientID);
                    }
                )
            );
        }