From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 28 二月 2020 15:25:13 +0800 Subject: [PATCH] 2020.2.28 --- ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitListForm.cs | 65 ++++++++++++++++++-------------- 1 files changed, 37 insertions(+), 28 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitListForm.cs index bdfa99d..d992a9e 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitListForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitListForm.cs @@ -113,7 +113,7 @@ rowInfo.btnIcon = btnIcon; //璁惧鍚嶇О - var btnDeviceName = new NormalViewControl(400, 60, true); + var btnDeviceName = new NormalViewControl(700, 60, true); btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device); btnDeviceName.X = Application.GetRealWidth(193); btnDeviceName.Y = Application.GetRealHeight(45); @@ -211,7 +211,7 @@ { for (int i = 0; i < listDevice.Count; i++) { - if (i != 0 && i % 5 == 0) + if (i != 0 && i % 3 == 0) { //璇诲彇5涓悗锛岄棿闅斾竴娈垫椂闂� System.Threading.Thread.Sleep(200); @@ -253,27 +253,30 @@ var data = device.DeviceStatusReport.AttriBute[i]; if (data.AttributeId == 0) { - //瀹ゅ唴娓╁害 - if (data.AttriButeData == 0) + HdlThreadLogic.Current.RunMain(() => { - //0鈩� - rowInfo.btnValue.Text = "0.0鈩�"; - } - else if (data.AttriButeData > 32767) - { - //璐熸暟(鐗规畩澶勭悊) - string strValue = (data.AttriButeData - 65536).ToString(); - //灏忔暟鐐归渶瑕佷竴浣� - strValue = strValue.Substring(0, strValue.Length - 1); - rowInfo.btnValue.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�"; - } - else - { - //灏忔暟鐐归渶瑕佷竴浣� - string strValue = data.AttriButeData.ToString(); - strValue = strValue.Substring(0, strValue.Length - 1); - rowInfo.btnValue.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�"; - } + //瀹ゅ唴娓╁害 + if (data.AttriButeData == 0) + { + //0鈩� + rowInfo.btnValue.Text = "0.0鈩�"; + } + else if (data.AttriButeData > 32767) + { + //璐熸暟(鐗规畩澶勭悊) + string strValue = (data.AttriButeData - 65536).ToString(); + //灏忔暟鐐归渶瑕佷竴浣� + strValue = strValue.Substring(0, strValue.Length - 1); + rowInfo.btnValue.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�"; + } + else + { + //灏忔暟鐐归渶瑕佷竴浣� + string strValue = data.AttriButeData.ToString(); + strValue = strValue.Substring(0, strValue.Length - 1); + rowInfo.btnValue.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�"; + } + }); } else if (data.AttributeId == 28) { @@ -281,9 +284,12 @@ //Off = 0 Auto = 1 Cool = 3 Heat = 4 FanOnly = 7 Dry = 8 if (data.AttriButeData != 0) { - rowInfo.btnSwitch.IsSelected = true; - rowInfo.btnIcon.IsSelected = true; - rowInfo.btnIconBack.BackgroundColor = 0xfffef1ed; + HdlThreadLogic.Current.RunMain(() => + { + rowInfo.btnSwitch.IsSelected = true; + rowInfo.btnIcon.IsSelected = true; + rowInfo.btnIconBack.BackgroundColor = 0xfffef1ed; + }); } } else if (data.AttributeId == 4097) @@ -291,9 +297,12 @@ //42:闇�瑕佹竻娲楁护缃� if (data.AttriButeData == 42) { - rowInfo.btnWarningIcon.Visible = true; - //璇锋敞鎰忔竻娲楁护缃戝摝 - rowInfo.btnWarningMsg.TextID = R.MyInternationalizationString.uPleaseClreanACfilter; + HdlThreadLogic.Current.RunMain(() => + { + rowInfo.btnWarningIcon.Visible = true; + //璇锋敞鎰忔竻娲楁护缃戝摝 + rowInfo.btnWarningMsg.TextID = R.MyInternationalizationString.uPleaseClreanACfilter; + }); } } } -- Gitblit v1.8.0