| | |
| | | //添加缓存
|
| | | this.AddDeviceToMemory(ref device);
|
| | |
|
| | | //移除存在的设备内存 |
| | | //移除存在的设备内存
|
| | | string maikey = this.GetDeviceMainKeys(device);
|
| | | if (dicExist.ContainsKey(maikey) == true)
|
| | | {
|
| | |
| | | public DeviceUI GetDeviceUI(string filePath)
|
| | | {
|
| | | string[] arry = filePath.Split(new string[] { "_" }, StringSplitOptions.RemoveEmptyEntries);
|
| | | if (arry.Length != 5)
|
| | | if (arry.Length != 4)
|
| | | {
|
| | | return null;
|
| | | }
|
| | | //创建一个新的东西给过去
|
| | | var deviceUi = new DeviceUI();
|
| | | deviceUi.DeviceAddr = arry[3];
|
| | | deviceUi.DeviceEpoint = Convert.ToInt32(arry[4]);
|
| | | deviceUi.DeviceAddr = arry[2];
|
| | | deviceUi.DeviceEpoint = Convert.ToInt32(arry[3]);
|
| | | return deviceUi;
|
| | | }
|
| | |
|