diff --git a/.idea/.idea.AndroidPDACommand/.idea/.gitignore b/.idea/.idea.AndroidPDACommand/.idea/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..34a0510b11b36ce403556bc4974be7344bd43da0
--- /dev/null
+++ b/.idea/.idea.AndroidPDACommand/.idea/.gitignore
@@ -0,0 +1,13 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Rider ignored files
+/projectSettingsUpdater.xml
+/contentModel.xml
+/.idea.AndroidPDACommand.iml
+/modules.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/.idea.AndroidPDACommand/.idea/.name b/.idea/.idea.AndroidPDACommand/.idea/.name
new file mode 100644
index 0000000000000000000000000000000000000000..03a2f9caf402fed2e937c35c9f4877ccef0ccda6
--- /dev/null
+++ b/.idea/.idea.AndroidPDACommand/.idea/.name
@@ -0,0 +1 @@
+AndroidPDACommand
\ No newline at end of file
diff --git a/.idea/.idea.AndroidPDACommand/.idea/indexLayout.xml b/.idea/.idea.AndroidPDACommand/.idea/indexLayout.xml
new file mode 100644
index 0000000000000000000000000000000000000000..7b08163cebc50fb3e777eea4881b68fcebc10590
--- /dev/null
+++ b/.idea/.idea.AndroidPDACommand/.idea/indexLayout.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.AndroidPDACommand/.idea/vcs.xml b/.idea/.idea.AndroidPDACommand/.idea/vcs.xml
new file mode 100644
index 0000000000000000000000000000000000000000..94a25f7f4cb416c083d265558da75d457237d671
--- /dev/null
+++ b/.idea/.idea.AndroidPDACommand/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AndroidPDACommand.csproj b/AndroidPDACommand.csproj
index 0a48bc3d739216a3a9ace2cccd0e573625078c05..bf8628c1599e6325fbbe0e3cddd293044fdd2b46 100644
--- a/AndroidPDACommand.csproj
+++ b/AndroidPDACommand.csproj
@@ -41,17 +41,17 @@
- C:\Program Files\Forguncy 8\Website\designerBin\Forguncy.Commands.dll
+ D:\ForguncyOtherVersion\8.0.6.0\Website\designerBin\Forguncy.Commands.dll
- C:\Program Files\Forguncy 8\Website\designerBin\Forguncy.Commands.Design.dll
+ D:\ForguncyOtherVersion\8.0.6.0\Website\designerBin\Forguncy.Commands.Design.dll
- C:\Program Files\Forguncy 8\Website\designerBin\GrapeCity.Forguncy.Plugin.dll
+ D:\ForguncyOtherVersion\8.0.6.0\Website\designerBin\GrapeCity.Forguncy.Plugin.dll
False
- C:\Program Files\Forguncy 8\Website\bin\GrapeCity.Forguncy.ServerApi.dll
+ D:\ForguncyOtherVersion\8.0.6.0\Website\bin\GrapeCity.Forguncy.ServerApi.dll
packages\Jiguang.JPush.1.2.5\lib\net45\Jiguang.JPush.dll
@@ -85,6 +85,9 @@
+
+
+
@@ -199,8 +202,11 @@
+
+
+
- "E:\CODE\PluginTools\PluginPackageTool\bin\Release\PluginPackageTool.exe" "$(ProjectDir)\" "$(ConfigurationName)"
+ "D:\ForguncyCode\puglin\PluginTools\PluginPackageTool\bin\Release\PluginPackageTool.exe" "$(ProjectDir)\" "$(ConfigurationName)"
\ No newline at end of file
diff --git a/OnKeyDown_Listen_Start_Async.cs b/OnKeyDown_Listen_Start_Async.cs
new file mode 100644
index 0000000000000000000000000000000000000000..e6b017428893320bcc47fc1e408012ea92da3759
--- /dev/null
+++ b/OnKeyDown_Listen_Start_Async.cs
@@ -0,0 +1,25 @@
+using System.ComponentModel;
+using GrapeCity.Forguncy.Commands;
+using GrapeCity.Forguncy.Plugin;
+
+namespace AndroidPDACommand
+{
+ [Icon("pack://application:,,,/AndroidPDACommand;component/Resources/Icon_OnKeyDown.png")]
+ [Category("活字格安卓容器(HAC)")]
+ [OrderWeight(780)]
+ public class OnKeyDown_Listen_Start_Async : BaseAsyncCommand
+ {
+ public override string ToString()
+ {
+ return "开始监听物理按键"; // 命令列表中默认显示的名称
+ }
+
+ [DisplayName("按键")]
+ [ComboProperty(
+ ValueList = "82|4|3|24|25|26|84|27|5|6|19|20|21|22|23|7|8|9|10|11|12|13|14|15|16|17|18",
+ DisplayList = "菜单键|返回键|主页键|音量加键|音量减键|电源键|搜索键|相机键|调用键|挂断键|方向键上|方向键下|方向键左|方向键右|中央选择键|数字键0|数字键1|数字键2|数字键3|数字键4|数字键5|数字键6|数字键7|数字键8|数字键9|星号键|井号键"
+ )]
+ public string TheKey { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/OnKeyDown_Listen_Stop.cs b/OnKeyDown_Listen_Stop.cs
new file mode 100644
index 0000000000000000000000000000000000000000..b6e732a503c1635c71a3349997d59c5fb7c2f757
--- /dev/null
+++ b/OnKeyDown_Listen_Stop.cs
@@ -0,0 +1,23 @@
+using System.ComponentModel;
+using GrapeCity.Forguncy.Plugin;
+
+namespace AndroidPDACommand
+{
+ [Icon("pack://application:,,,/AndroidPDACommand;component/Resources/Icon_OnKeyDown.png")]
+ [Category("活字格安卓容器(HAC)")]
+ [OrderWeight(781)]
+ public class OnKeyDown_Listen_Stop : BaseCommand
+ {
+ public override string ToString()
+ {
+ return "停止监听指定物理按键";
+ }
+
+ [DisplayName("按键")]
+ [ComboProperty(
+ ValueList = "82|4|3|24|25|26|84|27|5|6|19|20|21|22|23|7|8|9|10|11|12|13|14|15|16|17|18",
+ DisplayList = "菜单键|返回键|主页键|音量加键|音量减键|电源键|搜索键|相机键|调用键|挂断键|方向键上|方向键下|方向键左|方向键右|中央选择键|数字键0|数字键1|数字键2|数字键3|数字键4|数字键5|数字键6|数字键7|数字键8|数字键9|星号键|井号键"
+ )]
+ public string TheKey { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/OnKeyDown_Listen_Stop_All.cs b/OnKeyDown_Listen_Stop_All.cs
new file mode 100644
index 0000000000000000000000000000000000000000..390597d06ee930acd79a691c0d2f61a2395d8c97
--- /dev/null
+++ b/OnKeyDown_Listen_Stop_All.cs
@@ -0,0 +1,16 @@
+using System.ComponentModel;
+using GrapeCity.Forguncy.Plugin;
+
+namespace AndroidPDACommand
+{
+ [Icon("pack://application:,,,/AndroidPDACommand;component/Resources/Icon_OnKeyDown.png")]
+ [Category("活字格安卓容器(HAC)")]
+ [OrderWeight(782)]
+ public class OnKeyDown_Listen_Stop_All : BaseCommand
+ {
+ public override string ToString()
+ {
+ return "停止监听所有物理按键";
+ }
+ }
+}
\ No newline at end of file
diff --git a/PluginConfig.json b/PluginConfig.json
index 0e963090d04adddcc7d42b6931129650fc7e36b9..8c2da3b32b8430cdbbda9069c0367b5bf5a756b0 100644
--- a/PluginConfig.json
+++ b/PluginConfig.json
@@ -12,7 +12,7 @@
"name": "PDA(Android)交互命令",
"pluginType": "command",
"guid": "{16B8DF69-1379-41C1-9194-BE89BAF8BB32}",
- "version": "1.19.0.1",
+ "version": "1.20.0.0",
"dependenceVersion": "8.0.0.0",
"bundleJavaScript": true,
"bundleCSS": true
diff --git a/Resources/AndroidPDACommand.js b/Resources/AndroidPDACommand.js
index 8a20f242d5cdbc0e2a143adf0ddb58077bb5e88c..9a994d4b8eaf88b9a0396828e368ab30ab30d565 100644
--- a/Resources/AndroidPDACommand.js
+++ b/Resources/AndroidPDACommand.js
@@ -2403,3 +2403,81 @@ var GenericBroadcast_Start_Async_Command = (function (_super) {
Forguncy.CommandFactory.registerCommand("AndroidPDACommand.GenericBroadcast_Start_Async, AndroidPDACommand", GenericBroadcast_Start_Async_Command);
+var OnKeyDown_Listen_Start_Async_Command = (function (_super) {
+ __extends(OnKeyDown_Listen_Start_Async_Command, _super);
+ function OnKeyDown_Listen_Start_Async_Command() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+
+ OnKeyDown_Listen_Start_Async_Command.prototype.execute = function () {
+ var params = this.CommandParam;
+ var theKey = this.evaluateFormula(params.TheKey);
+ var me = this;
+
+ var ticket = HAC_GenerateCallbackTicket(me, function (payload, payload2) {
+ me.CommandExecutor.excuteCommand(me.CommandParam.CommandList, {
+ runTimePageName: me.CommandExecutingInfo.runTimePageName,
+ commandID: new Date().valueOf().toString(),
+ initParams: {
+ "ExtrasInJSON": payload,
+ "IsSuccess": true,
+ "Error": ""
+ },
+ locationString: "执行window.onKeyDownListen.startOnKeyDownListenAsync的回调"
+ });
+ });
+
+ if (window.onKeyDownListen && window.onKeyDownListen.startOnKeyDownListenAsync) {
+ window.onKeyDownListen.startOnKeyDownListenAsync(ticket, theKey);
+ } else {
+ HAC_CallFunctionOutOfHAC();
+ }
+ }
+
+ return OnKeyDown_Listen_Start_Async_Command;
+}(Forguncy.CommandBase));
+
+Forguncy.CommandFactory.registerCommand("AndroidPDACommand.OnKeyDown_Listen_Start_Async, AndroidPDACommand", OnKeyDown_Listen_Start_Async_Command);
+
+var OnKeyDown_Listen_Stop_Command = (function (_super) {
+ __extends(OnKeyDown_Listen_Stop_Command, _super);
+ function OnKeyDown_Listen_Stop_Command() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+
+ OnKeyDown_Listen_Stop_Command.prototype.execute = function () {
+
+ var params = this.CommandParam;
+ var theKey = this.evaluateFormula(params.TheKey);
+
+ if (window.onKeyDownListen && window.onKeyDownListen.stopOnKeyDownListen) {
+ window.onKeyDownListen.stopOnKeyDownListen(theKey);
+ } else {
+ HAC_CallFunctionOutOfHAC();
+ }
+ };
+
+ return OnKeyDown_Listen_Stop_Command;
+}(Forguncy.CommandBase));
+
+Forguncy.CommandFactory.registerCommand("AndroidPDACommand.OnKeyDown_Listen_Stop, AndroidPDACommand", OnKeyDown_Listen_Stop_Command);
+
+var OnKeyDown_Listen_Stop_All_Command = (function (_super) {
+ __extends(OnKeyDown_Listen_Stop_All_Command, _super);
+ function OnKeyDown_Listen_Stop_All_Command() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+
+ OnKeyDown_Listen_Stop_All_Command.prototype.execute = function () {
+
+ if (window.onKeyDownListen && window.onKeyDownListen.stopAllOnKeyDownListen) {
+ window.onKeyDownListen.stopAllOnKeyDownListen();
+ } else {
+ HAC_CallFunctionOutOfHAC();
+ }
+ };
+
+ return OnKeyDown_Listen_Stop_All_Command;
+}(Forguncy.CommandBase));
+
+Forguncy.CommandFactory.registerCommand("AndroidPDACommand.OnKeyDown_Listen_Stop_All, AndroidPDACommand", OnKeyDown_Listen_Stop_All_Command);
\ No newline at end of file
diff --git a/Resources/Icon_OnKeyDown.png b/Resources/Icon_OnKeyDown.png
new file mode 100644
index 0000000000000000000000000000000000000000..d87a4d465de8afb8d8c0853152023420e774e351
Binary files /dev/null and b/Resources/Icon_OnKeyDown.png differ