From bbfd7bd230204cca3056740412e9f3562459fc17 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期五, 31 三月 2023 19:12:38 +0800
Subject: [PATCH] 2023年03月31日19:12:15
---
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs | 36 +++++++++++++++++++++++++-----------
1 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs
index dd2b028..f566630 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs
@@ -104,7 +104,7 @@
}
this.function = FunctionList.List.GetAcstParentList()[0];
this.BackgroundColor = CSS.CSS_Color.BackgroundColor;
- this.AddChidren(new Button() { Height = Application.GetRealHeight(50), BackgroundColor = curColor });
+ //this.AddChidren(new Button() { Height = Application.GetRealHeight(50), BackgroundColor = curColor });
contentView = new VerticalScrolViewLayout() {
Height = Application.GetRealHeight(667 - 56),
};
@@ -226,18 +226,25 @@
}
Application.RunOnMainThread(() =>
{
- var view = basePage.subViewList[temp.sid];
- 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}");
}
}
@@ -617,6 +624,10 @@
{
try
{
+#if DEBUG
+ System.Threading.Thread.Sleep(200);
+#endif
+
foreach (var sub in FunctionList.List.GetAcstSubList())
{
if (subViewList.ContainsKey(sub.sid))
@@ -638,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