From 3f6685c77beeb12baf840733fb890860f4c26e7c Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期四, 25 七月 2024 17:25:59 +0800 Subject: [PATCH] 2024年07月25日17:24:45 --- HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs | 41 +++++++++++++++++++++++++---------------- 1 files changed, 25 insertions(+), 16 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs index 1e6e44d..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; @@ -618,6 +620,10 @@ { try { +#if DEBUG + System.Threading.Thread.Sleep(200); +#endif + foreach (var sub in FunctionList.List.GetAcstSubList()) { if (subViewList.ContainsKey(sub.sid)) @@ -639,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