Esempio n. 1
0
        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 FileBrowserTextBox {
                IncludeFiles = true
            };

            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)
                );
        }
Esempio n. 2
0
        protected override void CreateChildControls()
        {
            this.txtProjectBuildConfiguration = new ValidatingTextBox
            {
                ID = "txtProjectBuildConfiguration",
                AutoCompleteValues = new[] { "Debug", "Release" },
                Required           = true,
                Text = "Release"
            };

            this.txtProjectPath = new FileBrowserTextBox
            {
                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. 3
0
        protected override void CreateChildControls()
        {
            Tables.Deployables_Extended deployable = null;
            if (this.DeployableId > 0)
            {
                deployable = DB.Applications_GetDeployable(this.DeployableId).FirstOrDefault();
            }

            this.txtExePath = new FileBrowserTextBox
            {
                IncludeFiles = true,
                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)
                );
        }
Esempio n. 4
0
        protected override void CreateChildControls()
        {
            this.ddlSourceServer = new ActionServerPicker
            {
                ID            = "ddlSourceServer",
                ShowGroups    = false,
                EnvironmentId = this.EnvironmentId
            };

            this.ddlTargetServer = new ActionServerPicker
            {
                ID            = "ddlTargetServer",
                EnvironmentId = this.EnvironmentId
            };

            this.ctlSourcePath = new FileBrowserTextBox
            {
                IncludeFiles    = false,
                BindToControlId = this.ddlSourceServer.ID,
                DefaultText     = "$CurrentDirectory"
            };

            this.ctlTargetPath = new FileBrowserTextBox
            {
                IncludeFiles    = false,
                BindToControlId = this.ddlTargetServer.ID,
                DefaultText     = "$CurrentDirectory"
            };

            this.chkDelete = new CheckBox
            {
                ID      = "chkDelete",
                Checked = true,
                Text    = "Delete files/directories not present in source"
            };

            this.txtIncludeFileMasks = new ValidatingTextBox
            {
                TextMode = TextBoxMode.MultiLine,
                Rows     = 4,
                Text     = "*"
            };

            this.Controls.Add(
                new SlimFormField("From server:", this.ddlSourceServer),
                new SlimFormField("From directory:", this.ctlSourcePath),
                new SlimFormField("To server:", this.ddlTargetServer),
                new SlimFormField("To directory:", this.ctlTargetPath),
                new SlimFormField("File/directory mask:", this.txtIncludeFileMasks)
            {
                HelpText = "Files and folders matching the specified masks (entered one per line) will be transferred. "
                           + "For example, if you want to transfer all files except *.src files, enter the following lines "
                           + "(without quotes): \"*\" and \"!*.src\""
            },
                new SlimFormField("Additional options:", this.chkDelete)
                );
        }
Esempio n. 5
0
        protected override void CreateChildControls()
        {
            this.txtFileName = new FileBrowserTextBox {
                IncludeFiles = true, Required = true
            };

            this.Controls.Add(
                new SlimFormField("Zip file path:", this.txtFileName)
                );
        }
        protected override void CreateChildControls()
        {
            this.txtMasks = new ValidatingTextBox
            {
                TextMode = TextBoxMode.MultiLine,
                Rows     = 2,
                Text     = "*"
            };

            this.txtOutputFile = new FileBrowserTextBox
            {
                IncludeFiles = true,
                Required     = true
            };

            this.txtContentSeparationText = new ValidatingTextBox
            {
                TextMode    = TextBoxMode.MultiLine,
                Rows        = 5,
                DefaultText = "no separator"
            };

            this.chkRecursive = new CheckBox
            {
                Checked = true,
                Text    = "Recurse subdirectories"
            };

            this.chkForceLinuxNewlines = new CheckBox
            {
                Checked = false,
                Text    = "Use \\n for newlines in separator"
            };

            this.ddlEncoding = new EncodingPicker();

            this.Controls.Add(
                new SlimFormField("Files to concatenate:",
                                  new Div(this.txtMasks),
                                  new Div(this.chkRecursive)
                                  )
            {
                HelpText = "Files matching the specified masks in the \"From directory\" (entered one per line) will be concatenated."
            },
                new SlimFormField("Content separator:",
                                  new Div(this.txtContentSeparationText),
                                  new Div(this.chkForceLinuxNewlines)),
                new SlimFormField("To file:", this.txtOutputFile)
            {
                HelpText = "This is a path relative to the \"To directory\", e.g. \"combined.css\" or \"~\\db\\objects.sql\""
            },
                new SlimFormField("File encoding:", this.ddlEncoding)
                );
        }
Esempio n. 7
0
        protected override void CreateChildControls()
        {
            this.txtFileName = new FileBrowserTextBox
            {
                IncludeFiles = true,
                DefaultText  = "$CurrentDirectory\\archive.zip"
            };

            this.Controls.Add(
                new SlimFormField("To file:", this.txtFileName)
                );
        }
Esempio n. 8
0
        protected override void CreateChildControls()
        {
            this.chkUseCustomProfileXml = new CheckBox()
            {
                Text = "Use custom publish settings..."
            };
            var ctlProjectPublishProfileXmlContainer = new Div()
            {
                ID = "ctlProjectPublishProfileXmlContainer"
            };

            this.txtProjectPath = new FileBrowserTextBox();
            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.txtWorkingDirectory = new FileBrowserTextBox {
                IncludeFiles = false, DefaultText = "$CurrentDirectory"
            };
            this.txtExePath = new FileBrowserTextBox {
                IncludeFiles = true, Required = true,
            };
            this.txtArguments           = new ValidatingTextBox();
            this.chkFailOnStandardError = new CheckBox {
                Text = "Fail if any text is written to standard error"
            };
            this.chkUseExitCode = new CheckBox {
                Text = "Succeed only when exit code is..."
            };
            this.chkImportBuildMasterVariables = new CheckBox {
                Text = "Import BuildMaster variables to environment"
            };

            this.ddlExitCode = new DropDownList
            {
                Items =
                {
                    new ListItem("0",           CommandLineSuccessExitCode.Zero.ToString()),
                    new ListItem("Positive",    CommandLineSuccessExitCode.Positive.ToString()),
                    new ListItem("Nonnegative", CommandLineSuccessExitCode.NonNegative.ToString()),
                    new ListItem("Nonzero",     CommandLineSuccessExitCode.NonZero.ToString()),
                    new ListItem("Negative",    CommandLineSuccessExitCode.Negative.ToString())
                }
            };

            var ctlExitCode = new Div(this.ddlExitCode);

            this.Controls.Add(
                new SlimFormField("Executable file:", this.txtExePath),
                new SlimFormField("Process working directory:", this.txtWorkingDirectory),
                new SlimFormField("Arguments:", this.txtArguments),
                new SlimFormField(
                    "Error conditions:",
                    new Div(this.chkFailOnStandardError),
                    new Div(this.chkUseExitCode),
                    ctlExitCode
                    ),
                new SlimFormField("Additional options:", this.chkImportBuildMasterVariables)
                );

            this.Controls.BindVisibility(this.chkUseExitCode, ctlExitCode);
        }
Esempio n. 10
0
        protected override void CreateChildControls()
        {
            this.libPath    = new FileBrowserTextBox();
            this.searchMask = new ValidatingTextBox {
                Text = "*.csproj", TextMode = TextBoxMode.MultiLine, Rows = 4
            };
            this.recursive = new CheckBox {
                Text = "Recursive"
            };

            this.Controls.Add(
                new SlimFormField("Library:", this.libPath),
                new SlimFormField("Project file masks:", this.searchMask),
                new SlimFormField("Options:", this.recursive)
                );
        }
        protected override void CreateChildControls()
        {
            this.txtInstallPath = new FileBrowserTextBox
            {
                ServerId     = this.ServerId,
                DefaultText  = "$CurrentDirectory\\packages",
                IncludeFiles = false
            };

            this.Controls.Add(
                new SlimFormField("To:", this.txtInstallPath)
            {
                HelpText = "By default, packages will be installed to the <i>packages</i> folder at the solution level. If you have multiple solutions in the specified path or need to override this behavior, you may set the path explicitly here."
            }
                );
        }
Esempio n. 12
0
        protected override void CreateChildControls()
        {
            this.txtExePath = new FileBrowserTextBox
            {
                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. 13
0
        protected override void CreateChildControls()
        {
            this.txtFileName = new FileBrowserTextBox
            {
                IncludeFiles = true,
                Required     = true
            };

            this.txtFileContents = new TextBox
            {
                TextMode = TextBoxMode.MultiLine,
                Wrap     = false,
                Rows     = 20
            };

            this.Controls.Add(
                new SlimFormField("File path:", this.txtFileName),
                new SlimFormField("File Contents:", this.txtFileContents)
                );
        }
Esempio n. 14
0
        protected override void CreateChildControls()
        {
            this.txtProjectFilePath = new FileBrowserTextBox
            {
                ID           = "txtProjectFilePath",
                Required     = true,
                IncludeFiles = 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 = "Additional properties, separated by newlines. Example:<br />WarningLevel=2<br />Optimize=false"
            },
                new SlimFormField("Additional arguments:", this.txtAdditionalArguments)
                );
        }
Esempio n. 15
0
        protected override void CreateChildControls()
        {
            this.txtNuspecFile = new FileBrowserTextBox
            {
                ServerId     = this.ServerId,
                IncludeFiles = true,
                Required     = true
            };

            this.txtVersions = new ValidatingTextBox
            {
                TextMode = TextBoxMode.MultiLine,
                Required = true,
                Rows     = 3
            };

            this.Controls.Add(
                new SlimFormField("Nuspec file:", this.txtNuspecFile),
                new SlimFormField("Dependencies:", this.txtVersions)
            {
                HelpText = "Provide a list of dependency versions to write to the .nuspec file in the format <i>Id=Version</i> (one per line). For example:<br/><i>jQuery=[1.9.1]<br/>Internal.Library=[$ReleaseName]</i>"
            }
                );
        }
        protected override void CreateChildControls()
        {
            this.txtTo = new ValidatingTextBox
            {
                Required = true,
                TextMode = TextBoxMode.MultiLine,
                Rows     = 5
            };

            this.txtSubject = new ValidatingTextBox
            {
                MaxLength = 255,
                Required  = true
            };

            this.txtBody = new TextBox
            {
                TextMode = TextBoxMode.MultiLine,
                Rows     = 10
            };

            this.txtAttachment = new FileBrowserTextBox
            {
                IncludeFiles = true,
                DefaultText  = "no attachment"
            };

            this.ddlServer = new ActionServerPicker
            {
                ID            = "bm-action-server-id",
                ClientIDMode  = ClientIDMode.Static,
                EnvironmentId = this.EnvironmentId,
                ServerId      = this.ServerId
            };

            this.chkAttachFile = new CheckBox {
                Text = "Attach file..."
            };

            this.chkIsBodyHtml = new CheckBox {
                Text = "Send as HTML"
            };

            var ctlAttachmentContainer = new Div(
                new Div("From server:"),
                this.ddlServer,
                new Div("From file:"),
                this.txtAttachment
                );

            this.Controls.Add(
                new SlimFormField("To address(es):", this.txtTo)
            {
                HelpText = "Multiple recipients should be separated with a semicolon or newline."
            },
                new SlimFormField("Subject:", this.txtSubject),
                new SlimFormField("Body text:", new Div(this.txtBody), new Div(this.chkIsBodyHtml)),
                new SlimFormField("Attachment:", chkAttachFile, ctlAttachmentContainer)
                );

            this.Controls.BindVisibility(chkAttachFile, ctlAttachmentContainer);
        }
Esempio n. 17
0
        protected override void CreateChildControls()
        {
            this.txtFileName = new Inedo.Web.FileBrowserTextBox {
                IncludeFiles = true, ServerId = this.ServerId, Required = true
            };

            this.txtId = new ValidatingTextBox {
                Required = true
            };
            this.txtVersion = new ValidatingTextBox {
                Required = true
            };
            this.txtAuthors = new ValidatingTextBox {
                Required = true
            };
            this.txtDescription = new ValidatingTextBox {
                Required = true, TextMode = TextBoxMode.MultiLine, Rows = 5
            };

            this.txtTitle      = new ValidatingTextBox();
            this.txtSummary    = new ValidatingTextBox();
            this.txtLanguage   = new ValidatingTextBox();
            this.txtTags       = new ValidatingTextBox();
            this.txtProjectUrl = new ValidatingTextBox();
            this.txtIconUrl    = new ValidatingTextBox();
            this.txtLicenseUrl = new ValidatingTextBox();
            this.txtCopyright  = new ValidatingTextBox();
            this.chkRequireLicenseAcceptance = new CheckBox {
                Text = "Require license acceptance"
            };

            this.txtDependencies = new ValidatingTextBox {
                TextMode = TextBoxMode.MultiLine, Rows = 5
            };
            this.txtFrameworkAssemblies = new ValidatingTextBox {
                TextMode = TextBoxMode.MultiLine, Rows = 5
            };

            this.Controls.Add(
                new SlimFormField(".nuspec file:", this.txtFileName),
                new SlimFormField("Package ID:", this.txtId),
                new SlimFormField("Version:", this.txtVersion),
                new SlimFormField("Authors (comma-separated):", this.txtAuthors),
                new SlimFormField("Description:", this.txtDescription),
                new SlimFormField("Title:", this.txtTitle),
                new SlimFormField("Summary:", this.txtSummary),
                new SlimFormField("Copyright:", this.txtCopyright),
                new SlimFormField("Language:", this.txtLanguage),
                new SlimFormField("Tags (space-separated):", this.txtTags),
                new SlimFormField("Project URL:", this.txtProjectUrl),
                new SlimFormField("Icon URL:", this.txtIconUrl),
                new SlimFormField("License URL:", this.txtLicenseUrl),
                new SlimFormField("", this.chkRequireLicenseAcceptance),
                new SlimFormField("Dependencies:", this.txtDependencies)
            {
                HelpText = "Provide a list of other NuGet packages that this package depends on. Dependencies should be entered one per line in the format <i>ID:version</i>."
            },
                new SlimFormField("Framework assemblies:", this.txtFrameworkAssemblies)
            {
                HelpText = "Provide a list of .NET Framework assemblies that this package depends on. Assembly names should be entered one per line. For example, <i>PresentationCore</i>."
            }
                );
        }
Esempio n. 18
0
        protected override void CreateChildControls()
        {
            this.txtApplicationName = new ValidatingTextBox {
                Required = true
            };
            this.txtProviderUrl = new ValidatingTextBox {
                Required = true
            };
            this.txtCertificatePath     = new FileBrowserTextBox();
            this.txtCertificatePassword = new PasswordTextBox();
            this.txtCertificateHash     = new ValidatingTextBox();
            this.txtVersion             = new ValidatingTextBox {
                Required = true
            };
            this.txtMinVersion        = new ValidatingTextBox();
            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();
            this.txtFilesExcludedFromManifest = new ValidatingTextBox {
                TextMode = TextBoxMode.MultiLine
            };
            this.txtIconFile             = new ValidatingTextBox();
            this.txtAppCodeBaseDirectory = new ValidatingTextBox();
            this.chkTrustUrlParameters   = new CheckBox {
                Text = "Trust URL parameters"
            };

            this.txtFileAssociationDefaultIcon1 = new ValidatingTextBox();
            this.txtFileAssociationDescription1 = new ValidatingTextBox();
            this.txtFileAssociationExtension1   = new ValidatingTextBox();
            this.txtFileAssociationProgId1      = new ValidatingTextBox();

            this.txtFileAssociationDefaultIcon2 = new ValidatingTextBox();
            this.txtFileAssociationDescription2 = new ValidatingTextBox();
            this.txtFileAssociationExtension2   = new ValidatingTextBox();
            this.txtFileAssociationProgId2      = new ValidatingTextBox();

            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)));
        }
Esempio n. 19
0
        protected override void CreateChildControls()
        {
            this.ddlSourceType = new DropDownList {
                ID = "ddlSourceType"
            };
            this.ddlSourceType.Items.Add(new ListItem(".nuspec file", "nuspec"));
            this.ddlSourceType.Items.Add(new ListItem("msbuild project", "msbuild"));

            this.txtNuspecPath = new Inedo.Web.FileBrowserTextBox
            {
                IncludeFiles = true,
                ServerId     = this.ServerId
            };

            this.txtProjectPath = new Inedo.Web.FileBrowserTextBox
            {
                IncludeFiles = true,
                ServerId     = this.ServerId
            };

            this.txtVersion = new ValidatingTextBox {
                DefaultText = "default (nuspec or project version)"
            };

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

            this.chkSymbols = new CheckBox {
                Text = "Create symbol package"
            };
            this.chkIncludeReferencedProjects = new CheckBox {
                Text = "Include referenced projects"
            };

            var ctlNuspecFileField = new SlimFormField(".nuspec file:", this.txtNuspecPath)
            {
                ID = "ctlNuspecFileField"
            };
            var ctlProjectFileField = new SlimFormField("MSBuild project:", this.txtProjectPath)
            {
                ID = "ctlProjectFileField"
            };

            var ffgProperties = new SlimFormField("Properties:", this.txtProperties)
            {
                ID       = "ffgProperties",
                HelpText = "Provide additional properties to pass to NuGet. Use the format Property=Value (one per line). For example:<br/><i>Configuration=Release</i>"
            };

            this.Controls.Add(
                new SlimFormField("Source:", this.ddlSourceType),
                ctlNuspecFileField,
                ctlProjectFileField,
                new SlimFormField("Package version:", this.txtVersion),
                ffgProperties,
                new SlimFormField("Options:", new Div(this.chkSymbols), new Div(this.chkIncludeReferencedProjects)),
                new RenderJQueryDocReadyDelegator(
                    w =>
            {
                w.WriteLine("var updateFields = function() {");
                w.WriteLine("  if($('#{0}').val() == 'nuspec') {{", this.ddlSourceType.ClientID);
                w.WriteLine("    $('#{0}').show();", ctlNuspecFileField.ClientID);
                w.WriteLine("    $('#{0}').hide();", ctlProjectFileField.ClientID);
                w.WriteLine("    $('#{0}').hide();", ffgProperties.ClientID);
                w.WriteLine("  } else {");
                w.WriteLine("    $('#{0}').show();", ctlProjectFileField.ClientID);
                w.WriteLine("    $('#{0}').hide();", ctlNuspecFileField.ClientID);
                w.WriteLine("    $('#{0}').show();", ffgProperties.ClientID);
                w.WriteLine("  }");
                w.WriteLine("};");
                w.WriteLine("updateFields();");
                w.WriteLine("$('#{0}').change(updateFields);", this.ddlSourceType.ClientID);
            }
                    )
                );
        }
Esempio n. 20
0
        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 FileBrowserTextBox
            {
                ID           = "txtProjectPath",
                IncludeFiles = true
            };

            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 FileBrowserTextBox
            {
                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(
                    "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 = "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);
            }
                    )
                );
        }