From 6cbd0936d3245fd7c433884ac9c1f5448a7cf657 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 13 十二月 2019 13:49:44 +0800 Subject: [PATCH] 合并了代码 --- ZigbeeApp/Shared/Common/Device.cs | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs index 8dfbe3b..c8ace0a 100755 --- 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>(); @@ -1039,6 +1043,13 @@ //鑾峰彇瀹冨睘浜庝粈涔堢被鍨嬬殑璁惧 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"; @@ -1111,6 +1122,12 @@ { //灏嗗叿浣撶被鍨嬭浆瀛楃涓� 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"; @@ -2097,6 +2114,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 -- Gitblit v1.8.0