| | |
| | | if (string.IsNullOrEmpty(bindName))
|
| | | {
|
| | | btnHumidityStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
|
| | | bindHumidityDev = null;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | if (string.IsNullOrEmpty(bindName))
|
| | | {
|
| | | btnTemperatureStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
|
| | | bindTemperatureDev = null;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | {
|
| | | continue;
|
| | | }
|
| | | //获取设备类型的
|
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
|
| | | if (device.Type == DeviceType.TemperatureSensor)
|
| | | {
|
| | | var bD = device as TemperatureSensor;
|
| | |
| | | bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | bindHumidityDev = device;
|
| | | }
|
| | |
|
| | | //空气质量传感器
|
| | | if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.AirQualitySensor)
|
| | | {
|
| | | if (bDev.BindCluster == 1026)
|
| | | {
|
| | | bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
|
| | | bindTemperatureDev = device;
|
| | | }
|
| | | if (bDev.BindCluster == 1029)
|
| | | {
|
| | | bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor);
|
| | | bindHumidityDev = device;
|
| | | }
|
| | | }
|
| | | }
|
| | | if (device.Type == DeviceType.FreshAirHumiditySensor)
|
| | | {
|
| | | bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | bindHumidityDev = device;
|
| | | }
|
| | | else if (device.Type == DeviceType.PMSensor)
|
| | | {
|
| | | if (bDev.BindCluster == 1026)
|
| | | {
|
| | | bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
|
| | | bindTemperatureDev = device;
|
| | | }
|
| | | if (bDev.BindCluster == 1029)
|
| | | {
|
| | | bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor);
|
| | | bindHumidityDev = device;
|
| | | }
|
| | | }
|
| | | }
|
| | | result = true;
|
| | | }
|