mac
2024-07-25 3f6685c77beeb12baf840733fb890860f4c26e7c
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}");
            }
        }
@@ -590,7 +597,7 @@
            var btnTitleText2 = new Button()
            {
                X = btnCollection.Right,
                Text = "我的家庭",
                TextID = StringId.MyHome,
                TextSize = 16,
                TextColor = 0xFF242424,
                TextAlignment = TextAlignment.CenterLeft,
@@ -598,10 +605,6 @@
                Height = Application.GetRealHeight(54),
            };
            subTitleView.AddChidren(btnTitleText2);
            if(Language.CurrentLanguage != "Chinese")
            {
                btnTitleText2.Text = "My Home";
            }
            int subFunctionCount = 0;
@@ -617,6 +620,10 @@
            {
                try
                {
#if DEBUG
                    System.Threading.Thread.Sleep(200);
#endif
                    foreach (var sub in FunctionList.List.GetAcstSubList())
                    {
                        if (subViewList.ContainsKey(sub.sid))
@@ -638,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++;
                        });