From 94d6591af7870ba0f1f7797310c07581d6fcd0b4 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期五, 04 十一月 2022 16:27:14 +0800
Subject: [PATCH] 2022年11月04日16:26:44

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs             |    2 
 HDL-ON_iOS/Resources/Language.ini                              |    2 +
 HDL_ON/Entity/Function/Function.cs                             |    5 ++
 HDL-ON_Android/Assets/Language.ini                             |    2 +
 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs         |   49 ++++++++++++++++++------
 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs |    6 +++
 HDL_ON/Common/R.cs                                             |    6 ++
 HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs |    3 +
 8 files changed, 60 insertions(+), 15 deletions(-)

diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index f8cbefa..f171a66 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1108,6 +1108,7 @@
 7161=Warning tone
 7162=Face to open the door
 7163=Video call
+7164=Manipulator
 
 
 
@@ -2317,6 +2318,7 @@
 7161=鎻愮ず闊�
 7162=浜鸿劯寮�闂�
 7163=瑙嗛閫氳瘽鍛煎彨
+7164=鏈烘鎵�
 
 
  
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index f8cbefa..f171a66 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1108,6 +1108,7 @@
 7161=Warning tone
 7162=Face to open the door
 7163=Video call
+7164=Manipulator
 
 
 
@@ -2317,6 +2318,7 @@
 7161=鎻愮ず闊�
 7162=浜鸿劯寮�闂�
 7163=瑙嗛閫氳瘽鍛煎彨
+7164=鏈烘鎵�
 
 
  
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index be3e98e..cff6cb8 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -3001,7 +3001,11 @@
         /// <summary>
         /// 瑙嗛閫氳瘽鍛煎彨
         /// </summary>
-        public const int shipintonghuahujiao = 7163; 
+        public const int shipintonghuahujiao = 7163;
+        /// <summary>
+        /// 鏈烘鎵�
+        /// </summary>
+        public const int jixieshou = 7164;
 
 
 
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 3f7a233..961046d 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -1321,7 +1321,10 @@
         /// 閫氱敤寮�鍏�
         /// </summary>
         public const string OtherCommon = "other.common";
-
+        /// <summary>
+        /// 鏈烘鎵�
+        /// </summary>
+        public const string MechanicalArm = "electrical.mechanical_arm";
         /// <summary>
         /// 绌鸿皟绉戞妧绯荤粺锛堢豢寤猴級
         /// 鎬绘帶
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
index 8564f29..00c2315 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -30,7 +30,7 @@
             VerticalScrolViewLayout vv = new VerticalScrolViewLayout
             {
                 Y = funAllAreaView.frameLayout.Bottom,
-                Height = Application.GetRealHeight(667 - 64 - 50 * funCount - 8),
+                Height = Application.GetRealHeight(667 - 64 - 50 * funCount - 8-50),
             };
             viewLayout.AddChidren(vv);
             if (!MainView.IsGatewayType)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 5953a75..ae6c83a 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -922,11 +922,14 @@
                             //鍖哄埆涓嶅悓璁惧锛屾樉绀轰笉鍚岃澶囩姸鎬�
                             switch (device.spk)
                             {
+                               
                                 case SPK.AirSwitch:
                                 case SPK.LightSwitch:
                                 //鎻掑骇
                                 case SPK.PanelSocket:
                                 case SPK.ElectricSocket:
+                                //鏈烘鎵�
+                                case SPK.MechanicalArm:
                                     {//寮�鍏�
 
                                         foreach (var dic in dicList)
@@ -1435,6 +1438,8 @@
                 //寮�鍏崇伅鍏�
                 case SPK.AirSwitch:
                 case SPK.LightSwitch:
+                    //鏈烘鎵�
+                case SPK.MechanicalArm:
                     {
                         foreach (var dic in dicList)
                         {
@@ -2189,6 +2194,7 @@
                             //鍖哄埆涓嶅悓璁惧锛屾樉绀轰笉鍚岃澶囩姸鎬�
                             switch (device.spk)
                             {
+                                case SPK.MechanicalArm:
                                 case SPK.AirSwitch:
                                 case SPK.LightSwitch:
                                     {//寮�鍏崇伅
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index e17db27..659975d 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -11,7 +11,7 @@
         /// <summary>
         /// 瀹氫箟涓�涓潤鎬佸璞�
         /// </summary> 
-        private static LogicMethod s_Current = null;   
+        private static LogicMethod s_Current = null;
         /// <summary>
         /// 鑾峰彇闈欐�佸璞�
         /// </summary>
@@ -147,9 +147,9 @@
         /// <returns></returns>
         public List<HDL_ON.Entity.Room> GetGatewayRoomList()
         {
-            return   HDL_ON.Entity.SpatialInfo.CurrentSpatial.RoomList;
+            return HDL_ON.Entity.SpatialInfo.CurrentSpatial.RoomList;
 
-            
+
         }
         /// <summary>
         /// 鑾峰彇缃戝叧鎴块棿鍒楄〃
@@ -187,7 +187,7 @@
             var list2 = this.GetVideoDeviceList();
             list.AddRange(list1);
             list.AddRange(list2);
-            GetTestDevice(ref list, true);
+            this.GetTestDevice(ref list, false);
             return list;
         }
         /// <summary>
@@ -197,15 +197,17 @@
         public List<HDL_ON.Entity.Function> GetVideoDeviceList()
         {
             var functionList = new List<Function>();
-            foreach (var videoDevice in FunctionList.List.videoIntercom) {
+            foreach (var videoDevice in FunctionList.List.videoIntercom)
+            {
                 Function function = new Function();
                 function.spk = videoDevice.spk;
                 function.name = videoDevice.deviceName;
                 function.deviceId = videoDevice.deviceId;
-                function.online = videoDevice.status== "online";
+                function.online = videoDevice.status == "online";
                 function.sid = videoDevice.sid;
                 var video = functionList.Find((o) => o.deviceId == function.deviceId);
-                if (video == null) {
+                if (video == null)
+                {
                     functionList.Add(function);
                 }
 
@@ -352,6 +354,11 @@
             string strPath = "";
             switch (functionType)
             {
+                case SPK.MechanicalArm:
+                    {
+                        strPath = "LogicIcon/lightloguc.png";
+                    }
+                    break;
                 case SPK.doorgate:
                     {
                         strPath = "VideoIcon/keshiduijiang.png";
@@ -456,6 +463,7 @@
         {
             List<string> deviceStrTypeList = new List<string>();
             deviceStrTypeList.Clear();
+           
             ///鐏厜绫�
             var lightjosn = deviceList.Find((device) =>
             device.spk == SPK.LightSwitch
@@ -553,6 +561,13 @@
             {
                 deviceStrTypeList.Add(Language.StringByID(StringId.VideoIntercom));
             }
+            ///鏈烘鎵嬬被
+            var MechanicalArm = deviceList.Find((device) =>
+            device.spk == SPK.MechanicalArm);
+            if (MechanicalArm != null)
+            {
+                deviceStrTypeList.Add(Language.StringByID(StringId.jixieshou));
+            }
             return deviceStrTypeList;
 
         }
@@ -564,6 +579,7 @@
         public List<string> GetDeviceTypeFunctionList(string deviceType)
         {
             List<string> functionTypeList = new List<string>();
+          
             ///鐏厜绫�
             if (deviceType == Language.StringByID(StringId.Lights))
             {
@@ -650,6 +666,10 @@
             else if (deviceType == Language.StringByID(StringId.VideoIntercom))
             {
                 functionTypeList.Add(SPK.doorgate);
+            }  ///鏈烘鎵嬬被
+            else  if (deviceType == Language.StringByID(StringId.jixieshou))
+            {
+                functionTypeList.Add(SPK.MechanicalArm);
             }
             else
             {
@@ -702,6 +722,7 @@
                 functionTypeList.Add(SPK.MusicStandard);
                 functionTypeList.Add(SPK.AvMusic);
                 functionTypeList.Add(SPK.doorgate);
+                functionTypeList.Add(SPK.MechanicalArm);
 
             }
 
@@ -757,7 +778,7 @@
                         deviceTypeList.Add(SPK.HvacCac);
                         deviceTypeList.Add(SPK.SensorHelp);
                         deviceTypeList.Add(SPK.DoorLock);
-                        deviceTypeList.Add(SPK.doorgate); 
+                        deviceTypeList.Add(SPK.doorgate);
 
                     }
                     break;
@@ -780,6 +801,7 @@
                         deviceTypeList.Add(SPK.CurtainDream);
                         deviceTypeList.Add(SPK.MusicStandard);
                         deviceTypeList.Add(SPK.AvMusic);
+                        deviceTypeList.Add(SPK.MechanicalArm);
                     }
                     break;
             }
@@ -816,11 +838,11 @@
         /// <returns></returns>
         public List<Entity.Function> GetFunctionDeviceList(Entity.Room room, string str)
         {
-            List<string> functionTypeList = GetSupportEquipment(str);
+            List<string> functionTypeList = this.GetSupportEquipment(str);
             //杩斿洖鎴块棿璁惧鍒楄〃
-            var roomDeviceList = GetRoomDevice(room);
+            var roomDeviceList = this.GetRoomDevice(room);
             //杩斿洖鏈�缁堟敮鎸佹樉绀哄嚭鏉ョ殑璁惧鍒楄〃
-            var list = GetShowDeviceList(functionTypeList, roomDeviceList);
+            var list =this.GetShowDeviceList(functionTypeList, roomDeviceList);
             return list;
         }
         /// <summary>
@@ -1044,7 +1066,7 @@
                             //瀹氫箟涓�涓眬閮ㄥ彉閲�
                             string direction = string.Empty;
                             //涓ょ偣璺濈灏忎簬閰嶇疆璺濈<鏃㈣嚜鍔ㄥ寲閰嶇疆杈撳叆鏉′欢鍦扮悊鍥存爮鍗婂緞>,璇存槑杩涘叆鍖哄煙
-                            if (r*1000< radius)
+                            if (r * 1000 < radius)
                             {
                                 //鍒拌揪鏌愬湴
                                 direction = "arrive";
@@ -1103,6 +1125,9 @@
                       new Entity.Function { sid = "1234567896", name = "姣背娉紶鎰熷櫒", spk = Entity.SPK.SenesorMegahealth },
                         new Entity.Function { sid = "1234567897", name = "姣背娉紶鎰熷櫒1", spk = Entity.SPK.SenesorMegahealth2 },
                        new Entity.Function { sid = "1234567899", name = "闂ㄧ浼犳劅鍣�", spk = Entity.SPK.SensorDoorWindow },
+                        new Entity.Function { sid = "12345678991234", name = "HDL鏈烘鎵�", spk = Entity.SPK.MechanicalArm },
+                          new Entity.Function { sid = "123456789912345", name = "娴锋浖鏈烘鎵�", spk = Entity.SPK.MechanicalArm },
+                              new Entity.Function { sid = "12345678991234566", name = "娴锋浖鏈烘鎵�", spk = Entity.SPK.MechanicalArm },
             };
                 foreach (var function in functions)
                 {
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index 2cb4899..13f4a58 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -55,12 +55,15 @@
             #region  缂栬緫璁惧鐘舵��
             switch (device.spk)
             {
+
                 //寮�鍏崇伅鍏� 
                 case SPK.AirSwitch:
                 case SPK.LightSwitch:
                 //鎻掑骇
                 case SPK.PanelSocket:
                 case SPK.ElectricSocket:
+                //鏈烘鎵�
+                case SPK.MechanicalArm:
                     {
                         #region 鐣岄潰
                         ///寮�鍏�

--
Gitblit v1.8.0