wxr
2023-09-06 fdbcb1f7463cb766f90bd29dd715485ba9d88524
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -76,7 +76,7 @@
            #region top
            topView = new FrameLayout()
            {
                Height = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(74),
                BackgroundColor = CSS_Color.TopViewColor,
            };
            bodyView.AddChidren(topView);
@@ -122,7 +122,7 @@
                    btnSceneTilte = new Button()
                    {
                        Y = Application.GetRealHeight(30),
                        Y = Application.GetRealHeight(40),
                        //Width = Application.GetRealWidth(170),
                        Height = Application.GetRealHeight(25),
                        TextAlignment = TextAlignment.Center,
@@ -143,7 +143,7 @@
                {
                    btnAutomationTitle = new Button()
                    {
                        Y = Application.GetRealHeight(30),
                        Y = Application.GetRealHeight(40),
                        Gravity = Gravity.CenterHorizontal,
                        Height = Application.GetRealHeight(25),
                        TextAlignment = TextAlignment.Center,
@@ -162,7 +162,7 @@
                    btnSceneTilte = new Button()
                    {
                        Y = Application.GetRealHeight(30),
                        Y = Application.GetRealHeight(40),
                        Width = otherWidth,
                        Height = Application.GetRealHeight(25),
                        TextAlignment = TextAlignment.CenterRight,
@@ -178,7 +178,7 @@
                    btnSecurityTitle = new Button()
                    {
                        X = btnAutomationTitle.Right,
                        Y = Application.GetRealHeight(30),
                        Y = Application.GetRealHeight(40),
                        Width = otherWidth,
                        Height = Application.GetRealHeight(25),
                        TextAlignment = TextAlignment.CenterLeft,
@@ -193,7 +193,7 @@
                {
                    btnSceneTilte = new Button()
                    {
                        Y = Application.GetRealHeight(30),
                        Y = Application.GetRealHeight(40),
                        Width = Application.GetRealWidth(170),
                        Height = Application.GetRealHeight(25),
                        TextAlignment = TextAlignment.CenterRight,
@@ -208,7 +208,7 @@
                    btnAutomationTitle = new Button()
                    {
                        X = Application.GetRealWidth(209),
                        Y = Application.GetRealHeight(30),
                        Y = Application.GetRealHeight(40),
                        Width = Application.GetRealWidth(170),
                        Height = Application.GetRealHeight(25),
                        TextAlignment = TextAlignment.CenterLeft,
@@ -223,7 +223,7 @@
            btnAddIconBg = new Button()
            {
                X = Application.GetRealWidth(337),
                Y = Application.GetRealHeight(29),
                Y = Application.GetRealHeight(39),
                Width = Application.GetMinRealAverage(28),
                Height = Application.GetMinRealAverage(28),
                UnSelectedImagePath = "Public/AddIcon.png",
@@ -240,8 +240,8 @@
            contentPageView = new PageLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(667 - 64 - 49 + 30),
                Y = Application.GetRealHeight(74),
                Height = Application.GetRealHeight(667 - 74 - 49 + 30),
                BackgroundColor = CSS_Color.BackgroundColor,
                IsShowPoint = false
            };
@@ -399,36 +399,49 @@
                    var rowView = new FrameLayout();
                    new System.Threading.Thread(() =>
                    {
                        foreach (var scene in listScene)
                        try
                        {
                            if(scene == null)
                            foreach (var scene in listScene)
                            {
                                continue;
                                if (scene == null)
                                {
                                    continue;
                                }
                                if (scene.sceneType == SceneType.LightScene)
                                {
                                    continue;
                                }
                                System.Threading.Thread.Sleep(10);
                                Application.RunOnMainThread(() =>
                                {
                                    if (index % 2 == 0)
                                    {
                                        rowView = new FrameLayout()
                                        {
                                            Height = Application.GetRealWidth(122),
                                        };
                                        sceneFunctionView.AddChidren(rowView);
                                        sceneFunctionView.AddChidren(new Button()
                                        {
                                            Height = Application.GetRealHeight(7 + 7),
                                        });
                                    }
                                    var functionView_X = Application.GetRealWidth((16 + 164) * (index % 2) + 16);
                                    var functionView = LoadSceneFunctionDiv(functionView_X, scene);
                                    rowView.AddChidren(functionView);
                                    index++;
                                });
                            }
                            if(scene.sceneType == SceneType.LightScene)
                            {
                                continue;
                            }
                            System.Threading.Thread.Sleep(10);
                        }catch(Exception ex)
                        {
                            MainPage.Log($"加载场景列表异常:{ex.Message}");
                        }
                        finally
                        {
                            Application.RunOnMainThread(() =>
                            {
                                if (index % 2 == 0)
                                {
                                    rowView = new FrameLayout()
                                    {
                                        Height = Application.GetRealWidth(122),
                                    };
                                    sceneFunctionView.AddChidren(rowView);
                                    sceneFunctionView.AddChidren(new Button()
                                    {
                                        Height = Application.GetRealHeight(7 + 7),
                                    });
                                }
                                var functionView_X = Application.GetRealWidth((16 + 164) * (index % 2) + 16);
                                var functionView = LoadSceneFunctionDiv(functionView_X, scene);
                                rowView.AddChidren(functionView);
                                index++;
                                sceneFunctionView.AddChidren(new Button { Height = Application.GetRealHeight(30) });
                            });
                        }
                    })
@@ -439,8 +452,6 @@
            {
                MainPage.Log("homepage erorr : " + ex.Message);
            }
            sceneFunctionView.AddChidren(new Button { Height = Application.GetRealHeight(30) });
        }
        /// <summary>