From 52005ed57f3f7bc796fdd1a878e4f298a126f1e8 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 29 十月 2019 16:48:47 +0800
Subject: [PATCH] 2019.10.29-3
---
ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs | 52 ++++++++++++++++++++++++----------------------------
1 files changed, 24 insertions(+), 28 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs
index 1d9b16b..184c54c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs
@@ -170,18 +170,17 @@
{
//娓呯┖妗屽竷
this.frameTable.RemoveAll();
+
+ var listView = new VerticalFrameControl(29);
+ listView.Height = frameTable.Height;
+ frameTable.AddChidren(listView);
+
HdlThreadLogic.Current.RunMainInThread(() =>
{
- if (lookRoom.SceneUIList.Count == 0)
+ if (this.frameTable == null)
{
- //杩樻病鏈夋坊鍔犲満鏅摝
- this.ShowNotDataImage(frameTable, Language.StringByID(R.MyInternationalizationString.uDoNotHadAddScenceMsg));
return;
}
- var listView = new VerticalFrameControl(29);
- listView.Height = frameTable.Height;
- frameTable.AddChidren(listView);
-
foreach (var data in lookRoom.SceneUIList)
{
var frameContr = new FrameLayout();
@@ -208,30 +207,27 @@
//娓呯┖妗屽竷
this.frameTable.RemoveAll();
+ var frameBack = new FrameLayout();
+ frameBack.X = ControlCommonResourse.XXLeft;
+ frameBack.BackgroundColor = UserCenterColor.Current.White;
+ frameBack.Width = bodyFrameLayout.Width;
+ frameBack.Height = Application.GetRealHeight(1650);
+ frameBack.Radius = (uint)Application.GetMinRealAverage(20);
+ frameTable.AddChidren(frameBack);
+
+ var listView = new VerticalListControl(23);
+ listView.Y = Application.GetRealHeight(23);
+ listView.Height = Application.GetRealHeight(1549 - 23);
+ frameBack.AddChidren(listView);
+
HdlThreadLogic.Current.RunMainInThread(() =>
{
- //鑾峰彇鍒嗙粍鍚庣殑璁惧鍒楄〃
- var dicGroupDevice = this.GetAllGroupDevice();
- if (dicGroupDevice.Count == 0)
+ if (listView == null)
{
- //杩樻病鏈夋坊鍔犺澶囧摝
- this.ShowNotDataImage(frameTable, Language.StringByID(R.MyInternationalizationString.uDoNotHadAddDeviceMsg));
return;
}
-
- var frameBack = new FrameLayout();
- frameBack.X = ControlCommonResourse.XXLeft;
- frameBack.BackgroundColor = UserCenterColor.Current.White;
- frameBack.Width = bodyFrameLayout.Width;
- frameBack.Height = Application.GetRealHeight(1650);
- frameBack.Radius = (uint)Application.GetMinRealAverage(20);
- frameTable.AddChidren(frameBack);
-
- var listView = new VerticalListControl(23);
- listView.Y = Application.GetRealHeight(23);
- listView.Height = Application.GetRealHeight(1549 - 23);
- frameBack.AddChidren(listView);
-
+ //鑾峰彇鍒嗙粍鍚庣殑璁惧鍒楄〃
+ var dicGroupDevice = this.GetAllGroupDevice();
var dicData = new Dictionary<string, DeviceRowInfo>();
var listGwId = new List<string>();
foreach (var textId in dicGroupDevice.Keys)
@@ -374,7 +370,7 @@
/// <param name="dicData">浠ュ洖璺綔涓虹储寮曞幓鎸囧畾瀵硅薄</param>
private void StartCheckDeviceOnline(VerticalListControl listView, List<string> listGwId, Dictionary<string, DeviceRowInfo> dicData)
{
- HdlThreadLogic.Current.RunThread(() =>
+ HdlThreadLogic.Current.RunThread(async () =>
{
for (int i = 0; i < listGwId.Count; i++)
{
@@ -384,7 +380,7 @@
}
//杩欓噷涓昏鍙槸鑾峰彇鍦ㄧ嚎鐘舵��
var zbway = HdlGatewayLogic.Current.GetLocalGateway(listGwId[i]);
- var result = Common.LocalDevice.Current.GetDeviceListFromGateway(zbway, false, (device) =>
+ var result = await Common.LocalDevice.Current.GetDeviceListFromGateway(zbway, false, (device) =>
{
string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
if (listView.Parent == null)
--
Gitblit v1.8.0