| | |
| | | case SPK.SensorDryContact2: |
| | | { |
| | | |
| | | string value = this.GetKeyValue("on_off", dicList); |
| | | string value = this.GetKeyValue("contact_status", dicList); |
| | | inputView.btnState.Text = Language.StringByID(StringId.offLogic); |
| | | if (value == "on") |
| | | if (value == "open") |
| | | { |
| | | inputView.btnState.Text = Language.StringByID(StringId.onLogic); |
| | | } |
| | |
| | | } |
| | | break; |
| | | case SPK.Ev_Ipcam: |
| | | if (inputCondition.identifier == "motiondetect_event") |
| | | if (inputCondition.identifier == Constant.intelligentDetection_event) |
| | | { |
| | | inputView.btnState.Text = Language.StringByID(StringId.shi); |
| | | } |
| | |
| | | string value = this.GetKeyValue("people_status", dicList); |
| | | if (string.IsNullOrEmpty(value)) |
| | | { |
| | | inputView.btnState.Text = inputCondition.hold_time + "s"; |
| | | inputView.btnState.Text = LogicMethod.Current.getTimeStr(inputCondition.hold_time).Replace("0s", ""); |
| | | break; |
| | | |
| | | } |
| | |
| | | } |
| | | if (!string.IsNullOrEmpty(inputCondition.hold_time) && int.Parse(inputCondition.hold_time) > 0) |
| | | { |
| | | |
| | | inputView.btnState.Text += "持续" + inputCondition.hold_time + "s"; |
| | | int time = int.Parse(inputCondition.hold_time); |
| | | inputView.btnState.Text += "持续" + LogicMethod.Current.getTimeStr(inputCondition.hold_time).Replace("0s", ""); |
| | | } |
| | | if (!string.IsNullOrEmpty(inputCondition.detect_type)) |
| | | { |
| | | if (inputCondition.detect_type == "1") |
| | | { |
| | | inputView.btnState.Text += "," + Language.StringByID(StringId.gaibiancaizhixing); |
| | | } |
| | | else |
| | | { |
| | | inputView.btnState.Text += "," + Language.StringByID(StringId.shoudaojiuzhixing); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | break; |
| | | case SPK.OtherCommon: |
| | | case SPK.AirSwitch: |
| | | case SPK.LightSwitch: |
| | | //插座 |
| | |
| | | break; |
| | | case SPK.ElectricSocket: |
| | | //开关灯光 |
| | | case SPK.OtherCommon: |
| | | case SPK.AirSwitch: |
| | | case SPK.LightSwitch: |
| | | //机械手 |
| | |
| | | foreach (var dic in dicList) |
| | | { |
| | | string value = dic["value"]; |
| | | if (value == "on") |
| | | if (value == "on"|| value == "open") |
| | | { |
| | | button1.Text = Language.StringByID(StringId.onLogic); |
| | | } |
| | |
| | | string state = ""; |
| | | var minutes = timeValue / 60; |
| | | var seconds = timeValue % 60; |
| | | if (minutes != 0) |
| | | { |
| | | if (seconds == 0) |
| | | { |
| | | state = minutes.ToString() + Language.StringByID(StringId.minute); |
| | | } |
| | | else |
| | | { |
| | | state = minutes.ToString() + Language.StringByID(StringId.minute) + seconds.ToString() + Language.StringByID(StringId.s); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (seconds != 0) |
| | | { |
| | | state = seconds.ToString() + Language.StringByID(StringId.s); |
| | | } |
| | | } |
| | | if (!string.IsNullOrEmpty(state)) |
| | | { |
| | | state = Language.StringByID(StringId.delayLogic) + state; |
| | | } |
| | | return state; |
| | | return LogicMethod.Current.getTimeStr(strTimeValue).Replace("0s",""); |
| | | //if (minutes != 0) |
| | | //{ |
| | | // if (seconds == 0) |
| | | // { |
| | | // state = minutes.ToString() + Language.StringByID(StringId.minute); |
| | | // } |
| | | // else |
| | | // { |
| | | // state = minutes.ToString() + Language.StringByID(StringId.minute) + seconds.ToString() + Language.StringByID(StringId.s); |
| | | // } |
| | | //} |
| | | //else |
| | | //{ |
| | | // if (seconds != 0) |
| | | // { |
| | | // state = seconds.ToString() + Language.StringByID(StringId.s); |
| | | // } |
| | | //} |
| | | //if (!string.IsNullOrEmpty(state)) |
| | | //{ |
| | | // state = Language.StringByID(StringId.delayLogic) + state; |
| | | //} |
| | | //return state; |
| | | } |
| | | /// <summary> |
| | | /// 获取显示面熟文本 |