From 7b60238359b94125d591678eff105ae2bf47843f Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 15 十一月 2019 13:16:21 +0800 Subject: [PATCH] 2019.11.15 --- ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs | 58 ++++++++++++++++++---------------------------------------- 1 files changed, 18 insertions(+), 40 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs b/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs index 5b44e56..394f0c2 100644 --- a/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs +++ b/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs @@ -333,6 +333,7 @@ { BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; ZigBee.Device.ZbGateway.StatusList.Add(this); + HomePage.Instance.ScrollEnabled = false; } #endregion @@ -348,6 +349,7 @@ //action(); //action = null; RemoveUpdateControlDeviceStatuAction(); + HomePage.Instance.ScrollEnabled = true; base.RemoveFromParent(); } @@ -379,26 +381,14 @@ //鍙戦�佽鍙栫姸鎬佸懡浠� UserView.UserHomeView.ReadStatus(ac, () => { - new System.Threading.Thread(() => - { - System.Threading.Thread.Sleep(100); - ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); - System.Threading.Thread.Sleep(100); - ac.ReadLocalTemperature(); - System.Threading.Thread.Sleep(100); - ac.ReadCoolingSetpoint(); - System.Threading.Thread.Sleep(100); - ac.ReadHeatingSetpoint(); - System.Threading.Thread.Sleep(100); - ac.ReadAutoSetpoint(); - System.Threading.Thread.Sleep(100); - ac.ReadFanMode(); - System.Threading.Thread.Sleep(100); - ac.ReadSystemMode(); - System.Threading.Thread.Sleep(100); - ac.ReadSystemFansSwingMode(); - }) - { IsBackground = true }.Start(); + ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); + ac.ReadLocalTemperature(); + ac.ReadCoolingSetpoint(); + ac.ReadHeatingSetpoint(); + ac.ReadAutoSetpoint(); + ac.ReadFanMode(); + ac.ReadSystemMode(); + ac.ReadSystemFansSwingMode(); }); } else @@ -406,26 +396,14 @@ //闃叉鐭椂闂村唴澶氭璇诲彇璁惧鐘舵�� if ((DateTime.Now - ac.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan) { - new System.Threading.Thread(() => - { - System.Threading.Thread.Sleep(100); - ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); - System.Threading.Thread.Sleep(100); - ac.ReadLocalTemperature(); - System.Threading.Thread.Sleep(100); - ac.ReadCoolingSetpoint(); - System.Threading.Thread.Sleep(100); - ac.ReadHeatingSetpoint(); - System.Threading.Thread.Sleep(100); - ac.ReadAutoSetpoint(); - System.Threading.Thread.Sleep(100); - ac.ReadFanMode(); - System.Threading.Thread.Sleep(100); - ac.ReadSystemMode(); - System.Threading.Thread.Sleep(100); - ac.ReadSystemFansSwingMode(); - }) - { IsBackground = true }.Start(); + ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); + ac.ReadLocalTemperature(); + ac.ReadCoolingSetpoint(); + ac.ReadHeatingSetpoint(); + ac.ReadAutoSetpoint(); + ac.ReadFanMode(); + ac.ReadSystemMode(); + ac.ReadSystemFansSwingMode(); } } -- Gitblit v1.8.0