From 2763663f356b784404bcf81e873d1d24c10002be Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 16 十二月 2020 20:39:31 +0800
Subject: [PATCH] 2020-12-16 1.增加是否允许创建场景参数获取和判断

---
 HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs |   15 ++++++++++++++-
 HDL_ON/DAL/Server/HttpServerRequest.cs           |    1 +
 .vs/HDL_APP_Project/xs/UserPrefs.xml             |   23 ++++++++++-------------
 HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs    |    8 ++++++++
 4 files changed, 33 insertions(+), 14 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index f3053ee..0bef466 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,13 +1,8 @@
-锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
+锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
   <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs">
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/Server/HttpServerRequest.cs">
     <Files>
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs" Line="68" Column="53" IsPinned="True" />
-      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" Line="1" Column="1" />
-      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs" Line="1" Column="1" />
-      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionPage.cs" Line="1" Column="1" />
-      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs" Line="227" Column="38" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs" Line="128" Column="55" />
+      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="131" Column="27" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
@@ -17,10 +12,11 @@
               <Node name="Common" expanded="True" />
               <Node name="DAL" expanded="True">
                 <Node name="DriverLayer" expanded="True" />
-                <Node name="Server" expanded="True" />
+                <Node name="Server" expanded="True">
+                  <Node name="HttpServerRequest.cs" selected="True" />
+                </Node>
               </Node>
               <Node name="Entity" expanded="True">
-                <Node name="Function" expanded="True" />
                 <Node name="ResponseEntity" expanded="True" />
               </Node>
               <Node name="UI" expanded="True">
@@ -34,13 +30,14 @@
                   </Node>
                   <Node name="FuntionControlView" expanded="True">
                     <Node name="AC" expanded="True" />
-                    <Node name="Curtain" expanded="True">
-                      <Node name="MotorCurtainPage.cs" selected="True" />
-                    </Node>
+                    <Node name="Curtain" expanded="True" />
                     <Node name="Electrical" expanded="True" />
                     <Node name="EnvironmentalScience" expanded="True" />
                     <Node name="FoolHeating" expanded="True" />
                     <Node name="Light" expanded="True" />
+                    <Node name="Music" expanded="True">
+                      <Node name="View" expanded="True" />
+                    </Node>
                   </Node>
                 </Node>
               </Node>
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index e1ae4da..e54428c 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -503,6 +503,7 @@
                             homeRegionName = mHome.homeRegionName,
                             homeRegionId = mHome.homeRegionId,
                             Address = mHome.homeAddress,
+                            isAllowCreateScene = mHome.isAllowCreateScene,
                         };
                         UserInfo.Current.regionList.Add(home);
                     }
diff --git a/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs b/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
index 7c4961b..1b984d7 100644
--- a/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
+++ b/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
@@ -118,6 +118,10 @@
         /// 浣忓畢鍖哄煙鍚嶅瓧
         /// </summary>
         public string homeRegionName;
+        /// <summary>
+        /// 鏄惁鍏佽鍒涘缓鍦烘櫙
+        /// </summary>
+        public bool isAllowCreateScene;
         ///// <summary>
         ///// 鏄惁缁戝畾缃戝叧
         ///// </summary>
@@ -199,5 +203,9 @@
         /// 浣忓畢鍦板潃
         /// </summary>
         public string homeAddress;
+        /// <summary>
+        /// 鏄惁鍏佽鍒涘缓鍦烘櫙
+        /// </summary>
+        public bool isAllowCreateScene;
     }
 }
diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
index 7ce72e0..82b0d2e 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -69,7 +69,8 @@
             };
             bodyView.AddChidren(topView);
 
-            if (DB_ResidenceData.Instance.GatewayType == 0)
+            //涓嶆槸A缃戝叧鎴栬�呮槸鎴愬憳 鍙厑璁告坊鍔犲満鏅殣钘忚嚜鍔ㄥ寲
+            if (DB_ResidenceData.Instance.GatewayType != 1 || DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
             {
                 btnSceneTilte = new Button()
                 {
@@ -485,6 +486,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