From edf7c324bea0556a3df9096dd41d668a9d41bf51 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期三, 13 五月 2020 15:58:29 +0800
Subject: [PATCH] 改版是门锁新功能需要给测试部的版本

---
 ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
index 4fe007b..c46b85d 100644
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
@@ -304,6 +304,21 @@
         }
 
         /// <summary>
+        /// 鐢辫澶囪矾寰勬仮澶嶈澶囧璞�
+        /// </summary>
+        /// <returns>The device by file path.</returns>
+        /// <param name="deviceFilePath">Device file path.</param>
+        public static CommonDevice CommonDeviceByFilePath(string deviceFilePath)
+        {
+            var v = deviceFilePath.Split('_');
+            if (v.Length < 3)
+            {
+                return null;
+            }
+            return CommonDeviceByByteString(v[1], System.Text.Encoding.UTF8.GetString(Shared.Common.Global.ReadFileByHomeId(deviceFilePath)));
+        }
+
+        /// <summary>
         /// 淇濆瓨璁惧
         /// </summary>
         public void Save()

--
Gitblit v1.8.0