From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28

---
 ZigbeeApp/Shared/Common/Device.cs |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
old mode 100755
new mode 100644
index 9ca9408..32b497d
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -113,7 +113,7 @@
             {
                 CommonDevice device = null;
                 //鍙嶅簭鍒楀寲涓烘寚瀹氱殑绫伙紝涓嶇劧鏁版嵁浼氫涪澶辫�屽鑷存棤娉曞己杞�
-                try 
+                try
                 {
                     device = CommonDevice.CommonDeviceByFilePath(file);
                 }
@@ -260,7 +260,7 @@
                 //娣诲姞缂撳瓨
                 this.AddDeviceToMemory(ref device);
 
-                //绉婚櫎瀛樺湪鐨勮澶囧唴瀛� 
+                //绉婚櫎瀛樺湪鐨勮澶囧唴瀛�
                 string maikey = this.GetDeviceMainKeys(device);
                 if (dicExist.ContainsKey(maikey) == true)
                 {
@@ -1324,7 +1324,7 @@
                 return info;
             }
             //鑾峰彇绗笁鏂硅澶囩殑銆愯澶囩被鍨嬨��
-            return this.GetNotHdlMyDeviceEnumInfo(listdevice);
+            return this.GetNotHdlMyDeviceEnumInfo(listdevice, false);
         }
 
         /// <summary>
@@ -1354,7 +1354,7 @@
             else
             {
                 //鑾峰彇绗笁鏂硅澶囩殑銆愯澶囩被鍨嬨��
-                var myDeviceType = this.GetNotHdlMyDeviceEnumInfo(listDevice);
+                var myDeviceType = this.GetNotHdlMyDeviceEnumInfo(listDevice, false);
                 strName = Language.StringByID(myDeviceType.ConcreteTextId);
             }
             if (ApendFalge == true && listDevice[0].DriveCode > 0)
@@ -1466,7 +1466,22 @@
         /// </summary>
         /// <param name="listdevice">Mac閮戒竴鏍风殑璁惧鍒楄〃</param>
         /// <returns></returns>
-        public DeviceEnumInfo GetNotHdlMyDeviceEnumInfo(List<CommonDevice> listdevice)
+        public DeviceEnumInfo GetNotHdlMyDeviceEnumInfo(CommonDevice device, bool margeSensor = true)
+        {
+            return this.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice>() { device }, margeSensor);
+        }
+
+        /// <summary>
+        /// 鑾峰彇绗笁鏂硅澶囩殑銆愯澶囩被鍨嬨��(涓嶅缓璁娇鐢�)
+        /// </summary>
+        /// <param name="listdevice">Mac閮戒竴鏍风殑璁惧鍒楄〃</param>
+        /// <param name="margeSensor">
+        /// <para>鏄惁灏嗘墍鏈夌被鍨嬬殑浼犳劅鍣ㄩ兘褰掍负銆愪紶鎰熷櫒銆�,</para>
+        /// <para>false鐨勬椂鍊欙細銆怌oncreteType銆戝拰銆怌oncreteTextId銆戝彲鑳戒細鏈変笉鍚岀殑鍊�</para>
+        /// <para>true鐨勬椂鍊欙細銆怌oncreteType銆戠粺涓�涓篠ensor,銆怌oncreteTextId銆戠粺涓�涓轰紶鎰熷櫒</para>
+        /// </param>
+        /// <returns></returns>
+        public DeviceEnumInfo GetNotHdlMyDeviceEnumInfo(List<CommonDevice> listdevice, bool margeSensor = true)
         {
             var dicType = new Dictionary<DeviceType, CommonDevice>();
             foreach (CommonDevice device in listdevice)

--
Gitblit v1.8.0