陈嘉乐
2020-07-10 48ba446936b51fffafa7c3600c0dadc6ac0e8c20
ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/AirConditionerModeForm.cs
@@ -52,7 +52,7 @@
        }
        /// <summary>
        /// 初始化中部信息
        /// 初始化中部信息 ☆☆☆☆☆
        /// </summary>
        private void InitMiddleFrame()
        {
@@ -106,7 +106,7 @@
                    var btnOk = new BottomClickButton();
                    btnOk.TextID = R.MyInternationalizationString.uSave;
                    bodyFrameLayout.AddChidren(btnOk);
                    btnOk.ButtonClickEvent += async (sender, e) =>
                    btnOk.ButtonClickEvent += (sender, e) =>
                     {
                         if (this.oldReportValue == this.reportValue)
                         {
@@ -116,13 +116,13 @@
                         }
                         //将二进制转换为十进制
                         var data = Convert.ToInt32(this.fixValue + this.reportValue, 2);
                         var result = await HdlDeviceAirConditionerLogic.Current.SetAcModeSupport(deviceAc, data);
                         var result = HdlDeviceAirConditionerLogic.Current.SetAcModeSupport(deviceAc, data);
                         if (result == true)
                         {
                             //更改缓存
                             for (int i = 0; i < this.reportValue.Length; i++)
                             {
                                 deviceAc.listSupportMode[i] = Convert.ToInt32(reportValue[i]);
                                 deviceAc.listSupportMode[i] = Convert.ToInt32(reportValue[i].ToString());
                             }
                             deviceAc.ReSave();
                             this.CloseForm();
@@ -181,10 +181,23 @@
        #region ■ 读取空调自定义模式_________________
        /// <summary>
        /// 读取空调自定义模式
        /// 读取空调自定义模式 ☆☆☆☆☆
        /// </summary>
        private void ReadAirConditionerModeSupport()
        {
            //如果是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                var data = ModelData.DeviceModelDataLogic.Current.GetAcModeSupport(deviceAc);
                //转换为二进制
                var value = Convert.ToString(data, 2).PadLeft(16, '0');
                //这五个设置是放在后面的
                this.fixValue = value.Substring(0, value.Length - 5);
                this.reportValue = value.Substring(this.fixValue.Length);
                oldReportValue = reportValue;
                return;
            }
            string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(deviceAc);
            HdlGatewayReceiveLogic.Current.AddAttributeEvent("ReadAirConditionerModeSupport", ReceiveComandDiv.A设备属性上报, (report) =>
            {