| | |
| | | } |
| | | } |
| | | break; |
| | | case SPK.SensorEnvironment: |
| | | case SPK.SensorEnvironment:case SPK.SensorEnvironmentHailin: |
| | | case SPK.SensorEnvironment2: |
| | | case SPK.SensorEnvironment3: |
| | | { |
| | |
| | | |
| | | } |
| | | break; |
| | | case SPK.SensorPm10: |
| | | case SPK.SensorCO2: |
| | | case SPK.SensorPm25: |
| | | case SPK.SensorTVOC: |
| | |
| | | { |
| | | //用sid找到设备; |
| | | var device = LogicMethod.Current.GetDevice(inputCondition.sid); |
| | | if (device.spk == SPK.SensorEnvironment |
| | | if (device.spk == SPK.SensorEnvironment || device.spk == SPK.SensorEnvironmentHailin |
| | | || device.spk == SPK.SensorEnvironment2 |
| | | || device.spk == SPK.SensorEnvironment3 |
| | | ) |
| | |
| | | { |
| | | |
| | | this.SensorView(thisView, device, "co2", indexVulae); |
| | | |
| | | } |
| | | else if (device.spk == SPK.SensorPm10) |
| | | { |
| | | |
| | | this.SensorView(thisView, device, "pm10", indexVulae); |
| | | |
| | | } |
| | | else if (device.spk == SPK.SensorPm25) |
| | |
| | | //区别不同设备,显示不同设备状态 |
| | | switch (device.spk) |
| | | { |
| | | |
| | | |
| | | //插座(有USB) |
| | | case SPK.PanelSocket: |
| | | { |
| | | string on_off = GetKeyValue("on_off_master", dicList); |
| | | if (on_off == "on") |
| | | { |
| | | stateStr = Language.StringByID(StringId.onLogic); |
| | | } |
| | | else |
| | | { |
| | | stateStr = stateStr = Language.StringByID(StringId.offLogic); |
| | | } |
| | | } |
| | | break; |
| | | case SPK.AirSwitch: |
| | | case SPK.LightSwitch: |
| | | //插座 |
| | | case SPK.PanelSocket: |
| | | case SPK.ElectricSocket: |
| | | //机械手 |
| | | case SPK.MechanicalArm: |
| | |
| | | { |
| | | switch (device.spk) |
| | | { |
| | | //插座 |
| | | //插座(有USB) |
| | | case SPK.PanelSocket: |
| | | { |
| | | foreach (var dic in dicList) |
| | | { |
| | | string value = dic["value"]; |
| | | if (value == "on") |
| | | { |
| | | button1.Text = Language.StringByID(StringId.onLogic); |
| | | } |
| | | else |
| | | { |
| | | button1.Text = Language.StringByID(StringId.offLogic); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | case SPK.ElectricSocket: |
| | | //开关灯光 |
| | | case SPK.AirSwitch: |
| | |
| | | strtext = Language.StringByID(StringId.co2) + new PublicInterface { }.GetString("co2", value); |
| | | } |
| | | break; |
| | | case "pm10": |
| | | { |
| | | strtext = Language.StringByID(StringId.pm10) + new PublicInterface { }.GetString("pm25", value); |
| | | } |
| | | break; |
| | | case "pm25": |
| | | { |
| | | strtext = Language.StringByID(StringId.pm25) + new PublicInterface { }.GetString("pm25", value); |
| | |
| | | Input inputedit = Logic.currlogic.input[indexVulae]; |
| | | ///状态值 |
| | | string stateValue = ""; |
| | | foreach (var dic in inputedit.condition) |
| | | for (int i=0;i<inputedit.condition.Count;i++) |
| | | { |
| | | var dic = inputedit.condition[i]; |
| | | string comparator = dic["comparator"]; |
| | | stateValue = dic["value"]; |
| | | switch (key) |
| | |
| | | ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "co2", StringId.co2, indexVulae, true, stateValue); |
| | | } |
| | | break; |
| | | case "pm10": |
| | | { |
| | | ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "pm10", StringId.pm10, indexVulae, true, stateValue); |
| | | } |
| | | break; |
| | | case "pm25": |
| | | { |
| | | ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "pm25", StringId.pm25, indexVulae, true, stateValue); |