From eb5a57942bae8eb57fd7fb61124c247bebb67e8e Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 19 六月 2020 10:18:28 +0800
Subject: [PATCH] Merge branch 'dev-tzy' into dev-2020xm

---
 Home0618/Shared/Phone/Device/Logic/SoneLogicList.cs |   47 ++++++++++++++++++++++++++++-------------------
 1 files changed, 28 insertions(+), 19 deletions(-)

diff --git a/Home0618/Shared/Phone/Device/Logic/SoneLogicList.cs b/Home0618/Shared/Phone/Device/Logic/SoneLogicList.cs
index 98ae30c..6794abc 100755
--- a/Home0618/Shared/Phone/Device/Logic/SoneLogicList.cs
+++ b/Home0618/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -65,7 +65,7 @@
             };
             this.AddChidren(middle);
             #endregion
-            //鏄父寮�妯″紡鍐嶅幓璇诲彇 
+            //鏄父寮�妯″紡鍐嶅幓璇诲彇
             if (Send.CurrentDoorLock.IsDoorLockNormallyMode)
             {
                 //杩涙潵鏇存柊涓�娆�
@@ -221,9 +221,25 @@
                     });
                 }
                 catch { }
-            };
-
-            updateCurrentDoorlockActionTemp = (DoorlockKey, _bool) =>
            {
                var key = Send.CurrentDoorLock.DeviceAddr;
                if (DoorlockKey == key)
                {
                    try
                    {
                        Application.RunOnMainThread(() =>
                        {
                            Send.CurrentDoorLock.IsDoorLockNormallyMode = _bool;
                            ModeView();
                        });
                    }
                    catch { }
                }
            };
+            };
+
+            updateCurrentDoorlockActionTemp = (DoorlockKey, _bool) =>
+            {
+
+                var key = Send.CurrentDoorLock.DeviceAddr;
+                if (DoorlockKey == key)
+                {
+                    try
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            Send.CurrentDoorLock.IsDoorLockNormallyMode = _bool;
+                            ModeView();
+                        });
+                    }
+                    catch { }
+                }
+            };
             UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction += updateCurrentDoorlockActionTemp;
         }
         /// <summary>
@@ -334,23 +350,16 @@
                         var datetime = GetLocalTime(timeLong);
                         ///鏈夋椂鏁堟�у父寮�鎵嶆樉绀烘椂闂存潯浠舵枃鏈�
                         year = datetime.Year.ToString();//閭d竴骞�
-                        month = datetime.Month.ToString();//閭d竴鏈�
-                        var d = int.Parse(datetime.ToString("dd"));//閭d竴澶�
-                        var h = int.Parse(datetime.ToString("HH"));//灏忔椂
-                        int dayInt = (h + timeValue) / 24;//璁剧疆鏃堕棿+褰撳墠绯荤粺鏃堕棿鏄惁瓒呭嚭24灏忔椂
-                        hour = (h + timeValue) % 24;//璁剧疆鏃堕棿+褰撳墠绯荤粺鏃堕棿鏄惁瓒呭嚭24灏忔椂鍓╀笅澶氬皯灏忔椂
-                        days = d + dayInt;//褰撳墠绯荤粺澶╂暟+鎵ц鍚庡ぉ鏁�
+                        month = datetime.Month.ToString();//閭d竴鏈�
+                        days = int.Parse(datetime.ToString("dd"));//閭d竴澶�
+                        hour = int.Parse(datetime.ToString("HH"));//灏忔椂
                         minute = datetime.Minute;//鍒嗛挓
+                        timeLong = 0;
                     }
                     else
                     {
-
-
-
-
-
-
-                        ///璇诲彇绯荤粺鏃堕棿
                        year = DateTime.Now.Year.ToString();//閭d竴骞�
+                        ///璇诲彇绯荤粺鏃堕棿
+                        year = DateTime.Now.Year.ToString();//閭d竴骞�
                         month = DateTime.Now.Month.ToString();//閭d竴鏈�
                         var d = DateTime.Now.ToString("dd");//閭d竴澶�
                         var h = int.Parse(DateTime.Now.ToString("HH"));//灏忔椂
@@ -449,8 +458,8 @@
                                         logicId = addResult;
                                         timeValue = int.Parse(str);
                                         Send.CurrentDoorLock.IsDoorLockNormallyMode = true;
-                                        ModeView();
-                                        ///娣诲姞APP寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
+                                        ModeView();
+                                        ///娣诲姞APP寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
                                         UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(Send.CurrentDoorLock, 9001, string.Empty);
                                     }
 

--
Gitblit v1.8.0