wxr
2024-08-27 bfb3d0d4879dca8c59ff287c92f5113162f3a33a
OnPro/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
@@ -62,71 +62,14 @@
            this.titleId = titleId_out;
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            if (titleId == StringId.Lights)
            {
                Action action = () =>
                {
                    Action<Scene > refreshAction = (outScene) => {
                        if (outScene != null)
                        {
                            functionListView.AddChidren(new Button() { Height = Application.GetRealHeight(12) });
                            var sceneRow = new SceneControlZone(outScene);
                            functionListView.AddChidren(sceneRow);
                            sceneRow.LoadView();
                        }
                    };
                    var skipView = new AddLightScene(new List<Function>(), new Scene() { sceneType = SceneType.LightScene }, refreshAction);
                    MainPage.BasePageView.AddChidren(skipView);
                    skipView.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                };
                new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView_LightFunction(action);
            }
            else
            {
                new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
            }
#if DEBUG
            //Button testBtn = new Button()
            //{
            //    X = Application.GetRealWidth(80),
            //    Height = Application.GetRealHeight(64),
            //    BackgroundColor = 0xFFFF0000
            //};
            //bodyView.AddChidren(testBtn);
            //int ddd = 0;
            //testBtn.MouseUpEventHandler = (sender, e) => {
            //    ddd++;
            //        Function function_online = FunctionList.List.GetLightList().Find((obj) => obj.sid == "0001017DB92D2602020100010101");
            //    if (ddd % 2 == 0)
            //    {
            //        function_online.online = true;
            //    }
            //    else
            //    {
            //        function_online.online = false;
            //    }
            //    HomePage.LoadEvent_RefreshDevcieOnline(function_online);
            //    FunctionPage.UpdataOnline(function_online);
            //    RoomPage.UpdataOnline(function_online);
            //};
#endif
            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
            /// <summary>
            /// 房间内容显示区域
            /// </summary>
            var roomFloorChangeView = new FrameLayout()
            {
                Y = Application.GetRealHeight(64),
                Y = Application.GetRealHeight(74),
                Height = Application.GetRealHeight(52),
            };
            bodyView.AddChidren(roomFloorChangeView);