wxr
2024-08-27 bfb3d0d4879dca8c59ff287c92f5113162f3a33a
OnPro/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -145,7 +145,7 @@
        public void LoadPage()
        {
            MainPage.CurPageIndex = 0;
            //MainPage.BaseTopButton.BackgroundColor = 0xFFA09C98;
            try
@@ -333,8 +333,6 @@
                environmentalView.AddChidren(btnPm25Values);
                #endregion
                #region msg
                FrameLayout msgView;
                msgView = new FrameLayout()
@@ -394,9 +392,6 @@
                #endregion
                #region 功能场景切换
                bodyView.AddChidren(new Button() { Height = Application.GetRealHeight(20), BackgroundColor = 0x00000000 });
@@ -442,7 +437,7 @@
            {
                contentView = new PageLayout()
                {
                    Height = Application.GetRealHeight(310 + 30 + 10 + 100), //20为超出部分
                    Height = Application.GetRealHeight(310 + 30 + 10), //20为超出部分
                    IsShowPoint = false,
                };
                bodyView.AddChidren(contentView);
@@ -468,7 +463,7 @@
                    TextSize = CSS_FontSize.HeadlineFontSize,
                    TextAlignment = TextAlignment.Center,
                    IsSelected = true,
                    //IsBold = true,
                    IsBold = true,
                };
                changeView.AddChidren(btnChangeFunction);
@@ -499,11 +494,10 @@
                {
                    btnChangeFunction.IsSelected = true;
                    btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize;
                    btnChangeFunction.IsBold = true;
                    btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize;
                    btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize;
                    btnChangeScene.IsSelected = false;
                    btnChangeScene.IsBold = false;
                    CurShowTypeContent = 0;
                    contentView.PageIndex = 0;
                };
@@ -511,11 +505,10 @@
                btnChangeScene.MouseUpEventHandler = (sender, e) =>
                {
                    btnChangeScene.IsSelected = true;
                    btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize;
                    btnChangeScene.IsBold = true;
                    btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize;
                    btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize;
                    btnChangeFunction.IsSelected = false;
                    btnChangeFunction.IsBold = false;
                    CurShowTypeContent = 1;
                    contentView.PageIndex = 1;
                };
@@ -526,19 +519,15 @@
                    {
                        btnChangeFunction.IsSelected = true;
                        btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize;
                        btnChangeFunction.IsBold = true;
                        btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize;
                        btnChangeScene.IsSelected = false;
                        btnChangeScene.IsBold = false;
                    }
                    else if (contentView.PageIndex == 1)
                    {
                        btnChangeScene.IsSelected = true;
                        btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize;
                        btnChangeScene.IsBold = true;
                        btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize;
                        btnChangeFunction.IsSelected = false;
                        btnChangeFunction.IsBold = false;
                    }
                };
@@ -758,12 +747,13 @@
                        Width = Application.GetRealWidth(164),
                        Height = Application.GetRealWidth(122),
                        Tag = scene.sid,
                        BackgroundImagePath = scene.ImagePath,
                        Radius = (uint)Application.GetRealWidth(12),
                        BorderColor = 0x00000000,
                        BorderWidth = 1,
                    };
                    rowView.AddChidren(functionView);
                    //2020-12-03 修改图片加载方法
                    ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, functionView);
                    LoadSceneFunctionDiv( functionView, scene);
                    index++;
@@ -965,19 +955,7 @@
                btnIcon.MouseUpEventHandler = skipControlPageEvent;
                btnState.MouseUpEventHandler = skipControlPageEvent;
                var btnOffline = new Button()
                {
                    X = btnIcon.Right,
                    Y = Application.GetRealWidth(16),
                    Height = Application.GetMinRealAverage(32),
                    TextID = StringId.DeviceOffline,
                    TextColor = CSS_Color.WarningColor,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                    TextAlignment = TextAlignment.CenterLeft,
                    Tag = "OnlineTag",
                    Visible = !function.isOnline()
                };
                view.AddChidren(btnOffline);
            }
            catch (Exception ex)
@@ -993,9 +971,21 @@
        {
            try
            {
                var btnSceneGg = new ImageView()
                {
                    Radius = (uint)Application.GetRealWidth(12),
                    BorderColor = 0x00000000,
                    BorderWidth = 1,
                };
                view.AddChidren(btnSceneGg);
                ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, btnSceneGg);
                Button btnCoverd = new Button()
                {
                    UnSelectedImagePath = "Collection/SceneCovered.png",
                    //UnSelectedImagePath = "Collection/SceneCovered.png",
                    Radius = (uint)Application.GetRealWidth(12),
                    BackgroundColor = 0x44000000,
                };
                view.AddChidren(btnCoverd);
@@ -1087,9 +1077,8 @@
                    {
                        btnName.Text = scene.name;
                        btnZone.Text = scene.GetRoomListName();
                        //view.BackgroundImagePath = (scene as Scene).ImagePath;
                        //2020-12-03 修改图片加载方法
                        ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, view);
                        ImageUtlis.Current.LoadLocalOrNetworkImages(scene.ImagePath, btnSceneGg);
                    };
                    var aep = new SceneEditPage(scene, backAction);
                    MainPage.BasePageView.AddChidren(aep);