From e7a71b8318fa26b8a85eac86e4c0a129f453d44f Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期三, 08 一月 2020 17:54:16 +0800
Subject: [PATCH] 2019.1.8
---
ZigbeeApp/Shared/Common/Device.cs | 282 +++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 236 insertions(+), 46 deletions(-)
diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
old mode 100755
new mode 100644
index 8dfbe3b..90033c6
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -72,6 +72,10 @@
/// </summary>
private Dictionary<string, string> dicDeviceModelIdChanged = null;
/// <summary>
+ /// 鍥剧墖鍏辨湁(keys:鎸囧畾璁惧鐨勫叿浣撶被鍨� value:鎸囧畾鍏辨湁瀵硅薄鐨勫叿浣撶被鍨�)
+ /// </summary>
+ private Dictionary<string, string> dicPictrueShard = null;
+ /// <summary>
/// 鏈湴鎵�鏈夎澶囩殑缂撳瓨(闈炲叕寮�)
/// </summary>
private Dictionary<string, CommonDevice> dicAllDevice = new Dictionary<string, CommonDevice>();
@@ -109,7 +113,7 @@
{
CommonDevice device = null;
//鍙嶅簭鍒楀寲涓烘寚瀹氱殑绫伙紝涓嶇劧鏁版嵁浼氫涪澶辫�屽鑷存棤娉曞己杞�
- try
+ try
{
device = CommonDevice.CommonDeviceByFilePath(file);
}
@@ -257,7 +261,7 @@
//娣诲姞缂撳瓨
this.AddDeviceToMemory(ref device);
- //绉婚櫎瀛樺湪鐨勮澶囧唴瀛�
+ //绉婚櫎瀛樺湪鐨勮澶囧唴瀛�
string maikey = this.GetDeviceMainKeys(device);
if (dicExist.ContainsKey(maikey) == true)
{
@@ -539,6 +543,14 @@
/// <param name="deleteRoom">鏄惁浠庢埧闂村垹闄�</param>
public void DeleteMemmoryDevice(CommonDevice device, bool deleteRoom = true)
{
+ if (deleteRoom == true && Room.CurrentRoom != null)
+ {
+ //浠庢埧闂翠腑鍒犻櫎
+ Room.CurrentRoom.DeleteDevice(device);
+ //鍒犻櫎鎴戠殑鍠滅埍鐨勮澶�
+ Room.CurrentRoom.DeleteLoveDevice(device);
+ }
+
//鍒犻櫎缂撳瓨
string mainKeys = this.GetDeviceMainKeys(device);
lock (dicAllDevice)
@@ -588,12 +600,6 @@
}
}
this.dicOTADevice.Remove(otaKeys);
- }
-
- if (deleteRoom == true && Room.CurrentRoom != null)
- {
- //浠庢埧闂翠腑鍒犻櫎
- Room.CurrentRoom.DeleteDevice(device);
}
}
@@ -721,11 +727,12 @@
}
/// <summary>
- /// 鏍规嵁MAC鍦板潃,鑾峰彇鍏ㄩ儴鍥炶矾鐨勮澶囧璞�(宸茬粡鎺掑簭)
+ /// 鏍规嵁MAC鍦板潃,鑾峰彇鍏ㄩ儴鍥炶矾鐨勮澶囧璞�
/// </summary>
/// <param name="DeviceAddr">Mac鍦板潃</param>
+ /// <param name="sort">鏄惁鎺掑簭</param>
/// <returns></returns>
- public List<CommonDevice> GetDevicesByMac(string DeviceAddr)
+ public List<CommonDevice> GetDevicesByMac(string DeviceAddr, bool sort = true)
{
var list = new List<CommonDevice>();
if (dicDeviceEpoint.ContainsKey(DeviceAddr) == false)
@@ -740,6 +747,11 @@
list.Add(device);
}
}
+ if (sort == false)
+ {
+ return list;
+ }
+
//鎺掑簭
list.Sort((obj1, obj2) =>
{
@@ -1036,9 +1048,27 @@
/// <param name="listdevice">璁惧瀵硅薄</param>
public void SetRealDeviceIconToControl(Button btnIcon, List<CommonDevice> listdevice)
{
+ //鑾峰彇璁惧鐨勭湡瀹炲浘鐗�
+ string imagePath = this.GetRealDeviceIcon(listdevice);
+ btnIcon.UnSelectedImagePath = imagePath;
+ }
+
+ /// <summary>
+ /// 鑾峰彇璁惧鐨勭湡瀹炲浘鐗�
+ /// </summary>
+ /// <param name="listdevice">璁惧瀵硅薄</param>
+ public string GetRealDeviceIcon(List<CommonDevice> listdevice)
+ {
//鑾峰彇瀹冨睘浜庝粈涔堢被鍨嬬殑璁惧
var myDeviceType = this.GetMyDeviceEnumInfo(listdevice);
string strConcrete = Enum.GetName(typeof(DeviceConcreteType), myDeviceType.ConcreteType);
+
+ //鍥剧墖鍏辨湁
+ if (this.dicPictrueShard.ContainsKey(strConcrete) == true)
+ {
+ strConcrete = this.dicPictrueShard[strConcrete];
+ }
+
string strType = strConcrete.Replace("_", string.Empty);
//灏嗙被鍨嬭浆涓哄浘鐗囧湴鍧�
string imageFilePath = "RealDevice/" + strType + ".png";
@@ -1050,7 +1080,7 @@
if (arry.Length == 1)
{
//濡傛灉瀹冭嚜宸卞氨鏄叡閫氬浘鐗囩殑璇濓紝涓嶅啀澶勭悊
- return;
+ return "RealDevice/CommonDevice.png";
}
imageFilePath = "RealDevice/" + arry[0] + ".png";
//濡傛灉瀹冭嚜宸辩殑鍏遍�氬浘鐗囪繕鏄笉瀛樺湪鐨勮瘽,鍒欑洿鎺ヤ娇鐢ㄦ墍鏈夎澶囩殑鍏遍�氬浘鐗�
@@ -1059,16 +1089,16 @@
imageFilePath = "RealDevice/CommonDevice.png";
}
}
- btnIcon.UnSelectedImagePath = imageFilePath;
+ return imageFilePath;
}
/// <summary>
- /// 璁剧疆銆愯澶囨墍灞炵被鍨嬨�戠殑鍥炬爣鍒版寚瀹氱殑鎺т欢
+ /// 璁剧疆銆愯澶囩被鍨嬨�戠殑鍥炬爣鍒版寚瀹氱殑鎺т欢
/// </summary>
/// <param name="btnIcon">鎺т欢瀵硅薄</param>
/// <param name="listdevice">璁惧瀵硅薄</param>
/// <returns></returns>
- public void SetDeviceBeloneIconToControl(Button btnIcon, List<CommonDevice> listdevice)
+ public void SetDeviceObjectIconToControl(Button btnIcon, List<CommonDevice> listdevice)
{
//鑾峰彇鑷畾涔夎澶囩被鍨�
var myDeviceType = this.GetMyDeviceEnumInfo(listdevice);
@@ -1076,8 +1106,8 @@
string imageUnSelectFilePath = string.Empty;
string imageSelectFilePath = string.Empty;
- //鑾峰彇銆愯澶囨墍灞炵被鍨嬨�戠殑鍥炬爣
- this.GetDeviceBeloneIcon(myDeviceType.ConcreteType, ref imageUnSelectFilePath, ref imageSelectFilePath);
+ //鑾峰彇銆愯澶囩被鍨嬨�戠殑鍥炬爣
+ this.GetDeviceObjectIcon(myDeviceType.ConcreteType, ref imageUnSelectFilePath, ref imageSelectFilePath);
//璁剧疆鍥剧墖
btnIcon.UnSelectedImagePath = imageUnSelectFilePath;
@@ -1085,32 +1115,38 @@
}
/// <summary>
- /// 鑾峰彇銆愯澶囨墍灞炵被鍨嬨�戠殑鍥炬爣
+ /// 鑾峰彇銆愯澶囩被鍨嬨�戠殑鍥炬爣
/// </summary>
/// <param name="listdevice">璁惧瀵硅薄</param>
/// <param name="unSelectPath">鍥剧墖鍦板潃</param>
/// <param name="selectPath">鍥剧墖鍦板潃</param>
/// <returns></returns>
- public void GetDeviceBeloneIcon(List<CommonDevice> listdevice, ref string unSelectPath, ref string selectPath)
+ public void GetDeviceObjectIcon(List<CommonDevice> listdevice, ref string unSelectPath, ref string selectPath)
{
//鑾峰彇鑷畾涔夎澶囩被鍨�
var myDeviceType = this.GetMyDeviceEnumInfo(listdevice);
- //鑾峰彇銆愯澶囨墍灞炵被鍨嬨�戠殑鍥炬爣
- this.GetDeviceBeloneIcon(myDeviceType.ConcreteType, ref unSelectPath, ref selectPath);
+ //鑾峰彇銆愯澶囩被鍨嬨�戠殑鍥炬爣
+ this.GetDeviceObjectIcon(myDeviceType.ConcreteType, ref unSelectPath, ref selectPath);
}
/// <summary>
- /// 鑾峰彇銆愯澶囨墍灞炵被鍨嬨�戠殑鍥炬爣
+ /// 鑾峰彇銆愯澶囩被鍨嬨�戠殑鍥炬爣
/// </summary>
/// <param name="specificType">鑷畾涔夎澶囩被鍨�</param>
/// <param name="unSelectPath">鍥剧墖鍦板潃</param>
/// <param name="selectPath">鍥剧墖鍦板潃</param>
/// <returns></returns>
- public void GetDeviceBeloneIcon(DeviceConcreteType specificType, ref string unSelectPath, ref string selectPath)
+ public void GetDeviceObjectIcon(DeviceConcreteType specificType, ref string unSelectPath, ref string selectPath)
{
//灏嗗叿浣撶被鍨嬭浆瀛楃涓�
string strSpecific = Enum.GetName(typeof(DeviceConcreteType), specificType);
+ //鍥剧墖鍏辨湁
+ if (this.dicPictrueShard.ContainsKey(strSpecific) == true)
+ {
+ strSpecific = this.dicPictrueShard[strSpecific];
+ }
+
string strType = strSpecific.Replace("_", string.Empty);
//灏嗙被鍨嬭浆涓哄浘鐗囧湴鍧�
string imageFilePath = "Device/" + strType + ".png";
@@ -1199,7 +1235,7 @@
return info;
}
//鑾峰彇绗笁鏂硅澶囩殑銆愯澶囩被鍨嬨��
- return this.GetNotHdlMyDeviceEnumInfo(listdevice);
+ return this.GetNotHdlMyDeviceEnumInfo(listdevice, false);
}
/// <summary>
@@ -1229,7 +1265,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)
@@ -1295,11 +1331,68 @@
#region 鈻� 鑾峰彇绗笁鏂硅澶囩殑璁惧绫诲瀷___________
/// <summary>
- /// 鑾峰彇绗笁鏂硅澶囩殑銆愯澶囩被鍨嬨��
+ /// 鑾峰彇璁惧鐨勩�愭墍灞炵被鍨嬩俊鎭��,姝ゆ柟娉曚細鎶婃墍鏈夌殑浼犳劅鍣ㄩ兘褰掍负銆愪紶鎰熷櫒銆�(鍖呮嫭娓╂箍搴︿紶鎰熷櫒)
/// </summary>
- /// <param name="listdevice"></param>
+ /// <param name="device">璁惧鍥炶矾</param>
/// <returns></returns>
- public DeviceEnumInfo GetNotHdlMyDeviceEnumInfo(List<CommonDevice> listdevice)
+ public DeviceEnumInfo GetDeviceBelongEnumInfo(CommonDevice device)
+ {
+ var info = this.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice>() { device });
+ if (info.BeloneType == DeviceBeloneType.A璋冨厜鍣�
+ || info.BeloneType == DeviceBeloneType.A褰╃伅)
+ {
+ //褰掍负鐏厜
+ info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId15;
+ info.BeloneType = DeviceBeloneType.A鐏厜;
+ info.ConcreteType = DeviceConcreteType.Light;
+
+ int value = (int)info.BeloneType;
+ if (dicDeviceDefultNameID.ContainsKey("uDeviceBelongId" + value) == true)
+ {
+ //璁惧鎵�灞炵被鍨嬬殑缈昏瘧鍚嶅瓧
+ info.BeloneTextId = dicDeviceDefultNameID["uDeviceBelongId" + value];
+ }
+ }
+ else if (info.BeloneType == DeviceBeloneType.A浼犳劅鍣�
+ || device.Type == DeviceType.TemperatureSensor)
+ {
+ //浼犳劅鍣ㄥ悎骞�
+ info.BeloneType = DeviceBeloneType.A浼犳劅鍣�;
+ info.ConcreteType = DeviceConcreteType.Sensor;
+ info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId1200;
+
+ int value = (int)info.BeloneType;
+ if (dicDeviceDefultNameID.ContainsKey("uDeviceBelongId" + value) == true)
+ {
+ //璁惧鎵�灞炵被鍨嬬殑缈昏瘧鍚嶅瓧
+ info.BeloneTextId = dicDeviceDefultNameID["uDeviceBelongId" + value];
+ }
+ }
+
+ return info;
+ }
+
+ /// <summary>
+ /// 鑾峰彇绗笁鏂硅澶囩殑銆愯澶囩被鍨嬨��(涓嶅缓璁娇鐢�)
+ /// </summary>
+ /// <param name="listdevice">Mac閮戒竴鏍风殑璁惧鍒楄〃</param>
+ /// <returns></returns>
+ 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)
@@ -1314,9 +1407,18 @@
//1鍖呭惈闈㈡澘鐨勮瘽,褰撻潰鏉垮鐞�
if (dicType.ContainsKey(DeviceType.OnOffSwitch) == true)
{
- info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId200;
- info.BeloneType = DeviceBeloneType.A鎸夐敭闈㈡澘;
- info.ConcreteType = DeviceConcreteType.ButtonPanel;
+ if (listdevice.Count > 1)
+ {
+ info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId200;
+ info.BeloneType = DeviceBeloneType.A鎸夐敭闈㈡澘;
+ info.ConcreteType = DeviceConcreteType.ButtonPanel;
+ }
+ else
+ {
+ info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId16;
+ info.BeloneType = DeviceBeloneType.A骞叉帴鐐�;
+ info.ConcreteType = DeviceConcreteType.DryContact;
+ }
}
//3鍖呭惈绐楀笜鐨勮瘽,褰撶獥甯樺鐞�
else if (dicType.ContainsKey(DeviceType.WindowCoveringDevice) == true)
@@ -1328,16 +1430,56 @@
//4绌烘皵寮�鍏�
else if (dicType.ContainsKey(DeviceType.AirSwitch) == true)
{
+ //榛樿鍊�
info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId4100;
- info.BeloneType = DeviceBeloneType.A绌烘皵寮�鍏�;
+ info.BeloneType = DeviceBeloneType.A鏅鸿兘绌哄紑;
info.ConcreteType = DeviceConcreteType.AirSwitch;
+
+ if (dicType[DeviceType.AirSwitch].DfunctionType == DeviceFunctionType.A寮�鍏�)
+ {
+ info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId13;
+ info.BeloneType = DeviceBeloneType.A寮�鍏�;
+ info.ConcreteType = DeviceConcreteType.Switch;
+ }
+ else if (dicType[DeviceType.AirSwitch].DfunctionType == DeviceFunctionType.A鎻掑骇)
+ {
+ info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId14;
+ info.BeloneType = DeviceBeloneType.A鎻掑骇;
+ info.ConcreteType = DeviceConcreteType.Socket1;
+ }
+ else if (dicType[DeviceType.AirSwitch].DfunctionType == DeviceFunctionType.A鐏厜)
+ {
+ info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId15;
+ info.BeloneType = DeviceBeloneType.A鐏厜;
+ info.ConcreteType = DeviceConcreteType.Light;
+ }
}
//5缁х數鍣�
else if (dicType.ContainsKey(DeviceType.OnOffOutput) == true)
{
+ //榛樿鍊�
info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId2300;
info.BeloneType = DeviceBeloneType.A缁х數鍣�;
info.ConcreteType = DeviceConcreteType.Relay;
+
+ if (dicType[DeviceType.OnOffOutput].DfunctionType == DeviceFunctionType.A寮�鍏�)
+ {
+ info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId13;
+ info.BeloneType = DeviceBeloneType.A寮�鍏�;
+ info.ConcreteType = DeviceConcreteType.Switch;
+ }
+ else if (dicType[DeviceType.OnOffOutput].DfunctionType == DeviceFunctionType.A鎻掑骇)
+ {
+ info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId14;
+ info.BeloneType = DeviceBeloneType.A鎻掑骇;
+ info.ConcreteType = DeviceConcreteType.Socket1;
+ }
+ else if (dicType[DeviceType.OnOffOutput].DfunctionType == DeviceFunctionType.A鐏厜)
+ {
+ info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId15;
+ info.BeloneType = DeviceBeloneType.A鐏厜;
+ info.ConcreteType = DeviceConcreteType.Light;
+ }
}
//6璋冨厜鍣�
else if (dicType.ContainsKey(DeviceType.DimmableLight) == true)
@@ -1384,8 +1526,10 @@
//12鍖呭惈浼犳劅鍣ㄧ殑璇�,褰撲紶鎰熷櫒澶勭悊
else if (dicType.ContainsKey(DeviceType.IASZone) == true)
{
- //璁剧疆浼犳劅鍣ㄥ叿浣撶殑绫诲瀷
info.BeloneType = DeviceBeloneType.A浼犳劅鍣�;
+ info.ConcreteType = DeviceConcreteType.Sensor;
+ info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId1200;
+ //璁剧疆浼犳劅鍣ㄥ叿浣撶殑绫诲瀷
this.SetSensorDeviceSpecificType(ref info, listdevice);
}
//13鍖呭惈娓╁害浼犳劅鍣ㄧ殑璇�
@@ -1393,7 +1537,9 @@
{
bool temperatrue = false;
bool humidity = false;
- foreach (var device in listdevice)
+ //鑾峰彇鍏ㄩ儴鐨勫洖璺�
+ var listTemp = this.GetDevicesByMac(listdevice[0].DeviceAddr, false);
+ foreach (var device in listTemp)
{
if (device is TemperatureSensor)
{
@@ -1414,14 +1560,14 @@
//璁剧疆浼犳劅鍣ㄥ叿浣撶殑绫诲瀷
info.BeloneType = DeviceBeloneType.A娓╂箍搴︿紶鎰熷櫒;
info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId10;
- info.ConcreteType = DeviceConcreteType.Sensor_TemperatrueHumidity;
+ info.ConcreteType = DeviceConcreteType.Sensor_TemperatureHumidity;
}
else if (temperatrue == true && humidity == false)
{
//璁剧疆浼犳劅鍣ㄥ叿浣撶殑绫诲瀷
info.BeloneType = DeviceBeloneType.A娓╁害浼犳劅鍣�;
info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId11;
- info.ConcreteType = DeviceConcreteType.Sensor_Temperatrue;
+ info.ConcreteType = DeviceConcreteType.Sensor_Temperature;
}
else if (temperatrue == false && humidity == true)
{
@@ -1453,10 +1599,6 @@
/// <param name="listdevice">璁惧瀵硅薄</param>
private void SetSensorDeviceSpecificType(ref DeviceEnumInfo info, List<CommonDevice> listdevice)
{
- //榛樿鍚嶅瓧:浼犳劅鍣�
- info.ConcreteType = DeviceConcreteType.Sensor;
- info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId1200;
-
//濡傛灉杩欎釜璁惧鎷ユ湁澶氫釜鍥炶矾鐨勮瘽,鎴戜篃涓嶇煡閬撴�庝箞鍛藉悕,鍙兘缁欎釜榛樿鍚嶅瓧
if (listdevice.Count > 1)
{
@@ -2041,6 +2183,14 @@
//瀹氫箟瑙勫垯锛氭ā鍧桰D(宸茬炕璇�)=璁惧鍏蜂綋绫诲瀷鍊�-璁惧鎵�灞炵被鍨嬪��(鑷畾涔夌殑鍊�,鍢�,鍙涓嶉噸澶嶅氨鍙互)
//绗竴涓�兼槸:DeviceConcreteType 绗簩涓�兼槸:DeviceBeloneType
+ //*********************************************************************
+ //鏂拌澶囨坊鍔犳柟娉曪細
+ //1銆佸湪杩欓噷濉啓涓婃ā鍧桰D锛岀劧鍚庢槸 DeviceConcreteType 锛岀劧鍚庢槸 DeviceBeloneType
+ //2銆佺劧鍚庡湪鏈�涓嬮潰娣诲姞銆愯澶囩殑鍏蜂綋绫诲瀷銆戯紝銆愯澶囩殑鎵�灞炵被鍨嬨��
+ //3銆佸凡璁惧鐨勫叿浣撶被鍨嬩负鍚嶅瓧(鍘绘帀銆�-銆�)娣诲姞璁惧鐨勩�愭墍灞炲浘鐗囥�戯紝銆愮湡瀹炵墿鐞嗗浘鐗囥�戙�傚洖璺浘鐗囬渶瑕佺壒娈婂鐞�
+ //4銆佹坊鍔燫鏂囦欢,娣诲姞Language鏂囦欢
+ //*********************************************************************
+
//=========鈽呪槄寮�鍚堝笜绫�(100-199)鈽呪槄=========
this.dicDeviceModelIdEnum["MWM65B-ZB.20"] = "100-100";//鏅鸿兘寮�鍚堝笜鐢垫満
this.dicDeviceModelIdEnum["MVSM35B-ZB.20"] = "101-100";//鏅鸿兘绠$姸鐢垫満
@@ -2088,7 +2238,7 @@
this.dicDeviceModelIdEnum["MBUS/GW-ZB.10"] = "4200-4200";//zigbee杞琤uspro鍗忚杞崲鍣�
this.dicDeviceModelIdEnum["M485/GW-ZB.10"] = "4201-4200";//zigbee杞�485鍗忚杞崲鍣�
- //闇�瑕佷氦鎹㈢殑妯″潡ID
+ //鉁┾湬鉁┾湬鉁╅渶瑕佷氦鎹㈢殑妯″潡ID鉁┾湬鉁┾湬鉁�
this.dicDeviceModelIdChanged = new Dictionary<string, string>();
//=========鈽呪槄瀹夐槻绫讳紶鎰熷櫒绫烩槄鈽�=========
this.dicDeviceModelIdChanged["MULTI-GASE--EA07"] = "MSG01/M-ZB.10";//鐕冩皵浼犳劅鍣�
@@ -2097,6 +2247,12 @@
this.dicDeviceModelIdChanged["MULTI-MOTI--EA04"] = "MSPIR01/M-ZB.10";//绾㈠浼犳劅鍣�
this.dicDeviceModelIdChanged["MULTI-WATE--EA02"] = "MSW01/M-ZB.10";//姘存蹈浼犳劅鍣�
this.dicDeviceModelIdChanged["MULTI-BURO--EA06"] = "MBU01/M-ZB.10";//绱ф�ユ寜閿�
+
+ //鉁┾湬鉁┾湬鉁╅渶瑕佸叡鏈夌殑鍥剧墖瀵硅薄鉁┾湬鉁┾湬鉁�
+ this.dicPictrueShard = new Dictionary<string, string>();
+ this.dicPictrueShard["ButtonPanel_SimpleFour"] = "ButtonPanel_Four";//绠�绾�4鎸夐敭闈㈡澘 娌跨敤 4鎸夐敭鐨勫浘鏍�
+ this.dicPictrueShard["ButtonPanel_SimpleThree"] = "ButtonPanel_Three";//绠�绾�3鎸夐敭闈㈡澘 娌跨敤 3鎸夐敭鐨勫浘鏍�
+ this.dicPictrueShard["ButtonPanel_SimpleTwo"] = "ButtonPanel_Two";//绠�绾�2鎸夐敭闈㈡澘 娌跨敤 2鎸夐敭鐨勫浘鏍�
}
#endregion
@@ -2215,11 +2371,11 @@
/// <summary>
/// 娓╂箍搴︿紶鎰熷櫒
/// </summary>
- Sensor_TemperatrueHumidity = -1308,
+ Sensor_TemperatureHumidity = -1308,
/// <summary>
/// 娓╁害浼犳劅鍣�
/// </summary>
- Sensor_Temperatrue = -1309,
+ Sensor_Temperature = -1309,
/// <summary>
/// 婀垮害浼犳劅鍣�
/// </summary>
@@ -2283,7 +2439,7 @@
//=========鈽呪槄绌烘皵寮�鍏崇被(4100-????)鈽呪槄=========
/// <summary>
- /// 鏅鸿兘绌烘皵寮�鍏�
+ /// 鏅鸿兘绌哄紑
/// </summary>
AirSwitch = -4100,
/// <summary>
@@ -2304,6 +2460,24 @@
/// zigbee杞琤uspro鍗忚杞崲鍣�
/// </summary>
Converter_ZbBuspro = 4201,
+
+ //=========鈽呪槄鍏朵粬绫�(????-????)鈽呪槄=========
+ /// <summary>
+ /// 骞叉帴鐐�
+ /// </summary>
+ DryContact = -10000,
+ /// <summary>
+ /// 鐏厜(娉ㄦ剰,瀹冭緭鍏ュ叾浠栫被,涓嶆槸璁惧绫诲瀷)
+ /// </summary>
+ Light = -10001,
+ /// <summary>
+ /// 鎻掑骇
+ /// </summary>
+ Socket1 = -10002,
+ /// <summary>
+ /// 寮�鍏�
+ /// </summary>
+ Switch = -10003,
}
/// <summary>
@@ -2349,9 +2523,9 @@
/// </summary>
A涓户鍣� = 3900,
/// <summary>
- /// 绌烘皵寮�鍏�(4100-4199)
+ /// 鏅鸿兘绌哄紑(4100-4199)
/// </summary>
- A绌烘皵寮�鍏� = 4100,
+ A鏅鸿兘绌哄紑 = 4100,
/// <summary>
/// 杞崲鍣�(4200-4699)
/// </summary>
@@ -2371,7 +2545,23 @@
/// <summary>
/// 婀垮害浼犳劅鍣�
/// </summary>
- A婀垮害浼犳劅鍣� = 12
+ A婀垮害浼犳劅鍣� = 12,
+ /// <summary>
+ /// 寮�鍏�
+ /// </summary>
+ A寮�鍏� = 13,
+ /// <summary>
+ /// 鎻掑骇
+ /// </summary>
+ A鎻掑骇 = 14,
+ /// <summary>
+ /// 鐏厜
+ /// </summary>
+ A鐏厜 = 15,
+ /// <summary>
+ /// 骞叉帴鐐�
+ /// </summary>
+ A骞叉帴鐐� = 16
}
#endregion
--
Gitblit v1.8.0