| | |
| | | { |
| | | //移除列表所有数据 |
| | | dicSateteList.Clear(); |
| | | //重新添加开光属性数据 |
| | | //重新添加-关-属性数据 |
| | | Dictionary<string, string> diction = new Dictionary<string, string>(); |
| | | diction.Add("key", "on_off"); |
| | | diction.Add("value", "off"); |
| | |
| | | } |
| | | break; |
| | | } |
| | | case FunctionType.AC: |
| | | case FunctionType.FloorHeating: |
| | | { |
| | | |
| | | //(空调/地热)做了一个特殊处理; |
| | | bool _bool = false; |
| | | for (int i = 0; i < dicSateteList.Count; i++) |
| | | { |
| | | var dic = dicSateteList[i]; |
| | | if (dic.ContainsValue("on_off")) |
| | | { |
| | | //判断是否存在 |
| | | _bool = true; |
| | | break; |
| | | } |
| | | } |
| | | if (!_bool) |
| | | { |
| | | //没有开关就默认添加-开-属性 |
| | | Dictionary<string, string> diction = new Dictionary<string, string>(); |
| | | diction.Add("key", "on_off"); |
| | | diction.Add("value", "on"); |
| | | dicSateteList.Add(diction); |
| | | } |
| | | |
| | | |
| | | } |
| | | break; |
| | | } |
| | | outputDevice.status = dicSateteList; |
| | | |
| | |
| | | LogicView.BrightnessView brightness = new LogicView.BrightnessView(); |
| | | brightness.FLayoutView(frame, titleName, button.Text, (brightnesValue) => |
| | | { |
| | | button.Text = brightnesValue; |
| | | button.Text = brightnesValue+"%"; |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | string keyVlaue = ""; |
| | | switch (device.functionType) |
| | |
| | | case "brightness": |
| | | { |
| | | |
| | | button2.Text = value; |
| | | button2.Text = value+"%"; |
| | | } |
| | | break; |
| | | } |