-
Notifications
You must be signed in to change notification settings - Fork 2
/
WindowsExtensionConfigurerEditor.cs
48 lines (43 loc) · 1.72 KB
/
WindowsExtensionConfigurerEditor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System.Web.UI.WebControls;
using Inedo.BuildMaster.Extensibility.Configurers.Extension;
using Inedo.BuildMaster.Web.Controls.Extensions;
using Inedo.Web.Controls;
using Inedo.Web.Controls.SimpleHtml;
namespace Inedo.BuildMasterExtensions.Windows
{
internal sealed class WindowsExtensionConfigurerEditor : ExtensionConfigurerEditorBase
{
private CheckBox chkOverridePowerShellDefaults;
public override void InitializeDefaultValues()
{
}
public override void BindToForm(ExtensionConfigurerBase extension)
{
var configurer = (WindowsExtensionConfigurer)extension;
this.chkOverridePowerShellDefaults.Checked = configurer.OverridePowerShellDefaults;
}
public override ExtensionConfigurerBase CreateFromForm()
{
return new WindowsExtensionConfigurer
{
OverridePowerShellDefaults = this.chkOverridePowerShellDefaults.Checked
};
}
protected override void CreateChildControls()
{
this.chkOverridePowerShellDefaults = new CheckBox
{
Text = "Override PowerShell script defaults"
};
this.Controls.Add(
new SlimFormField(
"Options:",
this.chkOverridePowerShellDefaults,
new P(
"When checked, default values for PowerShell script parameters defined in BuildMaster will always be passed in, regardless of any defaults defined within the script itself."
) { IsIdRequired = false, Class = "subLabel" }
)
);
}
}
}