From f703a411c0ebdf7ada490fda75b52fd839dae079 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 16 三月 2023 14:04:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-cqy(1.5.9)' into dev--wxr
---
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs | 31 ++++++++++++++++++++-----------
1 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs
index 8b7011b..f566630 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs
@@ -226,19 +226,25 @@
}
Application.RunOnMainThread(() =>
{
- AcstSubControlView view = null;
- basePage.subViewList.TryGetValue(temp.sid,out view);
- if (view != null)
+ try
{
- view.btnSubHumidityValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString()) + "%";
- view.btnSubTempValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_temp.ToString()) + "掳";
- view.btnSubPower.IsSelected = temp.GetAttrState(AcstSub_AttrEnum.on_off.ToString()) == "on";
+ AcstSubControlView view = null;
+ basePage.subViewList.TryGetValue(temp.sid, out view);
+ if (view != null)
+ {
+ view.btnSubHumidityValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString()) + "%";
+ view.btnSubTempValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_temp.ToString()) + "掳";
+ view.btnSubPower.IsSelected = temp.GetAttrState(AcstSub_AttrEnum.on_off.ToString()) == "on";
+ }
+ }
+ catch (Exception ex ) {
+ MainPage.Log($"绉戞妧绯荤粺鏇存柊寮傚父1:{ex.Message}");
}
});
}
catch (Exception ex)
{
- MainPage.Log("绉戞妧绯荤粺鏇存柊寮傚父11");
+ MainPage.Log($"绉戞妧绯荤粺鏇存柊寮傚父123:{ex.Message}");
}
}
@@ -643,11 +649,14 @@
AcstSubControlView subFunctionView = new AcstSubControlView(sub, subFunctionListView, imageFolder);
subViewList.Add(sub.sid, subFunctionView);
- new System.Threading.Thread(() =>
+ if (basePage != null)
{
- Control.Ins.SendReadCommand(sub);
- })
- { IsBackground = true }.Start();
+ new System.Threading.Thread(() =>
+ {
+ Control.Ins.SendReadCommand(sub);
+ })
+ { IsBackground = true }.Start();
+ }
subFunctionCount++;
});
--
Gitblit v1.8.0