gxc
2019-12-16 40f46f32cb00f4304a691d4f027a76a13a9ebb6d
ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
@@ -3,6 +3,7 @@
using ZigBee.Device;
using Shared.Phone.Device.CommonForm;
using Shared.Phone.UserView;
using Shared.Phone.Device.DeviceLogic;
namespace Shared.Phone.Device.AC
{
@@ -117,6 +118,10 @@
        /// </summary>
        private LeftIconButtonRow cleanStatu;
        /// <summary>
        /// IsDrawerLockMode
        /// </summary>
        public bool IsDrawerLockMode;
        #endregion
        #region ◆ 接口___________________________
@@ -354,6 +359,7 @@
            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
            ZigBee.Device.ZbGateway.StatusList.Add(this);
            HomePage.Instance.ScrollEnabled = false;
        }
        #endregion
@@ -370,6 +376,10 @@
            //action = null;
            RemoveUpdateControlDeviceStatuAction();
            HomePage.Instance.ScrollEnabled = true;
            if (IsDrawerLockMode)
            {
                CommonPage.Instance.IsDrawerLockMode = false;
            }
            base.RemoveFromParent();
        }
@@ -401,34 +411,16 @@
                //发送读取状态命令
                UserView.UserHomeView.ReadStatus(ac, () =>
                {
                    ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
                    ac.ReadLocalTemperature();
                    ac.ReadCoolingSetpoint();
                    ac.ReadHeatingSetpoint();
                    ac.ReadAutoSetpoint();
                    ac.ReadFanMode();
                    ac.ReadSystemMode();
                    ac.ReadSystemFansSwingMode();
                    ac.ReadModeSupport();
                    ac.ReadCleanStatu();
                    ReadDeviceAttributeLogic.Instance.SendACStatuComand(device.CommonDevice);
                });
            }
            else
            {
                //防止短时间内多次读取设备状态
                if ((DateTime.Now - ac.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
                {
                    ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
                    ac.ReadLocalTemperature();
                    ac.ReadCoolingSetpoint();
                    ac.ReadHeatingSetpoint();
                    ac.ReadAutoSetpoint();
                    ac.ReadFanMode();
                    ac.ReadSystemMode();
                    ac.ReadSystemFansSwingMode();
                    ac.ReadModeSupport();
                    ac.ReadCleanStatu();
                }
                //if ((DateTime.Now - ac.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
                //{
                    ReadDeviceAttributeLogic.Instance.SendACStatuComand(device.CommonDevice);
                //}
            }
            var de = Shared.Common.Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
@@ -576,7 +568,7 @@
                Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode)
            };
            itemView.AddChidren(currentModeBtn);
            reduceTemperatureBtn = new Button()
            {
                X = Application.GetRealWidth(268),
@@ -939,7 +931,7 @@
                Width = Application.GetRealWidth(modeItem_Width - modeItem_X),
                Height = Application.GetRealHeight(modeItem_Height),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextID = R.MyInternationalizationString.SelectFanMode,
                TextID = R.MyInternationalizationString.SelectMode,
                TextAlignment = TextAlignment.CenterLeft
            };
            changeModeFL.AddChidren(changeModeBtn);