HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-05-19 e747e6d8524e3146bb48dc304a713f309966b1c6
ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitSettionForm.cs
@@ -101,7 +101,7 @@
            btnNote.InitControl();
            //划线
            btnNote.AddBottomLine();
            btnNote.txtInput.FinishInputEvent += async () =>
            btnNote.txtInput.FinishInputEvent += () =>
             {
                 string oldName = Common.LocalDevice.Current.GetDeviceEpointName(deviceAc);
                 if (btnNote.Text.Trim() == string.Empty)
@@ -112,7 +112,7 @@
                 if (oldName != btnNote.Text)
                 {
                     //设备名称修改
                     var result = await Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
                     var result = Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
                     if (result == false)
                     {
                         return;
@@ -174,9 +174,9 @@
                string statu = btnSwingSwitch.IsSelected == true ? "0" : "1";
                //将二进制转换为十进制
                int sendData = Convert.ToInt32(this.fixValue + statu, 2);
                HdlThreadLogic.Current.RunThread(async () =>
                HdlThreadLogic.Current.RunThread(() =>
                {
                    var result = await HdlDeviceAirConditionerLogic.Current.SetUseAcSwingFunctionStatu(deviceAc, sendData);
                    var result = HdlDeviceAirConditionerLogic.Current.SetUseAcSwingFunctionStatu(deviceAc, sendData);
                    if (result == true)
                    {
                        HdlThreadLogic.Current.RunMain(() =>
@@ -201,13 +201,13 @@
            var btnFinish = new BottomClickButton();
            btnFinish.TextID = R.MyInternationalizationString.uSave;
            bodyFrameLayout.AddChidren(btnFinish);
            btnFinish.ButtonClickEvent += async (sender, e) =>
            btnFinish.ButtonClickEvent += (sender, e) =>
            {
                string oldName = Common.LocalDevice.Current.GetDeviceEpointName(deviceAc);
                if (oldName != btnNote.Text)
                {
                    //设备名称修改
                    var result = await Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
                    var result = Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
                    if (result == false)
                    {
                        return;
@@ -267,6 +267,18 @@
        /// </summary>
        private bool ReadAirConditionerSwingModeSupport()
        {
            //如果是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                var data = ModelData.DeviceModelDataLogic.Current.GetAcSwingModeSupport(deviceAc);
                //转换为二进制
                var value = Convert.ToString(data, 2).PadLeft(16, '0');
                //这个设置是放在后面的
                this.fixValue = value.Substring(0, value.Length - 1);
                this.swingMode = Convert.ToInt32(value.Substring(this.fixValue.Length));
                return true;
            }
            string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(deviceAc);
            HdlGatewayReceiveLogic.Current.AddAttributeEvent("ReadAirConditionerModeSupport", ReceiveComandDiv.A设备属性上报, (report) =>
            {