From 0058d3fd5cf6052016ae744aeca2272623bfb6c8 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期一, 28 十月 2019 17:49:52 +0800
Subject: [PATCH] 2019-10-28-2
---
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
index a4e865e..8b0238f 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -452,13 +452,26 @@
}
}
var accounts = new JArray();
- foreach (var dictionary in logic.Accounts) {
+ foreach (var dictionary in logic.Accounts)
+ {
var Type = int.Parse(dictionary["Type"]);
switch (Type)
{
- case 1: {
+ case 1:
+ {
///
- } break;
+ if (logic.LogicType == 1)
+ {
+ var accounts1 = new JObject
+ {
+ ["Type"] = int.Parse(dictionary["Type"]),
+ ["Account"] = dictionary["Account"],
+
+ };
+ accounts.Add(accounts1);
+ }
+ }
+ break;
case 7:
{
var location = new JObject
@@ -481,6 +494,7 @@
{ "IsEnable", logic.IsEnable} ,
{ "LogicName", logic.LogicName},
{ "Relationship",logic.Relationship} ,
+ { "LogicType",logic.LogicType} ,
{ "LogicCustomPushText",logic.LogicCustomPushText} ,
{ "TimeAttribute", timeAttribute} ,
{ "Conditions", conditions },
@@ -594,9 +608,10 @@
logic.IsEnable = int.Parse(Logicifon["IsEnable"].ToString());
logic.LogicName = Logicifon["LogicName"].ToString();
logic.LogicType = int.Parse(Logicifon["LogicType"].ToString());
- logic.Relationship = int.Parse(Logicifon["Relationship"].ToString());
+ logic.Relationship = int.Parse(Logicifon["Relationship"].ToString());
logic.TimeAttribute = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.TimeAttributeObj>(Logicifon["TimeAttribute"].ToString());
logic.Conditions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(Logicifon["Conditions"].ToString());
+ logic.Accounts = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(Logicifon["Accounts"].ToString());
List<Dictionary<string, object>> listactions = new List<Dictionary<string, object>>();
listactions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(Logicifon["Actions"].ToString());
--
Gitblit v1.8.0