| | |
| | | |
| | | case DeviceType.TemperatureSensor: |
| | | { |
| | | string current = Language.StringByID(MyInternationalizationString.current); |
| | | devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 * 2 - 20 - 50); |
| | | devicefra.Height = Application.GetRealHeight(140 + 160 * 2 + 20 + 50); |
| | | var temperatureSensor = common as TemperatureSensor; |
| | |
| | | { |
| | | dictionary(deviceConditionsInfo, "AttriButeData1", horizontalSeekBarVol.Progress.ToString()); |
| | | |
| | | Btntemperaturevalue.Text = "当前>" + horizontalSeekBarVol.Progress.ToString() + "℃"; |
| | | Btntemperaturevalue.Text = current+">" + horizontalSeekBarVol.Progress.ToString() + "℃"; |
| | | |
| | | } |
| | | else |
| | | { |
| | | Btntemperaturevalue.Text = "当前<" + horizontalSeekBarVol.Progress.ToString() + "%"; |
| | | Btntemperaturevalue.Text = current+"<" + horizontalSeekBarVol.Progress.ToString() + "%"; |
| | | dictionary(deviceConditionsInfo, "AttriButeData1", horizontalSeekBarVol.Progress.ToString());//温度值 |
| | | } |
| | | }; |
| | |
| | | dictionary(deviceConditionsInfo, "Range", "0");//0大于AttriButeData1时触发动作 |
| | | dictionary(deviceConditionsInfo, "AttriButeData1", "0"); |
| | | dictionary(deviceConditionsInfo, "AttriButeData2", "0"); |
| | | Btntemperaturevalue.Text = "当前>0℃"; |
| | | Btntemperaturevalue.Text = current+">0℃"; |
| | | |
| | | } |
| | | else |
| | | { |
| | | Btntemperaturevalue.Text = "当前<0%"; |
| | | Btntemperaturevalue.Text = current+"<0%"; |
| | | dictionary(deviceConditionsInfo, "Cluster_ID", "1029"); |
| | | dictionary(deviceConditionsInfo, "AttriButeId", "0"); |
| | | dictionary(deviceConditionsInfo, "Range", "2");//2小于AttriButeData1时触发动作 |
| | |
| | | if (temperatureSensor.SensorDiv == 1) |
| | | { |
| | | |
| | | Btntemperaturevalue.Text = "当前>" + devices["AttriButeData1"] + "℃"; |
| | | Btntemperaturevalue.Text = current+">" + devices["AttriButeData1"] + "℃"; |
| | | |
| | | } |
| | | else |
| | | { |
| | | Btntemperaturevalue.Text = "当前<" + devices["AttriButeData1"] + "%"; |
| | | Btntemperaturevalue.Text = current+"<" + devices["AttriButeData1"] + "%"; |
| | | } |
| | | } |
| | | |