From ecba45c93391066bc30c7bd602c3a7683fbb99a7 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 31 七月 2020 10:56:12 +0800
Subject: [PATCH] 临时备份
---
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs
old mode 100755
new mode 100644
index 7e5db3d..30314e1
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs
@@ -173,6 +173,66 @@
}
/// <summary>
+ /// 璋冨厜鐏拰缁х數鍣ㄧ壒娈婂鐞嗘柟娉�
+ /// <param name="curBindType">褰撳墠绫诲瀷 0:鍦烘櫙 1:寮�鍏� 2:鎻掑骇 3:鐏厜 4:閬槼 5:绌鸿皟 6:鏂伴</param>
+ /// </summary>
+ /// <returns></returns>
+ public static void UpdateLightCount(int curBindType)
+ {
+
+ if (curBindType == 1 || curBindType == 2 || curBindType == 3)
+ {
+ curSwitchCount = 0;
+ curSocketCount = 0;
+ curLightFromRelayCount = 0;
+ curLightCount = 0;
+
+ foreach (var key in bindTargetsFromMutilfunctionPanelList.Keys)
+ {
+ var bList = bindTargetsFromMutilfunctionPanelList[key];
+ foreach (var bDev in bList)
+ {
+ var device = LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
+ if (device == null)
+ {
+ continue;
+ }
+ if (bDev.KeyEpoint >= 52 && bDev.KeyEpoint <= 61)
+ {
+ if (device != null)
+ {
+ if (device.DfunctionType == DeviceFunctionType.A寮�鍏�)
+ {
+ curSwitchCount++;
+ }
+ else if (device.DfunctionType == DeviceFunctionType.A鎻掑骇)
+ {
+ curSocketCount++;
+ }
+ else if (device.DfunctionType == DeviceFunctionType.A鐏厜)
+ {
+ curLightFromRelayCount++;
+ }
+ }
+ }
+
+ if (bDev.KeyEpoint >= 22 && bDev.KeyEpoint <= 28)
+ {
+ if (device != null)
+ {
+ if (device.Type == DeviceType.DimmableLight && bDev.BindCluster == 8)
+ {
+ curLightCount++;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ /// <summary>
/// 鏀寔鍖归厤鐨勭鐐逛釜鏁�
/// <param name="curBindType">褰撳墠绫诲瀷 0:鍦烘櫙 1:寮�鍏� 2:鎻掑骇 3:鐏厜 4:閬槼 5:绌鸿皟 6:鏂伴</param>
/// </summary>
--
Gitblit v1.8.0