old mode 100755
new mode 100644
| | |
| | | {
|
| | | CommonDevice device = null;
|
| | | //反序列化为指定的类,不然数据会丢失而导致无法强转
|
| | | try |
| | | try
|
| | | {
|
| | | device = CommonDevice.CommonDeviceByFilePath(file);
|
| | | }
|
| | |
| | | //添加缓存
|
| | | this.AddDeviceToMemory(ref device);
|
| | |
|
| | | //移除存在的设备内存 |
| | | //移除存在的设备内存
|
| | | string maikey = this.GetDeviceMainKeys(device);
|
| | | if (dicExist.ContainsKey(maikey) == true)
|
| | | {
|
| | |
| | | return info;
|
| | | }
|
| | | //获取第三方设备的【设备类型】
|
| | | return this.GetNotHdlMyDeviceEnumInfo(listdevice);
|
| | | return this.GetNotHdlMyDeviceEnumInfo(listdevice, false);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | else
|
| | | {
|
| | | //获取第三方设备的【设备类型】
|
| | | var myDeviceType = this.GetNotHdlMyDeviceEnumInfo(listDevice);
|
| | | var myDeviceType = this.GetNotHdlMyDeviceEnumInfo(listDevice, false);
|
| | | strName = Language.StringByID(myDeviceType.ConcreteTextId);
|
| | | }
|
| | | if (ApendFalge == true && listDevice[0].DriveCode > 0)
|
| | |
| | | /// </summary>
|
| | | /// <param name="listdevice">Mac都一样的设备列表</param>
|
| | | /// <returns></returns>
|
| | | public DeviceEnumInfo GetNotHdlMyDeviceEnumInfo(List<CommonDevice> listdevice)
|
| | | 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的时候:【ConcreteType】和【ConcreteTextId】可能会有不同的值</para>
|
| | | /// <para>true的时候:【ConcreteType】统一为Sensor,【ConcreteTextId】统一为传感器</para>
|
| | | /// </param>
|
| | | /// <returns></returns>
|
| | | public DeviceEnumInfo GetNotHdlMyDeviceEnumInfo(List<CommonDevice> listdevice, bool margeSensor = true)
|
| | | {
|
| | | var dicType = new Dictionary<DeviceType, CommonDevice>();
|
| | | foreach (CommonDevice device in listdevice)
|