xm
2021-12-01 6d73bf6e816570291865674bef8bce8972e4de3f
HDL_ON/UI/UI2/3-Intelligence/Scene/NewSceneMenuListPage.cs
@@ -1,4 +1,5 @@
using System;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI
@@ -62,44 +63,49 @@
            addSceneView.AddChidren(btnAddSceneText);
            #endregion
            #region 捕获场景
            FrameLayout catchSceneView = new FrameLayout()
            if (DB_ResidenceData.Instance.GatewayType == 0) { }
            else
            {
                Gravity = Gravity.CenterHorizontal,
                Y =addSceneView.Bottom,//+ Application.GetRealWidth(10),
                Width = Application.GetRealWidth(361),
                Height = Application.GetRealWidth(202),
                Radius = (uint)Application.GetRealWidth(12),
            };
            bodyView.AddChidren(catchSceneView);
                #region 捕获场景
                FrameLayout catchSceneView = new FrameLayout()
                {
                    Gravity = Gravity.CenterHorizontal,
                    Y = addSceneView.Bottom,//+ Application.GetRealWidth(10),
                    Width = Application.GetRealWidth(361),
                    Height = Application.GetRealWidth(202),
                    Radius = (uint)Application.GetRealWidth(12),
                };
                bodyView.AddChidren(catchSceneView);
            ImageView catchSceneImageView = new ImageView()
            {
                Gravity = Gravity.CenterHorizontal,
                Radius = (uint)Application.GetRealWidth(12),
                ImagePath = "Intelligence/CreateScene2Bg.png",
            };
            catchSceneView.AddChidren(catchSceneImageView);
                ImageView catchSceneImageView = new ImageView()
                {
                    Gravity = Gravity.CenterHorizontal,
                    Radius = (uint)Application.GetRealWidth(12),
                    ImagePath = "Intelligence/CreateScene2Bg.png",
                };
                catchSceneView.AddChidren(catchSceneImageView);
            btnCatchSceneBg = new Button()
            {
                Radius = (uint)Application.GetRealWidth(12),
            };
            catchSceneView.AddChidren(btnCatchSceneBg);
                btnCatchSceneBg = new Button()
                {
                    Radius = (uint)Application.GetRealWidth(12),
                };
                catchSceneView.AddChidren(btnCatchSceneBg);
            Button btnCatchSceneText = new Button()
            {
                Y = Application.GetRealWidth(126),
                Height = Application.GetRealWidth(68),
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = CSS_FontSize.EmphasisFontSize_Secondary,
                TextAlignment = TextAlignment.Center,
                TextID = StringId.CatchScene,
            };
            catchSceneView.AddChidren(btnCatchSceneText);
            #endregion
                Button btnCatchSceneText = new Button()
                {
                    Y = Application.GetRealWidth(126),
                    Height = Application.GetRealWidth(68),
                    TextColor = CSS_Color.MainBackgroundColor,
                    TextSize = CSS_FontSize.EmphasisFontSize_Secondary,
                    TextAlignment = TextAlignment.Center,
                    TextID = StringId.CatchScene,
                };
                catchSceneView.AddChidren(btnCatchSceneText);
                #endregion
            }
            /*
            #region 电影场景
            FrameLayout movieSceneView = new FrameLayout()
            {
@@ -136,7 +142,7 @@
            };
            movieSceneView.AddChidren(btnMovieSceneText);
            #endregion
            */
            LoadEventList();
        }
@@ -148,8 +154,15 @@
        void LoadEventList()
        {
            LoadEvent_SkipAddScenePage();
            if (DB_ResidenceData.Instance.GatewayType != 0)
            {
                LoadEvent_SkipCatchScenePage();
            }
        }
        /// <summary>
        /// 跳转创建场景界面
        /// </summary>
        void LoadEvent_SkipAddScenePage()
        {
            btnAddSceneBg.MouseUpEventHandler = (sender, e) =>
@@ -158,12 +171,32 @@
                    this.RemoveFromParent();
                    action();
                };
                var scene = new Entity.Scene() { roomIds = new System.Collections.Generic.List<string>() { "" } };
                var scene = new Scene() { roomIds = new System.Collections.Generic.List<string>() { "" } };
                scene.NewSid();
                scene.name = Language.StringByID(StringId.Scene) + " " + (1 + Entity.DB_ResidenceData.functionList.scenes.Count).ToString();
                var aep = new SceneEditPage(scene,backAction);
                scene.name = Language.StringByID(StringId.Scene) + " " + (1 + FunctionList.List.scenes.Count).ToString();
                var aep = new SceneAddPage(scene,backAction);
                MainPage.BasePageView.AddChidren(aep);
                aep.LoadPage(StringId.NewScene);
                aep.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
        }
        /// <summary>
        /// 跳转捕获场景界面
        /// </summary>
        void LoadEvent_SkipCatchScenePage()
        {
            btnCatchSceneBg.MouseUpEventHandler = (sener, e) => {
                Action backAction = () => {
                    this.RemoveFromParent();
                    action();
                };
                var scene = new Scene() { roomIds = new System.Collections.Generic.List<string>() { "" } };
                scene.NewSid();
                scene.name = Language.StringByID(StringId.Scene) + " " + (1 + FunctionList.List.scenes.Count).ToString();
                var aep = new CatchSceneAddPage(scene, backAction);
                MainPage.BasePageView.AddChidren(aep);
                aep.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
        }