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/LogicMethod.cs |   49 +++++++++++++++++++++++++++++++++++++------------
 1 files changed, 37 insertions(+), 12 deletions(-)

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)
                 {

--
Gitblit v1.8.0