-
Notifications
You must be signed in to change notification settings - Fork 0
/
DeleteItemActionEditor.cs
48 lines (42 loc) · 1.5 KB
/
DeleteItemActionEditor.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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using Inedo.BuildMaster.Extensibility.Actions;
using Inedo.BuildMaster.Web.Controls;
using Inedo.BuildMaster.Web.Controls.Extensions;
using Inedo.Web.Controls;
namespace Inedo.BuildMasterExtensions.Artifactory
{
internal sealed class DeleteItemActionEditor : ArtifactoryActionBaseEditor
{
private ValidatingTextBox txtItemName;
public DeleteItemActionEditor ()
{
this.extensionInstance = new DeleteItemAction();
}
public override void BindToForm(ActionBase extension)
{
var action = (DeleteItemAction) extension;
this.EnsureChildControls();
base.BindToForm(extension);
this.txtItemName.Text = action.ItemName;
}
public override ActionBase CreateFromForm()
{
this.EnsureChildControls();
return PopulateProperties(new DeleteItemAction() { ItemName = this.txtItemName.Text }
);
}
protected override void CreateChildControls()
{
base.CreateChildControls();
this.txtItemName = new ValidatingTextBox() { Width = 300 };
this.Controls.Add(new FormFieldGroup("Item","Item Information, if item is a directory then all contents will be recursively deleted.",true,
new StandardFormField("Item Name:",txtItemName)
)
);
}
}
}