| | |
| | | string brightness = GetKeyValue("brightness", dicList); |
| | | string cct = GetKeyValue(FunctionAttributeKey.CCT, dicList); |
| | | string colorful = GetKeyValue(FunctionAttributeKey.Colorful, dicList); |
| | | string rgb = GetKeyValue("rgb", dicList); |
| | | |
| | | |
| | | if (on_off == "on" && brightness != "") |
| | | { |
| | | stateStr = Language.StringByID(StringId.onLogic) + brightness + "%"; |
| | |
| | | stateStr += Language.StringByID(StringId.offLogic); |
| | | } |
| | | |
| | | break; |
| | | } |
| | | |
| | | string rgb = GetKeyValue("rgb", dicList); |
| | | if (!string.IsNullOrEmpty(rgb) && rgb.Length > 6) |
| | | { |
| | | targetView.btnStateColor.Visible = true; |
| | |
| | | break; |
| | | } |
| | | |
| | | if (outputTarget.target_type == "1" || outputTarget.target_type == "3") |
| | | if (outputTarget.target_type == "1" |
| | | || outputTarget.target_type == "3" |
| | | || outputTarget.target_type == "5" |
| | | ) |
| | | { |
| | | targetView.btnState.Text = this.GetTimeText(outputTarget.delay) + stateStr; |
| | | } |
| | |
| | | switch (button.Name) |
| | | { |
| | | case "1": |
| | | case "5": |
| | | { |
| | | //用sid找到设备; |
| | | var device = LogicMethod.Current.GetDevice(outputTarget.sid); |
| | |
| | | this.Delayed(thisView, outputTarget.delay, (value) => |
| | | { |
| | | outputTarget.delay = value.ToString(); |
| | | if (outputTarget.target_type == "1") |
| | | if (outputTarget.target_type == "1" |
| | | || outputTarget.target_type == "5") |
| | | { |
| | | targetView.btnState.Text = this.GetTimeText(outputTarget.delay) + stateStr; |
| | | } |
| | |
| | | /// <param name="button1">显示Btn</param> |
| | | /// <param name="button2">显示Btn</param> |
| | | /// <param name="button3">显示Btn</param> |
| | | /// <param name="button4">显示Btn</param> |
| | | public void EditDeviceState(Entity.Function device, List<Dictionary<string, string>> dicList, Button button1, Button button2, Button button3, Button button4) |
| | | /// <param name="button4">显示Btn</param> |
| | | /// <param name="attribute">属性索引</param> |
| | | public void EditDeviceState(Entity.Function device, List<Dictionary<string, string>> dicList, Button button1, Button button2, Button button3, Button button4, string attribute) |
| | | { |
| | | switch (device.spk) |
| | | { |
| | |
| | | { |
| | | foreach (var dic in dicList) |
| | | { |
| | | string key = dic["key"]; |
| | | if (key != attribute) |
| | | { |
| | | continue; |
| | | } |
| | | string value = dic["value"]; |
| | | switch (dic["key"]) |
| | | switch (key) |
| | | { |
| | | case "on_off": |
| | | case "colorful": |
| | |
| | | } |
| | | break; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | break; |
| | | case SPK.CurtainSwitch: |