From d53f7315de145266e6465d9f95d11d1712b9a91b Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 18 十二月 2020 20:55:28 +0800
Subject: [PATCH] 20201218-6

---
 HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs |   38 ++++++++++++++++++++++++++++++--------
 1 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
old mode 100644
new mode 100755
index bc0a665..8ac9bfb
--- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -69,7 +69,10 @@
             };
             bodyView.AddChidren(topView);
 
-            if (DB_ResidenceData.Instance.GatewayType == 0)
+            //涓嶆槸A缃戝叧鎴栬�呮槸鎴愬憳 鍙厑璁告坊鍔犲満鏅殣钘忚嚜鍔ㄥ寲
+            var HideAutoPage = DB_ResidenceData.Instance.GatewayType != 1 || DB_ResidenceData.Instance.CurrentRegion.IsOthreShare;
+            //鍒ゆ柇鏄惁闇�瑕侀殣钘忚嚜鍔ㄥ寲
+            if (HideAutoPage)
             {
                 btnSceneTilte = new Button()
                 {
@@ -85,7 +88,6 @@
                 };
                 topView.AddChidren(btnSceneTilte);
                 btnAutomationTitle = new Button();
-
             }
             else
             {
@@ -147,7 +149,11 @@
             bodyView.AddChidren(contentPageView);
 
             LoadScenePageView();
-            LoadAutomationPageView();
+            //鍒ゆ柇鏄惁闇�瑕侀殣钘忚嚜鍔ㄥ寲
+            if (!HideAutoPage)
+            {
+                LoadAutomationPageView();
+            }
             LoadEventList();
 
         }
@@ -200,7 +206,7 @@
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                 TextAlignment = TextAlignment.CenterLeft,
-                Text = DB_ResidenceData.Instance.CurFoor,
+                Text = DB_ResidenceData.Instance.CurFloor.roomName,
             };
             floorChangeView.AddChidren(btnFloor);
 
@@ -361,10 +367,15 @@
                     SelectedImagePath = "Collection/CollectionIcon.png",
                     IsSelected = scene.collect,
                 };
-                view.AddChidren(btnCollection);
+                //view.AddChidren(btnCollection);
+                //2020-12-16 濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳�
+                if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
+                {
+                    view.AddChidren(btnCollection);
+                }
                 btnCollection.MouseUpEventHandler = (sender, e) => {
                     scene.collect = btnCollection.IsSelected = !btnCollection.IsSelected;
-                    scene.SaveSceneData(true);
+                    scene.CollectScene();
                 };
                 LoadEvent_ControlScene(btnCoverd,btnName,btnZone, scene);
                 btnSettingIcon.MouseUpEventHandler = (sender, e) => {
@@ -374,13 +385,12 @@
                     Action refreshAction = () => {
                         btnName.Text = scene.name;
                         btnZone.Text = scene.GetRoomListName();
-                        //view.BackgroundImagePath = scene.ImagePath;
                         //2020-12-03 淇敼鍥剧墖鍔犺浇鏂规硶
                         ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, view);
                     };
                     var aep = new SceneEditPage(scene, backAction);
                     MainPage.BasePageView.AddChidren(aep);
-                    aep.LoadPage(StringId.EditScene, refreshAction);
+                    aep.LoadPage(refreshAction);
                     MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                 };
             }
@@ -481,6 +491,18 @@
             {
                 if (!btnAutomationTitle.IsSelected)
                 {
+                    //濡傛灉鏄垚鍛�
+                    if (DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
+                    {
+                        //濡傛灉娌℃湁鍦烘櫙鏉冮檺
+                        if (!DB_ResidenceData.Instance.CurrentRegion.isAllowCreateScene)
+                        {
+                            //鎻愮ず娌℃湁鍦烘櫙鐨勫垱寤烘潈闄�
+                            Utlis.ShowTip(Language.StringByID(StringId.PermissionDenied));
+                            return;
+                        }
+                    }
+
                     Action action = () =>
                     {
                         LoadSceneFunctionControlZone();

--
Gitblit v1.8.0