From e1a8f2f7e4d850beedeb1469610b878c1427e976 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 15 十二月 2021 09:01:53 +0800
Subject: [PATCH] 更新

---
 HDL_ON/UI/UI2/3-Intelligence/Scene/NewSceneMenuListPage.cs |  114 ++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 69 insertions(+), 45 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/NewSceneMenuListPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/NewSceneMenuListPage.cs
index 56b569f..efb7272 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/NewSceneMenuListPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/NewSceneMenuListPage.cs
@@ -63,46 +63,49 @@
             addSceneView.AddChidren(btnAddSceneText);
             #endregion
 
-            #region F3闃舵
+
+            if (DB_ResidenceData.Instance.GatewayType == 0) { }
+            else
+            {
+                #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);
+
+                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
+            }
+
             /*
-            #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);
-
-            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
-
-
             #region 鐢靛奖鍦烘櫙
             FrameLayout movieSceneView = new FrameLayout()
             {
@@ -140,7 +143,6 @@
             movieSceneView.AddChidren(btnMovieSceneText);
             #endregion
             */
-            #endregion
 
             LoadEventList();
         }
@@ -152,17 +154,19 @@
         void LoadEventList()
         {
             LoadEvent_SkipAddScenePage();
+            if (DB_ResidenceData.Instance.GatewayType != 0)
+            {
+                LoadEvent_SkipCatchScenePage();
+            }
         }
 
+        /// <summary>
+        /// 璺宠浆鍒涘缓鍦烘櫙鐣岄潰
+        /// </summary>
         void LoadEvent_SkipAddScenePage()
         {
             btnAddSceneBg.MouseUpEventHandler = (sender, e) =>
             {
-                //if (DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull())
-                //{
-                //    new PublicAssmebly().TipMsgAutoClose(Language.StringByID(StringId.UnableToCreateScenarioPleaseBindGateway), true);
-                //    return;
-                //}
                 Action backAction = () => {
                     this.RemoveFromParent();
                     action();
@@ -176,5 +180,25 @@
                 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;
+            };
+        }
     }
 }

--
Gitblit v1.8.0