-
Notifications
You must be signed in to change notification settings - Fork 0
/
PageConfiguration.aspx.cs
51 lines (43 loc) · 2.03 KB
/
PageConfiguration.aspx.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
49
50
51
using System;
using System.Web.UI.WebControls;
using SiteServer.Plugins;
using SiteServer.Plugins.API;
namespace Plugin.Oss
{
public class PageConfiguration : PluginPageBase
{
public CheckBox CbIsOss;
public PlaceHolder PhOss;
public TextBox TbAccessKeyId;
public TextBox TbAccessKeySecret;
public TextBox TbBucketName;
public TextBox TbBucketEndPoint;
public TextBox TbBucketPath;
public void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
CbIsOss.Checked = Options.GetSiteOption(SiteId, Utils.OptionIsOss) == true.ToString();
PhOss.Visible = CbIsOss.Checked;
TbAccessKeyId.Text = Options.GetSiteOption(SiteId, Utils.OptionAccessKeyId);
TbAccessKeySecret.Text = Options.GetSiteOption(SiteId, Utils.OptionAccessKeySecret);
TbBucketName.Text = Options.GetSiteOption(SiteId, Utils.OptionBucketName);
TbBucketEndPoint.Text = Options.GetSiteOption(SiteId, Utils.OptionBucketEndPoint);
TbBucketPath.Text = Options.GetSiteOption(SiteId, Utils.OptionBucketPath);
}
public void CbIsOss_OnSelectedIndexChanged(object sender, EventArgs e)
{
PhOss.Visible = CbIsOss.Checked;
}
public void Submit_OnClick(object sender, EventArgs e)
{
if (!Page.IsPostBack || !Page.IsValid) return;
Options.SetSiteOption(SiteId, Utils.OptionIsOss, CbIsOss.Checked.ToString());
Options.SetSiteOption(SiteId, Utils.OptionAccessKeyId, TbAccessKeyId.Text);
Options.SetSiteOption(SiteId, Utils.OptionAccessKeySecret, TbAccessKeySecret.Text);
Options.SetSiteOption(SiteId, Utils.OptionBucketName, TbBucketName.Text);
Options.SetSiteOption(SiteId, Utils.OptionBucketEndPoint, TbBucketEndPoint.Text);
Options.SetSiteOption(SiteId, Utils.OptionBucketPath, TbBucketPath.Text);
//DataProvider.PublishmentSystemDao.Update(PublishmentSystemInfo);
}
}
}