From 452e8cef1c740d18ee398be6971d9952e41dbd4a Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 12 四月 2023 16:11:50 +0800
Subject: [PATCH] 1
---
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs | 37 +++++++++++++++++++++----------------
1 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs
index 8b7011b..97c577b 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}");
}
}
@@ -591,7 +597,7 @@
var btnTitleText2 = new Button()
{
X = btnCollection.Right,
- Text = "鎴戠殑瀹跺涵",
+ TextID = StringId.MyHome,
TextSize = 16,
TextColor = 0xFF242424,
TextAlignment = TextAlignment.CenterLeft,
@@ -599,10 +605,6 @@
Height = Application.GetRealHeight(54),
};
subTitleView.AddChidren(btnTitleText2);
- if(Language.CurrentLanguage != "Chinese")
- {
- btnTitleText2.Text = "My Home";
- }
int subFunctionCount = 0;
@@ -643,11 +645,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