From 3f87bf0ae7394cdd7d52428f1f6b4361434c7cc4 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 15 五月 2020 13:28:33 +0800
Subject: [PATCH] hhhhhhhhh
---
ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs | 72 +++++++++++++++++++++---------------
1 files changed, 42 insertions(+), 30 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
index 4c51329..08d8d07 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -64,7 +64,7 @@
{
//杩涙潵鏇存柊涓�娆�
//鏌ユ壘鏄惁瀛樺湪鏃舵晥鎬ц嚜鍔ㄥ寲锛涙湁鐨勮瘽灏辫繑鍥炶嚜鍔ㄥ寲瀵硅薄;
- var logic = await SkipView.GetLogicIfon();
+ var logic = await SkipView.GetLogicIfon(Send.CurrentDoorLock);
if (logic != null)
{
try
@@ -162,7 +162,10 @@
actionsInfo.Add("LinkType", 8);
actionsInfo.Add("DeviceAddr", Send.CurrentDoorLock.DeviceAddr);
actionsInfo.Add("Epoint", "200");
- actionsInfo.Add("PassData", "055704010113");//榛樿闂ㄩ攣甯稿叧
+ actionsInfo.Add("PassData", "055704010113");//榛樿闂ㄩ攣甯稿叧
+ Dictionary<string, string> accounts = new Dictionary<string, string>();
+ accounts.Add("Option4", Send.CurrentDoorLock.DeviceAddr.ToString());//鐢ㄤ簬鍒ゆ柇璇嗗埆鏄摢涓棬閿�;
+ accounts.Add("Option2", Send.CurrentDoorLock.DeviceEpoint.ToString());
//new涓�涓柊閫昏緫瀵硅薄锛�
//鏂板闂ㄩ攣甯稿紑妯″紡鑷姩鍖栧叆鍙o紱
Common.Logic.CurrentLogic = new Common.Logic();
@@ -170,7 +173,8 @@
Common.Logic.CurrentLogic.LogicType = 2;//鏍囪閫昏緫绫诲瀷
Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.openmode);
Common.Logic.CurrentLogic.Conditions.Add(timeConditionsInfo);//娣诲姞鏉′欢
- Common.Logic.CurrentLogic.Actions.Add(actionsInfo);//娣诲姞鐩爣
+ Common.Logic.CurrentLogic.Actions.Add(actionsInfo);//娣诲姞鐩爣
+ Common.Logic.CurrentLogic.Accounts.Add(accounts);
var oneLogic = new OneLogic();
UserView.HomePage.Instance.AddChidren(oneLogic);
UserView.HomePage.Instance.PageIndex += 1;
@@ -264,6 +268,7 @@
{
if (logicId != 0)
{
+
///鏈夊彲鑳藉彧鏈夊父寮�妯″紡锛屾病鏈夋椂鏁堟�ц嚜鍔ㄥ寲
Send.DelLogic(logicId);
}
@@ -387,43 +392,47 @@
else
{
///鍥犱负鏈夊父寮�妯″紡涓嬫墠鍙互鍒涘缓澶辨晥閫昏緫锛�
- SkipView.GetLogicAll();//鍒犻櫎涔嬪墠鎵�鏈夊け鏁堥�昏緫
+ SkipView.GetLogicAll(Send.CurrentDoorLock);//鍒犻櫎涔嬪墠鎵�鏈夊け鏁堥�昏緫
var addResult = await SkipView.LockAddModifyLogic(int.Parse(str), Send.CurrentDoorLock);//娣诲姞涓�鏉″け鏁堥�昏緫
if (addResult == 0)
- {
+ {
///鍙璇村鏋滃父寮�妯″紡寮�锛屽垱寤鸿嚜鍔ㄥ寲澶辫触锛岄偅涔堝皢瑕佸彂涓�鏉″父寮�妯″紡鍏抽棴鍛戒护;
UserCenter.DoorLock.DoorLockCommonInfo.DelNormallyOpenMode(Send.CurrentDoorLock);
///鎻愮ず澶辫触
LogicView.TipView.ShowFlashTip(Language.StringByID(MyInternationalizationString.addFailed));
- return;
- }
- logicId = addResult;
- timeValue = int.Parse(str);
- Send.CurrentDoorLock.IsDoorLockNormallyMode = true;
- ModeView();
- //娣诲姞App寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
- UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(Send.CurrentDoorLock, 9001, string.Empty);
- }
- }
- catch
- {
+ return;
+ }
+ else
+ {
+ logicId = addResult;
+ timeValue = int.Parse(str);
+ Send.CurrentDoorLock.IsDoorLockNormallyMode = true;
+ ModeView();
+ ///娣诲姞APP寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
+ UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(Send.CurrentDoorLock,9001,string.Empty);
+ }
- }
- finally
- {
- Application.RunOnMainThread(() =>
- {
- CommonPage.Loading.Hide();
- });
- }
- });
+ }
+ }
+ catch
+ {
- });
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ CommonPage.Loading.Hide();
- };
+ });
+ }
+ });
+
+ });
+
+ };
}
-
listLogicFl.Y = fLayout.Bottom;
listLogicFl.X = Application.GetRealWidth(58);
listLogicFl.Height = Application.GetRealHeight(Method.H - 184) - fLayout.Height;
@@ -454,8 +463,11 @@
if (logic.LogicType != 2)
{
continue;
+ }
+ if (SkipView.ExistLogic(logic,Send.CurrentDoorLock))
+ {
+ Common.Logic.SoneLogicList.Add(logic);
}
- Common.Logic.SoneLogicList.Add(logic);
}
}
}
--
Gitblit v1.8.0