| | |
| | | /// </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>();
|
| | |
| | | //获取它属于什么类型的设备
|
| | | 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";
|
| | |
| | | {
|
| | | //将具体类型转字符串
|
| | | 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";
|
| | |
| | | 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
|