From 9c16d3614d9b88c637f967518a329f239fcd3aaf Mon Sep 17 00:00:00 2001 From: lss <316519258@qq.com> Date: 星期五, 12 六月 2020 09:22:04 +0800 Subject: [PATCH] 2020.06.12 --- ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitSettionForm.cs | 42 +++++++++++++++++++++++++++++------------- 1 files changed, 29 insertions(+), 13 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitSettionForm.cs index 63fab2d..1875cda 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitSettionForm.cs @@ -15,7 +15,7 @@ /// <summary> /// 鍒楄〃鎺т欢 /// </summary> - private VerticalListControl listview = null; + private FrameListControl listview = null; /// <summary> /// 褰撳墠閫夋嫨鐨勭綉鍏� /// </summary> @@ -78,15 +78,19 @@ //娓呯┖bodyFrame this.ClearBodyFrame(); + var listBackControl = new VerticalFrameControl(); + listBackControl.Height = bodyFrameLayout.Height; + bodyFrameLayout.AddChidren(listBackControl); + //鍒濆鍖栨甯� var tableContr = new InformationEditorControl(); - this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 369, 1368); + this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 1368); //鍥剧墖 var btnPic = new DeviceInfoIconControl(); btnPic.Y = Application.GetRealHeight(92); btnPic.Gravity = Gravity.CenterHorizontal; - bodyFrameLayout.AddChidren(btnPic); + listBackControl.frameTable.AddChidren(btnPic); btnPic.InitControl(this.deviceAc); //璁惧澶囨敞 @@ -97,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) @@ -108,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; @@ -137,7 +141,7 @@ rowBeloneArea.AddBottomLine(); rowBeloneArea.SelectRoomEvent += (roomKeys) => { - Common.Room.CurrentRoom.ChangedRoom(deviceAc, roomKeys); + HdlRoomLogic.Current.ChangedRoom(deviceAc, roomKeys); }; //绌鸿皟妯″紡 @@ -167,12 +171,12 @@ { //涓嶈兘鍐嶇偣鍑� btnSwingSwitch.CanClick = false; - string statu = btnSwingSwitch.IsSelected == true ? "1" : "0"; + 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(() => @@ -190,20 +194,20 @@ }; //鍒濆鍖栨甯冨畬鎴� - tableContr.FinishInitControl(bodyFrameLayout, this.listview); + tableContr.FinishInitControl(); tableContr = null; //淇濆瓨 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; @@ -263,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) => { @@ -280,7 +296,7 @@ //杞崲涓轰簩杩涘埗 var value = Convert.ToString(data.AttriButeData, 2).PadLeft(16, '0'); //杩欎釜璁剧疆鏄斁鍦ㄥ悗闈㈢殑 - this.fixValue = value.Substring(0, value.Length - 15); + this.fixValue = value.Substring(0, value.Length - 1); this.swingMode = Convert.ToInt32(value.Substring(this.fixValue.Length)); } } -- Gitblit v1.8.0