From 94e4e5b9fd3da964c44b7b14227d6fe2bbb426d7 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期四, 02 四月 2020 13:56:39 +0800
Subject: [PATCH] 2020-04-02-2

---
 ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs
index 8ac599e..b09fc48 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs
@@ -35,7 +35,6 @@
             }
             view.clickBtn.MouseDownEventHandler += (sender, e) =>
             {
-                //UserView.HomePage.Instance.ScrollEnabled = true;//鎭㈠宸︽粦
                 action();
                 RemoveFromParent();
             };
@@ -140,7 +139,7 @@
                             {
                                 var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]);
                                 selecteddevice.deviceNameBtn.Visible = true;
-                                selecteddevice.deviceNameBtn.Text = deviceinof.DeviceEpointName;
+                                selecteddevice.deviceNameBtn.Text = LocalDevice.Current.GetDeviceEpointName(deviceinof);
                                 selecteddevice.regionNameBtn.Visible = true;
                                 Method.RoomNmae(selecteddevice.regionNameBtn, deviceinof);
                                 selecteddevice.edit.Tag = i;
@@ -155,7 +154,7 @@
                                                 {
                                                     if (Common.Logic.CurrentLogic.Accounts[a]["UserId"] == conditions["AttriButeData2"])
                                                     {
-                                                        selecteddevice.selecetddevicestateBtn.Text = Common.Logic.CurrentLogic.Accounts[a]["Account"];
+                                                        selecteddevice.selecetddevicestateBtn.Text = Common.Logic.CurrentLogic.Accounts[a]["AccountName"];
                                                         break;
                                                     }
                                                 }
@@ -184,10 +183,11 @@
                         alert.ConfirmClickEvent += () =>
                         {
                             Common.Logic.CurrentLogic.Conditions.Remove(conditions);
-                            var lockLogicCommunalPage = new LockLogicCommunalPage();
-                            UserView.HomePage.Instance.AddChidren(lockLogicCommunalPage);
-                            UserView.HomePage.Instance.PageIndex += 1;
-                            lockLogicCommunalPage.Show(() => { });
+                            selecteddevice.selecetdFrameLayout.RemoveFromParent();
+                            //var lockLogicCommunalPage = new LockLogicCommunalPage();
+                            //UserView.HomePage.Instance.AddChidren(lockLogicCommunalPage);
+                            //UserView.HomePage.Instance.PageIndex += 1;
+                            //lockLogicCommunalPage.Show(() => { });
                         };
                     };
 
@@ -240,13 +240,13 @@
                     string state = "";
                     switch (linkType)
                     {
-
+                        
                         case 0:
                         case 8:
                             {
 
                                 var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
-                                name = deviceinof.DeviceEpointName;
+                                name =LocalDevice.Current.GetDeviceEpointName(deviceinof);
                                 actiondevice.regionNameBtn.Visible = true;
                                 Method.RoomNmae(actiondevice.regionNameBtn, deviceinof);
 
@@ -588,10 +588,11 @@
                         alert.ConfirmClickEvent += () =>
                         {
                             Common.Logic.CurrentLogic.Actions.Remove(actions);
-                            var lockLogicCommunalPage = new LockLogicCommunalPage();
-                            UserView.HomePage.Instance.AddChidren(lockLogicCommunalPage);
-                            UserView.HomePage.Instance.PageIndex += 1;
-                            lockLogicCommunalPage.Show(() => { });
+                            actiondevice.selecetdFrameLayout.RemoveFromParent();
+                            //var lockLogicCommunalPage = new LockLogicCommunalPage();
+                            //UserView.HomePage.Instance.AddChidren(lockLogicCommunalPage);
+                            //UserView.HomePage.Instance.PageIndex += 1;
+                            //lockLogicCommunalPage.Show(() => { });
                         };
                     };
 
@@ -604,7 +605,6 @@
             Method.Push(middle);
             #endregion
 
-
             saveBtn.clickviewBtn.MouseUpEventHandler += (sender, e) =>
            {
                var name = logicTextBox.Text.Trim();
@@ -614,12 +614,12 @@
         }
         public  void AddCondition(int value)
         {
+            Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
             var addCondition = new AddCondition();
             addCondition.conditionsIndex = value;
             UserView.HomePage.Instance.AddChidren(addCondition);
             UserView.HomePage.Instance.PageIndex += 1;
             addCondition.Show();
-
         }
     }
 }

--
Gitblit v1.8.0