From 8b9c0bc017d0eca8b9d7d1666d5228e9d0246ba4 Mon Sep 17 00:00:00 2001 From: yashen Date: Wed, 12 Oct 2016 14:52:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8F=B7=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=A2=9E=E5=8A=A0=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Pages/B3WeChat/Tools/CustomMenuMan.cs | 68 +++++++++++++++++++ WebFolder/config/Plugins/B3WeChat.plugin | 6 +- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 B3WeChat.Web/Pages/B3WeChat/Tools/CustomMenuMan.cs diff --git a/B3WeChat.Web/Pages/B3WeChat/Tools/CustomMenuMan.cs b/B3WeChat.Web/Pages/B3WeChat/Tools/CustomMenuMan.cs new file mode 100644 index 0000000..0b5cd6f --- /dev/null +++ b/B3WeChat.Web/Pages/B3WeChat/Tools/CustomMenuMan.cs @@ -0,0 +1,68 @@ +using BWP.B3WeChat.Utils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web.UI; +using System.Web.UI.HtmlControls; +using System.Web.UI.WebControls; +using TSingSoft.WebControls2; +using TSingSoft.WebPluginFramework.Security; + +namespace BWP.Web.Pages.B3WeChat.Tools +{ + class CustomMenuMan:AppBasePage + { + protected override void InitForm(HtmlForm form) + { + if (!User.IsInRole("B3WeChat.服务号管理.自定义菜单")) + { + throw new AppSecurityException(); + } + + form.Controls.Add(new LiteralControl("

" + TabTitle + "

")); + var vPanel = new VLayoutPanel(); + form.Controls.Add(vPanel); + + var toobar = new HLayoutPanel(); + vPanel.Add(toobar); + + var text = new TextBox(); + text.Width = Unit.Percentage(100); + text.TextMode = TextBoxMode.MultiLine; + text.Height = Unit.Pixel(600); + text.Style.Add("margin", "15px"); + vPanel.Add(text, new VLayoutOption(HorizontalAlign.Left)); + + + toobar.Add(new TSButton("载入", delegate + { + text.Text = InOutMessageUtil.GetCustomMenu(); + AspUtil.Alert(this, "载入自定义菜单成功"); + })); + + + + toobar.Add(new TSButton("设置", delegate + { + InOutMessageUtil.SetCustomMenu(text.Text); + AspUtil.Alert(this, "设置自定义菜单成功"); + })); + + toobar.Add(new TSButton("删除", delegate + { + InOutMessageUtil.DelteCustomMenu(); + AspUtil.Alert(this, "删除自定义菜单成功"); + })); + + } + + protected override string TabTitle + { + get + { + return "自定义菜单"; + } + } + } +} diff --git a/WebFolder/config/Plugins/B3WeChat.plugin b/WebFolder/config/Plugins/B3WeChat.plugin index 54f2db4..56cd290 100644 --- a/WebFolder/config/Plugins/B3WeChat.plugin +++ b/WebFolder/config/Plugins/B3WeChat.plugin @@ -25,9 +25,13 @@ + + + + - +