| | |
| | | { |
| | | foreach (var dictionary in dicSateteList) |
| | | { |
| | | if (dictionary["key"] == "on_off") |
| | | string keyValue = dictionary["key"]; |
| | | if (keyValue == "on_off") |
| | | { |
| | | if (dictionary["value"] == "off") |
| | | { |
| | |
| | | //重新添加开光属性数据 |
| | | Dictionary<string, string> diction = new Dictionary<string, string>(); |
| | | diction.Add("key", "on_off"); |
| | | diction.Add("value", "on_off"); |
| | | diction.Add("value", "off"); |
| | | dicSateteList.Add(diction); |
| | | break; |
| | | } |
| | |
| | | #region 点击事件 |
| | | int brightnesValue = 0; |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | LogicMethod.dictionary(dic, "key", "brightness"); |
| | | string keyVlaue = "brightness"; |
| | | string keyVlaue = ""; |
| | | |
| | | switch (device.functionType) |
| | | { |
| | | //开关灯光 light.Switch |
| | | case FunctionType.Dimmer: |
| | | case FunctionType.RGB: |
| | | case FunctionType.RGBW: |
| | | case FunctionType.ColorTemperature: |
| | | { |
| | | LogicMethod.dictionary(dic, "key", "brightness"); |
| | | keyVlaue = "brightness"; |
| | | } |
| | | break; |
| | | |
| | | case FunctionType.MotorCurtain: |
| | | case FunctionType.RollingShutter: |
| | | { |
| | | LogicMethod.dictionary(dic, "key", "percent"); |
| | | keyVlaue = "percent"; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | //—点击事件 |
| | | brightness.btn_subtract_click.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | |
| | | } |
| | | } |
| | | break; |
| | | case "brightness": |
| | | case "percent": |
| | | { |
| | | |
| | | button2.Text = value; |